我试图在谷歌云引擎安装的鱿鱼,但我得到503 Service Unavailable
与每一个网站。
curl -x http://35.xx.xxx.xxx:62401 -I http://www.squid-cache.org/Support/
HTTP/1.1 503 Service Unavailable
Server: squid
Mime-Version: 1.0
Date: Fri, 01 Feb 2019 13:45:15 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3670
X-Squid-Error: ERR_CONNECT_FAIL 101
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from google_proxyv1
X-Cache-Lookup: MISS from google_proxyv1:62401
Connection: keep-alive
我剥去我鱿鱼的conf以低于最低
acl CONNECT method CONNECT
http_access allow CONNECT
# And finally allow all access to this proxy
http_access allow all
# Squid port
http_port 0.0.0.0:62401
debug_options ALL,1 5,5
request_header_access User-Agent deny all
request_header_replace Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari
/537.36
tcp_outgoing_address 35.xx.xxx.xxx
cache_access_log /var/log/squid/access.log
httpd_suppress_version_string on
cache_store_log none
shutdown_lifetime 1 second
icp_port 0
htcp_port 0
icp_access deny all
htcp_access deny all
snmp_port 0
snmp_access deny all
memory_pools off
via off
forwarded_for delete
follow_x_forwarded_for deny all
pipeline_prefetch on
request_header_access From deny all
request_header_access Server deny all
鱿鱼是听IPv4的,因为我只保留一个IPv4地址
sudo netstat -antp | grep squid
tcp 0 0 0.0.0.0:62401 0.0.0.0:* LISTEN 16811/(squid-1)
但是访问日志显示,它仍然试图连接到IPv6地址
1549028715.317 3 35.xx.xxx.xxx TCP_MISS/503 357 HEAD http://www.squid-cache.org/Support/ - HIER_DIRECT/2001:4800:7812:514:be76:4eff:fe04:5ca1
在谷歌云引擎我已经打开62401
TCP
尝试禁用IPv6
dns_v4_first on
我不得不删除tcp_outgoing_address
并添加dns_v4_first on