我想让 squid 监听端口 3128 和 3129。我想在 3129 上进行身份验证,在 3128 上不进行身份验证。目前我有以下配置
# auth_param not shown but working
http_port 3128
http_port 3129
acl input_3128 myportname 3128
acl input_3129 myportname 3129
acl authenticated proxy_auth REQUIRED
http_access allow authenticated input_3129
http_access deny input_3129
http_access allow input_3128
http_access deny all
不幸的是,这根本不起作用。Squid 总是需要身份验证。
示例请求:
curl -v --proxy http://myproxy.example.com:3128 http://debian.org/
鱿鱼反应:
* processing: http://debian.org/
10.1.2.3:3128...
* Connected to myproxy.example.com (10.1.2.3) port 3128
> GET http://debian.org/ HTTP/1.1
> Host: debian.org
> User-Agent: curl/8.2.1
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 407 Proxy Authentication Required
< Server: squid/5.9
< Mime-Version: 1.0
< Date: Wed, 23 Oct 2024 10:15:01 GMT
< Content-Type: text/html;charset=utf-8
< Content-Length: 3511
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
< Vary: Accept-Language
< Content-Language: en
< Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
< X-Cache: MISS from myproxy
< X-Cache-Lookup: NONE from myproxy:3129
< Via: 1.1 myproxy (squid/5.9)
< Connection: keep-alive
<
问题
如何让 squid 仅在端口 3129 上需要身份验证?