Skip to main content

Posts

Showing posts with the label proxy

Create a proxy within the iOS app

I have an app with an UIWebView (which is connected with a website); the user will navigate into the website. After that, I want that when the user open the app and there is no connection, the already visited pages will be accessible. So I though that it should be possible if I create an internal proxy within the app: each request will be processed by this proxy (and will send the result to the UIWebView). Of course, the proxy should cache the web pages and, if there is no connection available, use the cached pages. I prefer this approach instead of others (HTML5 offline cache) because, in the future, I will can set some feature to the proxy, for example "I want to cache all the pictures for the next 5 hours" etc... Do you know if it's possible and, if it is, what should I use to do it? Or... do you know if there is something similar already done (some Objective-C Proxy?) ?

creating a Java Proxy Server that accepts HTTPS

i already have a working HTTP proxy server that can handle multiple HTTP request. now my problem is how do I handle https request? here's a simplified code i am using: class Daemon { public static void main(String[] args) { ServerSocket cDaemonSocket = new ServerSocket(3128); while(true) { try { Socket ClientSocket = cDaemonSocket.accept(); (new ClientHandler(ClientSocket )).start(); }catch(Exception e) { } } } } and the ClientHandler class ClientHandler extends Thread { private Socket socket = null; private Socket remoteSocket = null; private HTTPReqHeader request = null; ClientHandler(Socket socket) { this.socket = socket; request = new HTTPReqHeader(); request.parse(socket); // I read and parse the HTTP request here } public void run() { if(!request.isSecure() )