squid 代理服務器,使用用戶名和密碼訪問代理,對于出口ip的不同方式的調(diào)用或者以隨機的方式調(diào)用,因為服務器使用的是squid 2.7版本的,根據(jù)官方手冊 3.2版本的有 acl xxx random 1/24 可以隨機(未測試)
若此篇文章還不能解決您的問題,請聯(lián)系QQ:38585404 獲取有償技術服務...
配置如下
http_port 142.4.106.1:3128
http_port 142.4.106.xx:3128
http_port 142.4.106.xx:3128
auth_param basic program /user/lib/squid/libexec/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 12 hours
auth_param basic casesensitive off
#使用用戶或者用戶組來確定出口的IP
#acl wltony proxy_auth wltony
#acl wltony1 proxy_auth wltony1
#tcp_outgoing_address 142.4.106.xxx wltony
#根據(jù)被訪問服務器 IP 來確定出口IP
#acl no1 myip 142.4.106.xxx
#tcp_outgoing_address 142.4.106.xxx no1
acl src_73 src 142.4.106.xxx
acl src_74 src 142.4.106.xxx
tcp_outgoing_address 142.4.106.xxx src_73
tcp_outgoing_address 142.4.106.xxx src_74
#first_req 為主訪問IP
acl first_req src 142.4.106.1
acl second_req src 142.4.106.xxx
acl second_req src 142.4.106.xxx
cache_peer 142.4.106.xxx parent 3128 0 round-robin no-query login=wltony:xxx
cache_peer 142.4.106.xxx parent 3128 0 round-robin no-query login=wltony:xxx
cache_peer_access 142.4.106.xxx allow first_req
cache_peer_access 142.4.106.xxx allow first_req
cache_peer_access 142.4.106.xxx deny second_req
cache_peer_access 142.4.106.xxx deny second_req
never_direct allow first_req
never_direct deny second_req
#close cache www.haipai.wang
acl NCACHE method GET
no_cache deny NCACHE
acl ncsa_users proxy_auth REQUIRED
acl all src all
header_access Via deny all
header_access X-Forwarded-For deny all
http_access allow ncsa_users
#http_access allow wltony
#http_access allow wltony1
http_access deny all
正向代理: 機器通過該機器訪問外部網(wǎng)絡.