Squid接入示例
发布时间: 2022-05-24 11:33:18
阅读量: 687 人次
隧道代理服务器地址
版本 | 代理服务器地址 | 端口 |
---|---|---|
隧道代理(1分钟版) | one-tun.sshttp.cn | 3200 |
隧道代理(每次请求换IP版) | dyn-tun.sshttp.cn | 3100 |
示例说明
# 在Squid配置文件「squid.conf」中添加「cache_peer」配置
# 如下为最小Squid配置示例
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl localnet src fc00::/7
acl localnet src fe80::/10
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
http_port 3128
# 实例id和实例密码(后台-产品管理-隧道代理页面可查)
cache_peer http://dyn-tun.sshttp.cn parent 3100 0 no-query proxy-only login=实例id:实例密码
coredump_dir /var/spool/squid
refresh_pattern ^ftp: | 1440 | 20% | 10080 |
refresh_pattern ^gopher: | 1440 | 0% | 1440 |
refresh_pattern -i (/cgi-bin/|\?) | 0 | 0% | 0 |
refresh_pattern . | 0 | 20% | 4320 |