Squid 3.2 – 使用单一用户身份validation的随机出站IP的正确configuration?

我正在尝试使用AclRandom for Squid 3.2,我想我对这个方法有点困惑。 这是我的configuration:

http_port 3128 auth_param basic program /usr/local/squid32/libexec/basic_ncsa_auth /usr/local/squid32/etc/passwords auth_param basic children 5 auth_param basic realm proxy auth_param basic credentialsttl 2 hours auth_param basic casesensitive off acl my_auth proxy_auth REQUIRED http_access allow my_auth max_filedesc 32768 acl randomIP random 1/3 tcp_outgoing_address x.154.198.x randomIP tcp_outgoing_address x.154.198.x randomIP tcp_outgoing_address x.154.198.x randomIP tcp_outgoing_address x.154.198.x forwarded_for delete via off 

它总是使用列表中的第一个IP地址。 有谁知道我可以如何使它随机使用3之一? 另外我得到很多TCP_MISS为我要求的任何网站,做别的东西看起来很奇怪?

编辑:更新与潜在的解决scheme:

 http_port 3128 auth_param basic program /usr/local/squid32/libexec/basic_ncsa_auth /usr/local/squid32/etc/passwords auth_param basic children 5 auth_param basic realm proxy auth_param basic credentialsttl 2 hours auth_param basic casesensitive off acl my_auth proxy_auth REQUIRED http_access allow my_auth http_access allow localhost http_access deny all max_filedesc 32768 authenticate_ttl 5 seconds authenticate_ip_ttl 1 seconds acl r_14 random 1/14 acl r_13 random 1/13 acl r_12 random 1/12 acl r_11 random 1/11 acl r_10 random 1/10 acl r_9 random 1/9 acl r_8 random 1/8 acl r_7 random 1/7 acl r_6 random 1/6 acl r_5 random 1/5 acl r_4 random 1/4 acl r_3 random 1/3 acl r_2 random 1/2 acl r_1 random 1/1 tcp_outgoing_address xx198.145 r_14 tcp_outgoing_address xx198.146 r_13 tcp_outgoing_address xx198.147 r_12 tcp_outgoing_address xx198.148 r_11 tcp_outgoing_address xx198.149 r_10 tcp_outgoing_address xx198.150 r_9 tcp_outgoing_address xx198.151 r_8 tcp_outgoing_address xx198.152 r_7 tcp_outgoing_address xx198.153 r_6 tcp_outgoing_address xx198.154 r_5 tcp_outgoing_address xx198.155 r_4 tcp_outgoing_address xx198.156 r_3 tcp_outgoing_address xx198.157 r_2 tcp_outgoing_address xx198.158 r_1 tcp_outgoing_address xx198.148 forwarded_for delete via off 

在线文档中有一个例子是三路分割。 每一步都会带走一部分stream量,而不是所有stream量的一部分。

  • 从所有stream量开始1/3的离开2/3。
  • 以2/3叶1/3的一半
  • 拿剩下的1/3

Squid-Cache-Wiki: function:ACLtypes“随机”

 acl third random 1/3 acl half random 1/2 tcp_outgoing_address x.154.198.x third tcp_outgoing_address x.154.198.x half tcp_outgoing_address x.154.198.x 

你的configuration有1/3,1/3,1/3,全部用于:

  • 全部以2/3开始
  • 以2/3(2/9)叶子4/9的1/3
  • 以4/9(4/27)叶8/27的1/3
  • 拿剩下的8/27

如果你的第一个和第四个外出地址是相同的,那么它将得到17/27的stream量。