我正在使用需要HTTP代理的networking。互联网工作正常。
$ wget google.com --2017-10-18 21:52:48-- http://google.com/ Connecting to xxx.xx.xx.xx:8080... connected. Proxy request sent, awaiting response... 302 Moved Temporarily Location: http://www.google.co.in/?gfe_rd=cr&dcr=0&ei=tX_nWcnwLq6A8Qenx4zICw [following] --2017-10-18 21:52:48-- http://www.google.co.in/?gfe_rd=cr&dcr=0&ei=tX_nWcnwLq6A8Qenx4zICw Reusing existing connection to xxx.xx.xx.xx:8080. Proxy request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: 'index.html' index.html [ <=> ] 14.20K --.-KB/s in 0.06s 2017-10-18 21:52:48 (241 KB/s) - 'index.html' saved [14537]
但我不能ping通。
$ ping google.com PING google.com (216.58.197.46) 56(84) bytes of data. ^C --- google.com ping statistics --- 14 packets transmitted, 0 received, 100% packet loss, time 13315ms
tracepath的
$ tracepath google.com 1?: [LOCALHOST] pmtu 1500 1: 192.168.xx.x 0.621ms 1: 192.168.xx.x 0.593ms 2: no reply 3: no reply 4: no reply 5: no reply . .
如果我使用VPN,那么一切工作正常。
这是因为代理和VPN是不同的服务。
一个VPN创build一个虚拟网卡,允许您使用TCP,UDP,ICMP,SSH,FTP和任何其他协议。 它获得自己的IP地址,并有自己的路由。
另一方面,代理服务器充当中继。 有一个特定的代理协议来处理HTTP – 这就是所谓的HTTP代理。 还有一个SOCKS代理可以代理任何基于TCP / IP的服务(HTTP / HTTPS,SSH,FTP …)。
Ping和traceroute是使用ICMP协议的服务,所以你的代理将不能通过它们。