Squidconfiguration – 相同的用户多个IPS

我正在用我的8个IP构build一个小型的代理服务器,但是如果我允许1个用户访问更多的IPS,无论他使用哪一个作为代理,鱿鱼服务器将使用符合规则的第一个。

正如你可以从我的squidconfiguration文件中看到的, manfred用户可以访问所有ip,但是无论我select什么ip,squid只使用列表中的第一个:x.213.223.188

任何想法如何强迫鱿鱼使用该用户所需的代理。

http_port 8888 visible_hostname funky auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd acl ncsa_users proxy_auth REQUIRED auth_param basic children 5 auth_param basic realm Anonymous proxy auth_param basic credentialsttl 1 hours acl all src all acl manager proto cache_object acl localhost src 127.0.0.1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 acl SSL_ports port 443 # https acl SSL_ports port 563 # snews acl SSL_ports port 873 # rsync acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl Safe_ports port 631 # cups acl Safe_ports port 873 # rsync acl Safe_ports port 901 # SWAT acl purge method PURGE acl CONNECT method CONNECT acl user41 proxy_auth manfred acl user42 proxy_auth manfred acl user43 proxy_auth manfred acl user44 proxy_auth manfred acl user45 proxy_auth manfred acl user46 proxy_auth ciokan manfred acl user47 proxy_auth manfred acl user48 proxy_auth manfred tcp_outgoing_address x.213.223.188 user41 tcp_outgoing_address x.213.223.189 user42 tcp_outgoing_address x.213.223.190 user43 tcp_outgoing_address x.213.223.191 user44 tcp_outgoing_address x.37.196.188 user45 tcp_outgoing_address x.37.196.189 user46 tcp_outgoing_address x.37.196.190 user47 tcp_outgoing_address x.37.196.191 user48 # No local caching maximum_object_size 0 KB minimum_object_size 0 KB # No local log cache_access_log /dev/null cache_store_log /dev/null refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 http_access allow manager localhost http_access deny manager http_access allow purge localhost http_access deny purge http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access deny !ncsa_users http_access allow ncsa_users http_access allow user41 http_access allow user42 http_access allow user43 http_access allow user44 http_access allow user45 http_access allow user46 http_access allow user47 http_access allow user48 http_access allow all hosts_file /etc/hosts coredump_dir /var/spool/squid 

尝试像这样:

 acl user41 proxy_auth manfred acl user41 myip x.213.223.188 acl user42 proxy_auth manfred acl user42 myip x.213.223.189 

并按原样离开tcp_outgoing_adress。

编辑:啊,是的,也许相反的东西

 acl ip_1 myip x.213.223.188 tcp_outgoing_address x.213.223.188 ip_1 acl ip_2 myip x.213.223.189 tcp_outgoing_address x.213.223.189 ip_2 

并单独保留proxy_auth acls:

 acl user_manfred proxy_auth manfred 

然后

 http_access allow user_manfred ip_1 http_access allow user_manfred ip_2