I have a situation where a user has an iphone and a macbook. The macbook uses a SOCKS proxy via ssh to access some internal webpages. Is is possible for either the iPhone to do the same, or can the macbook 'share' the proxy? Is a VPN from the macbook the answer? and if so where would I start?
Pretty straightforward; I was trying to do this myself.
Assuming you have an ssh host already set up, use:
ssh -D 9999 email@example.com
You may have to use ssh -N -g -D 9999 firstname.lastname@example.org, but just -D worked for me.
Once you have the ssh tunnel going, you'll need to serve a proxy configuration file with your local webserver to use your SOCKS proxy as an http proxy.
Go to your ~/Sites/ directory, and create a Proxy Auto-Config (PAC) file (eg proxy.pac). It should have the following:
Then, enable internet sharing and web sharing in Mac Preferences (you can enable basic WEP security from the Airport Options button).
On your iPhone, join your ad-hoc network, go to Settings > Wifi and click the blue arrow to the right of your network, scroll to the bottom, click Auto and type in the address to your PAC file (e.g. http://192.168.xx.xx/mysupersecretproxy.pac).
and http://macs.about.com/od/networking/qt/websharing.htm (referenced in the first article)