Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 10, 2012, 01:57 PM   #1
gwelmarten
macrumors 6502
 
Join Date: Jan 2011
Location: England!
Connecting to an HTTP/HTTPS Proxy within App - Any ideas if it's even possible?

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 is offline   0 Reply With Quote
Old Feb 10, 2012, 03:18 PM   #2
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by gwelmarten View Post
...(see screenshot below for how I'd configure it on a Mac)...
Screenshot missing.
__________________
dejo is offline   0 Reply With Quote
Old Feb 10, 2012, 03:20 PM   #3
gwelmarten
Thread Starter
macrumors 6502
 
Join Date: Jan 2011
Location: England!
Oops sorry - thanks for pointing that out.

Sam
Attached Thumbnails
Click image for larger version

Name:	Screen+Shot+2012-02-10+at+16.25.55.png
Views:	81
Size:	157.2 KB
ID:	323841  
gwelmarten is offline   0 Reply With Quote
Old Feb 11, 2012, 04:08 PM   #4
lefooey
macrumors member
 
Join Date: Dec 2009
Location: 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).
__________________
Get healthy, respect your heart, eat less sodium. Sodium Tracker helps you meet to your goal.
lefooey is offline   0 Reply With Quote
Old Feb 11, 2012, 04:44 PM   #5
gwelmarten
Thread Starter
macrumors 6502
 
Join Date: Jan 2011
Location: 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
gwelmarten is offline   0 Reply With Quote
Old Feb 11, 2012, 05:17 PM   #6
lefooey
macrumors member
 
Join Date: Dec 2009
Location: Spokane, WA
Quote:
Originally Posted by gwelmarten View Post
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.
__________________
Get healthy, respect your heart, eat less sodium. Sodium Tracker helps you meet to your goal.
lefooey is offline   0 Reply With Quote
Old Feb 11, 2012, 05:20 PM   #7
gwelmarten
Thread Starter
macrumors 6502
 
Join Date: Jan 2011
Location: 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
gwelmarten is offline   0 Reply With Quote
Old Feb 11, 2012, 06:06 PM   #8
lefooey
macrumors member
 
Join Date: Dec 2009
Location: Spokane, WA
https://developer.apple.com/library/...uid/TP30001132
__________________
Get healthy, respect your heart, eat less sodium. Sodium Tracker helps you meet to your goal.
lefooey is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Tags
app, http, objective-c, proxy

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Proxy.app - Web Interception Proxy passfree Mac Applications and Mac App Store 1 May 24, 2014 11:21 AM
Proxy App berdar iPad Apps 1 Sep 3, 2012 09:32 PM
under wifi settings what is HTTP PROXY then 3 options aliensarecool iPhone 1 Jun 10, 2012 12:14 PM

Forum Jump

All times are GMT -5. The time now is 04:58 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC