How to Configure iOS for iPhone and iPad to Use So
博客专区 > sincoder 的博客 > 博客详情
How to Configure iOS for iPhone and iPad to Use So
sincoder 发表于3年前
How to Configure iOS for iPhone and iPad to Use So
  • 发表于 3年前
  • 阅读 118
  • 收藏 2
  • 点赞 0
  • 评论 0

腾讯云 十分钟定制你的第一个小程序>>>   

The socks proxy I created following Proxy Using SSH Tunnel works very well on both Linux and Windows. However, when I try to configure my iPhone and iPad with iOS, I find iOS does not support socks proxy in its settings interface. I don’t know why it is not added while socks proxy is indeed supported by the iOS operating system. This post introduces how to configure iOS to use the socks proxy created by the SSH tunnel.

Here, we assume that you have already set up one proxy (hence, you need one Linux or Unix host or others that you can set up SSH proxies listening on public IPs) that listens on an IP address which can be connected by the iOS device. One typical configuration may be that both the Linux host and the iOS device are connected to the same network such as as WLAN. Here, assume the address and the port of the socks proxy over SSH tunnel is proxy_host:proxy_port.

Prepare an PAC file on a host 

You need a Proxy Auto-Config (PAC) file to configure iOS to use the socks proxy. 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.

Configure the iOS device 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 in our example).

By now, you have configured your iOS device to use the socks proxy over SSH tunnel. Check Who am I and you should already have been behind the proxy.


共有 人打赏支持
sincoder
粉丝 36
博文 395
码字总数 124030
作品 1
×
sincoder
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: