在 Ubuntu 16.04 机器中,我使用 squid 3.5.12 设置了代理中继配置,如下所示:
External_proxy <-> Internal_proxy <-> 主机
此时,从外部和内部代理我都可以访问 http 和 https 网站,但从主机我只能访问 http 网站。
我squid.conf
在 internal_proxy 中的当前是:
http_port 3128
logformat lmc %ts %la %>a %ul %<A %rm %ru %mt %>Hs %Ss "%{Referer}>h" "%{User-Agent}>h" %>st %<st %tr %<pt %<tt
access_log syslog:local1.info
access_log syslog:local0.info lmc
icp_port 0
cache_peer <external_proxy_IP> parent 8080 0 proxy-only originserver
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 443
acl local_subnet src 192.168.100.0/24
acl CONNECT method CONNECT
http_access allow CONNECT local_subnet
http_access allow local_subnet Safe_ports
http_access allow local_subnet SSL_ports
http_access deny all
connect_timeout 510 minutes
request_timeout 500 minutes
cache_dir ufs /var/cache/squid 8192 16 256
shutdown_lifetime 2 seconds
hierarchy_stoplist cgi-bin ?
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
ftp_epsv off
via off
never_direct allow all
visible_hostname "internal_proxy_hostname"
当我尝试连接到某个 https 站点时,我收到以下信息:
wget https://google.com
--2019-07-08 13:08:23-- https://google.com/
Connecting to internal_proxy:3128... connected.
Proxy tunneling failed: Service UnavailableUnable to establish SSL connection.
在 internal_proxy 日志中:
TAG_NONE/503 0 CONNECT google.com:443 - HIER_NONE/- -
CONNECT google.com:443 - 503 TAG_NONE "-"
我试过这个程序:但结果是一样的。
注意:我无权访问 external_proxy 配置