我正在尝试设置一个鱿鱼代理,该代理将通过一系列端口接受一个 IPv4 上的多个入站连接,并且每个端口连接都连接到唯一的 IPv6 地址。
我已经命名了每个端口连接,并根据连接名称指定了一个 ACL,然后我尝试为每个端口定义一个传出 IPv6。下面的脚本有效,因为它接受不同端口上的连接并通过 IPv6 路由出去,但是,即使每个用户定义了不同的 ipv6,所有出站连接都使用相同的 IPv6(user5) - 奇怪的是,即使我评论- 从 squid.conf 中删除 user5 IPv6,它仍然用于出站连接。
任何人都可以看到这里有什么问题吗?(在 Centos 6 64 位上使用 Squid 3.1.1)
## declare an acl that is true for all ipv6 destinations
acl to_ipv6 dst ipv6
##tell Squid to listen on sequential ports and to designate a name for each inbound connection.
http_port 241.xxx.xxx.101:3128 name=3128
http_port 241.xxx.xxx.101:3129 name=3129
http_port 241.xxx.xxx.101:3130 name=3130
http_port 241.xxx.xxx.101:3131 name=3131
http_port 241.xxx.xxx.101:3132 name=3132
## designate acl based on inbound connection name
acl user1 myportname 3128
acl user2 myportname 3129
acl user3 myportname 3130
acl user4 myportname 3131
acl user5 myportname 3132
## define outgoing IPv6 per user
tcp_outgoing_address [2001:::::::ipv61] user1
tcp_outgoing_address [2001:::::::ipv62] user2
tcp_outgoing_address [2001:::::::ipv63] user3
tcp_outgoing_address [2001:::::::ipv64] user4
##tcp_outgoing_address [2001:::::ipv65] user5
##this last IPv6 always gets used for all outbound connections, even if commented out
Run Code Online (Sandbox Code Playgroud)
在 Squid 3.1 中,您需要to_ipv6
在每个 tcp_outgoing_address 行后面添加该指令。如果升级到3.2就不会遇到这个问题。
参考: http: //www.squid-cache.org/Doc/config/tcp_outgoing_address/
归档时间: |
|
查看次数: |
8215 次 |
最近记录: |