我无法让 Squid 3.5 使用此配置响应除 ip1 之外的任何 IP。我相信问题在于 IPv6 的使用,而不是我分配多个 IP 的方式。但是,我只有一个 IPv4 可供测试。
http_port 8121
cache deny all
forwarded_for delete
acl to_ipv6 dst ipv6
http_access allow to_ipv6 !all
tcp_outgoing_address 216.144.232.42 !to_ipv6
acl ip1 myip 216.144.232.**
tcp_outgoing_address 216.144.232.** ip1
acl ip2 myip 2607:fcd0:106:3219::ad76:****
tcp_outgoing_address 2607:fcd0:106:3219::ad76:**** ip 2
acl ip3 myip 2607:fcd0:106:3219::e296:****
tcp_outgoing_address 2607:fcd0:106:3219::e296:**** ip 3
via off
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_access deny all