2016-01-22 35 views
0

什么是正确的设置在Linux机器设置squid代理客户端我跟着文档设置出口变量如下squid代理客户端安装

bash $ export http_proxy="http://10.20.5.48:3128" 
bash $ ping google.com 
PING google.com (74.125.228.197) 56(84) bytes of data. 
^C 
--- google.com ping statistics --- 
1 packets transmitted, 0 received, 100% packet loss, time 922ms 

bash $ export http_proxy="http://10.20.5.48:3128/" 
bash $ ping google.com 
PING google.com (173.194.123.110) 56(84) bytes of data. 

bash $ export HTTP_PROXY="http://10.20.5.48:3128" 
bash $ ping google.com       
PING google.com (74.125.228.196) 56(84) bytes of data. 
^C 
--- google.com ping statistics --- 
2 packets transmitted, 0 received, 100% packet loss, time 1086ms 

bash $ export HTTP_PROXY="http://10.20.5.48:3128/" 
bash $ ping google.com        
PING google.com (74.125.228.195) 56(84) bytes of data. 
^C 
--- google.com ping statistics --- 
2 packets transmitted, 0 received, 100% packet loss, time 1160ms 

Squid服务器在端口3128上运行和访问,并与squid.conf里也没有防火墙或ACL文档

bash $ telnet 10.20.5.48 3128 
Trying 10.20.5.48... 
Connected to 10.20.5.48. 
Escape character is '^]'. 

当我改变的yum.conf使用代理服务器使用相同的服务器和IP yum配置工作

回答

0

Ping不使用http-proxy。 在您的telnet会话中尝试使用 GET/HTTP/1.1 Host: google.com