How do I connect to a SOCKS Proxy from an iPhone/iPod Touch? I like to surf securely and privately via a SOCKS proxy which I created via SSH tunneling, on the Mac. I used the SSH client on my Mac to achieve this. Then I thought, since the iPhone OS is essentially Mac OS, the same trick might work also on the iPhone.

I managed to create a SSh tunnel on my iPhone via the Terminal (iPhone's Terminal). (Yes, it's jail-broken)

ssh -D [port] user@domain.com


At this stage my iPhone is SOCKS proxy.

However, there doesn't seem to be a way in the iPhone networking preference panel to specify a SOCKS proxy. Someone suggest creating a Proxy Auto-Contig (PAC) file to workaround this, but that sounds complicated.

Any ideas how to make iPhone use it's own SOCKS proxy?
Well I guess, there's no better way to do it.  Darn you Apple, is it so hard to put a SOCKS Proxy setting in the iPhone OS network settings panel? 
:-(

Anyway, the best answer so far, and the only one I could find on the Net, is from a document from the SNIPPLR Code 2.0 website entitled How To Connect To A SOCKS Proxy From An Unjailbroken iPhone/iPod Touch. 

Below is a cleaned up version of their solution:


  Let's say, perhaps, that you are already forwarding your web traffic through an SSH/SOCKS tunnel at work (for privacy reasons) and you would like to use that same tunnel on your iPhone/iPod Touch. This is actually pretty easy to accomplish.



Make sure the SOCKS tunnel on your work computer allows LAN connections so your iPhone/iPod Touch can connect to it. 

ssh -N -g -D 1080 user@domain.com

Create a text file and insert the following code:

function FindProxyForURL(url, host)
{ 
     return "SOCKS 192.168.xx.xx:yyyy";
}


Replace the x's with your IP and the y's with the port you used after the -D in your SSH command
Save the text file as a Proxy Auto-Config (PAC) file to a web accessible place with a .pac extension. 

If you're reading this chances are you know how to serve a file over HTTP on your work LAN, so I won't delve into that.
Finally, on your iPhone/iPod Touch, go to Settings → Wi-Fi and click the blue arrow to the right of your work 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).


Now you can surf the web securely from your iPhone/iPod touch.