Mat*_*att 6 proxy http squid http-proxy
所以我正在尝试为我的抓取工具创建一个代理服务器,我不确定为什么我甚至被自己拒绝了.当我在浏览器中访问任何网站时,在我安装了Squid的计算机上以及所有内容上,它给出了以下错误消息:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://www.whatismyipaddress.com/
The following error was encountered:
Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is webmaster.
Generated Sun, 08 Nov 2015 04:03:13 GMT by WIN-AIUOBK0JHPA (squid/2.7.STABLE8)
Run Code Online (Sandbox Code Playgroud)
我在Internet选项中编辑了我的局域网设置以允许代理服务器使用正确的IP地址(当我运行ipconfig时为IPv4),给它打开正确的端口,我也打开了我的端口Windows防火墙.
以下是我的squid.conf文件的部分:
acl SSL_ports port 443
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 CONNECT method CONNECT
acl localhost src 192.168.1.0/255.255.255.255
http_access allow localhost
(skip through some commented out segments....)
http_access allow manager localhost
http_access allow localnet
Run Code Online (Sandbox Code Playgroud)
正如你所知,我已经删除了许多不必要的注释部分.低了,我有我的......
http_port ####
Run Code Online (Sandbox Code Playgroud)
...线.
我不知道为什么我被封锁了.我会不断刷新,所以如果您需要更多信息或有任何疑问,请告诉我.非常感谢!!
你的配置应该如下所示
http_access allow localhost
http_access allow localnet
# And finally deny all other access to this proxy
http_access deny all
Run Code Online (Sandbox Code Playgroud)
并从您的配置中删除以下行
acl localhost src 192.168.1.0/255.255.255.255
Run Code Online (Sandbox Code Playgroud)
无需将 localhost 指定为 ACL,它仅用于访问 localhost 页面。您已将 localhost 与 localnet 混淆,请修改该行,如下所示
acl localnet src 192.168.1.0/255.255.255.255
Run Code Online (Sandbox Code Playgroud)
您的 LAN 客户端访问代理的本地 IP 应属于上述 src 范围或根据需要修改范围。来自其他 ip 的所有其他请求都将被拒绝
| 归档时间: |
|
| 查看次数: |
13651 次 |
| 最近记录: |