安装
- apt-get install squid
ncsa认证名
- apt-get install apache2-utils
配置
vi /etc/squid/squid.conf
- auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
- 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 127.0.0.1/32 ::1
- acl all src all
- acl auth proxy_auth REQUIRED
- http_access allow auth
- http_access allow localhost
- http_access deny all
- http_port 8735
- cache deny all
- forwarded_for off
- request_header_access X-Forwarded-For deny all
- request_header_access From deny all
- request_header_access Via deny all
其中以下几条表示高匿名代理
- request_header_access X-Forwarded-For deny all
- request_header_access From deny all
- request_header_access Via deny all
启动
- systemctl restart squid.service