在localhost上运行Squid

时间:2015-03-06 16:05:34

标签: proxy squid

我有赛门铁克的产品表格,他们的帮助......不太有帮助,包括一条好消息,说明"联系您的经销商"在"联系我们"链接。我的经销商说要联系他们。怎么样?无论如何,如果Squid for Windows,它是一个重新包装的版本。当我将IE指向本地运行的代理时,我得到了“拒绝访问”。访问控制配置可防止此时允许您的请求。如果您认为不正确,请与您的服务提供商联系。"但是,当我将另一台机器上的IE指向运行Squid的服务器时,一切正常。

我对Squid或代理没有任何经验。我根据这里的搜索尝试了一些不同的配置,但没有任何效果。我确定它很简单。这是配置:

digest_generation off

hierarchy_stoplist cgi-bin ?

acl all src 0.0.0.0/0.0.0.0

cache deny all

maximum_object_size 0 KB

emulate_httpd_log on

debug_options ALL,1

cache_store_log none
access_log none
useragent_log none

auth_param ntlm program c:/clientsiteproxy/libexec/mswin_ntlm_auth.exe
auth_param ntlm children 80
auth_param ntlm keep_alive on

auth_param negotiate children 80

auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

authenticate_ip_shortcircuit_ttl 30 seconds

refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern .       0   20% 4320

read_timeout 15 minutes

acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 443 563 # https, snews
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 Smartconnect dstdomain ned.webscanningservice.com
acl CONNECT method CONNECT
acl authproxy proxy_auth REQUIRED

acl our_networks src 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 169.254.0.0/16
acl HEAD method HEAD

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow HEAD
http_access deny !our_networks
http_access allow Smartconnect

http_access allow authproxy
http_access deny all

icp_access allow all

httpd_suppress_version_string on

visible_hostname ClientSiteProxy

forwarded_for off

header_access Via deny all

never_direct allow all

cache_dir null c:/ClientSiteProxy
coredump_dir c:/clientsiteproxy/var/cache

http_port 3128

1 个答案:

答案 0 :(得分:0)

这很可能是罪魁祸首:http_access deny !our_networks。除了192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 169.254.0.0/16之外,此语句拒绝所有源IP的出站访问。

当您从同一台计算机上浏览时,浏览器将绑定到localhost,因此您可以尝试使用our_networks扩展127.0.0.1定义。