As you may know, I’m one of the Apple’s fans and love to use my iOS gadgets (iPhone and iPad) in every type of tasks. Many of iOS users are using their iPhone and iPad in enterprise environments and want to connect to their company’s network while at work. In some cases, network administrators set a proxy server so users must connect to that proxy in order to access internal websites and more. As you know, iOS is currently supports HTTP proxy but it’s not enough for many users because their company’s network administrators set SOCKS proxy instead of HTTP!
By the time, there are some applications that can be installed in order to use SOCKS proxy in an iOS device but these apps are only available for jailbroken devices so other users can’t install them!
In this post I want to tell you how to use SOCKS proxy in iPhone, iPad and iPod touch
PAC Proxy
The .pac file, a proxy auto-config (PAC) file defines how web browsers and other user agents can automatically choose the appropriate proxy server (access method) for fetching a given URL.
Find a .pac file has been created by other people on the network, or prepare an PAC file on a your own host.
A PAC file contains a JavaScript function “FindProxyForURL(url, host)”. This function returns a string with one or more access method specifications. These specifications cause the user agent to use a particular proxy server or to connect directly.
The PAC file is a text file that contains the content like this:
function FindProxyForURL(url, host) { return "SOCKS proxy_host:proxy_port"; }
Here, you need to replace the proxy_host:proxy_port
with your proxy setting.
Assume this PAC file is named proxy.pac
and is stored at address http://www.my-server.com/proxy.pac
.
You can also create the PAD file using this online service.
Input the server doamin or IP address WITHOUT http:// or https://, and input port in the below. Then you will see the Output shown in bottom area. Just paste it and save it as a .pac file.
After you’ve created the PAC file, upload it to your webserver.
How to Configure iPhone to Use the Socks Proxy
Now, we can configure the iOS to use the socks proxy by pointing it to the PAC file.
In the iOS, go to Settings -> Wi-Fi and click the blue right arrow on the right of your wireless network, choose Auto in the HTTP Proxy section, and fill the URL of the PAC file (http://www.my-server.com/proxy.pac
or .pac file provided by a third-party in our example).
By now, you have configured your iOS device to use the socks proxy over SSH tunnel.
+ There are no comments
Add yours