Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gwelmarten

macrumors 6502
Original poster
Jan 17, 2011
476
0
England!
Hi
I am looking at building an iPhone App that in some places displays a webView component. I want the content of this webView to pass through some form of a proxy, ideally a HTTP/HTTPS proxy, like the kind you would configure as an auto-HTTP proxy that's stored on a server in a local network (see screenshot below for how I'd configure it on a Mac). This is also the kind that Schools use to filter the internet connection for children. What this is not is a web proxy such as glype or CGIProxy (where a user enters a URL in a form online).

Does anybody have any ideas how I'd go about doing this or any links to relevant pages/Documentation? I've had a look but can't find any. I appreciate this may not even be possible.

Thanks in advance,

Sam
 

gwelmarten

macrumors 6502
Original poster
Jan 17, 2011
476
0
England!
Oops sorry - thanks for pointing that out.

Sam
 

Attachments

  • Screen+Shot+2012-02-10+at+16.25.55.png
    Screen+Shot+2012-02-10+at+16.25.55.png
    157.2 KB · Views: 244

lefooey

macrumors member
Dec 26, 2009
64
0
Spokane, WA
There are several examples of apps that display proxied information in a webview. Skyfire is one of the more popular examples.

A couple generalizations of how to implement this are:
  1. Download the content programatically from your proxy source and display it statically in the webview, or
  2. Rewrite the URLs to use your proxy service and only display content that's behind those proxy URLs.

Either of these isn't a simple solution and both require components on both the device and a server.

P.S. The example you've given of a proxy is the built-in network proxy on your mac. That's based on your network connection. The same functionality is on your iPhone under Settings -> WiFi -> (Select network) -> HTTP Proxy (Manual).
 

gwelmarten

macrumors 6502
Original poster
Jan 17, 2011
476
0
England!
Hi
Thanks for your reply, however I don't think you completely understand what I want to do. I want to make the app connect to an HTTP proxy as the iPhone does in it's settings app, as you describe in your P.S. Is there any way of doing it that way?

Thanks,
Sam
 

lefooey

macrumors member
Dec 26, 2009
64
0
Spokane, WA
Thanks for your reply, however I don't think you completely understand what I want to do. I want to make the app connect to an HTTP proxy as the iPhone does in it's settings app, as you describe in your P.S. Is there any way of doing it that way?

That would be as I describe in option #1. You'd have to implement the SOCKS proxy client code in your app, then use it to download remote content and display that content statically into a web view.
 

gwelmarten

macrumors 6502
Original poster
Jan 17, 2011
476
0
England!
Hi
Thanks. When I search for this, I get unrelated articles such as ones relating to tethering over SOCKS. Would you give me some technical terms involved here or the names of some relevant methods so I can find appropriate documentation?

Regards,
Sam
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.