我有一台 Linux Debian 机器,有许多运行 Squid 的网络接口(venet0:1 到 venet0:5)。如果我连接到接口 venet0:2,squid 使用 venet0:0 进行传出流量,但我希望 Squid 使用相同的网络接口进行连接。因此,如果我连接到 venet0:1 的 IP 地址,代理也应该使用相同的接口进行传出流量。
目前我使用以下配置:
http_port 200
forwarded_for off
uri_whitespace encode
visible_hostname localhost
via off
collapsed_forwarding on
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/users
auth_param basic children 5
auth_param basic realm Proxy
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl ncsa_users proxy_auth REQUIRED
access_log none
cache_store_log none
cache_log /dev/null
acl all src all
http_access allow ncsa_users
header_access From deny all
header_access Referer deny all …Run Code Online (Sandbox Code Playgroud)