socks proxy_如何配置iOS以在Linux / Unix主机上通过SSH使用Socks Proxy

socks proxy

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.

我在使用SSH隧道的代理之后创建的袜子代理在LinuxWindows上均能很好地工作。 但是,当我尝试使用iOS配置iPhone和iPad时,我发现iOS在其设置界面中不支持袜子代理。 我不知道为什么在iOS操作系统确实支持socks proxy的情况下不添加它。 这篇文章介绍了如何配置iOS以使用SSH隧道创建的socks代理。

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 WiFi network which you iOS device is connected to. Here, assume the address and the port of the socks proxy over SSH tunnel is proxy_host:proxy_port. In summary, what you need are

在这里,我们假设您已经设置了一个代理(因此,您需要一个Linux或Unix主机或其他可以设置用于侦听公共IP的SSH代理的代理),该代理侦听可以由iOS设备连接的IP地址。 一种典型的配置可能是Linux主机和iOS设备都连接到与iOS设备连接的同一个WiFi 网络 。 在这里,假设通过SSH隧道的袜子代理的地址和端口是proxy_host:proxy_port 。 总而言之,您需要的是

You need additional hosts and configurations. The benefit is that the proxy provided by the Linux/Unix host is very solid and stable.

您需要其他主机和配置。 好处是Linux / Unix主机提供的代理非常可靠和稳定。

在主机上准备PAC文件 (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:

您需要一个代理自动配置(PAC)文件来配置iOS以使用袜子代理。 PAC文件是一个文本文件,其中包含以下内容:

function FindProxyForURL(url, host)
{ 
     return "SOCKS proxy_host:proxy_port";
}

Here, you need to replace the proxy_host:proxy_port with your proxy setting.

在这里,您需要使用代理设置替换proxy_host:proxy_port

You will need a Web server to host the PAC file. One in your local network or one connected to the Internet are both fine. There are many options to do this. You may set up your own web server, use Dropbox, choose a shared hosting server or use github.

您将需要一个Web服务器来托管PAC文件。 局域网中的一个或连接到Internet的一个都可以。 有很多选项可以做到这一点。 您可以设置自己的Web服务器,使用Dropbox ,选择共享托管服务器或使用github

Here, in this tutorial, we assume this PAC file is named proxy.pac and is stored at address http://www.my-server.com/proxy.pac.

在此,在本教程中,我们假定此PAC文件名为proxy.pac ,并存储在地址http://www.my-server.com/proxy.pac

配置iOS设备以使用袜子代理 (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.

现在,我们可以通过将iOS代理指向PAC文件来配置它使用袜子代理。

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).

在iOS中,转到“设置” ->“ Wi-Fi” ,然后单击无线网络右侧的蓝色右箭头,在“ HTTP代理”部分中选择“ 自动 ”,然后填写PAC文件的URL( http://www.my-server.com/proxy.pac在我们的示例中为http://www.my-server.com/proxy.pac )。

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.

到目前为止,您已将iOS设备配置为通过SSH隧道使用socks代理。 检查我是谁 ,您应该已经位于代理之后。

翻译自: https://www.systutorials.com/how-to-configure-ios-for-iphone-and-ipad-to-use-socks-proxy-created-by-ssh/

socks proxy

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值