1. 首页
  2. 系统运维
  3. Linux

Ubuntu 16.04安装squid Http代理,NCSA认证

安装

  1. apt-get install squid

ncsa认证名

  1. apt-get install apache2-utils

配置

vi /etc/squid/squid.conf

  1. auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
  2. acl SSL_ports port 443
  3. acl Safe_ports port 80          # http
  4. acl Safe_ports port 21          # ftp
  5. acl Safe_ports port 443         # https
  6. acl Safe_ports port 70          # gopher
  7. acl Safe_ports port 210         # wais
  8. acl Safe_ports port 1025-65535  # unregistered ports
  9. acl Safe_ports port 280         # http-mgmt
  10. acl Safe_ports port 488         # gss-http
  11. acl Safe_ports port 591         # filemaker
  12. acl Safe_ports port 777         # multiling http
  13. acl CONNECT method CONNECT
  14. acl localhost src 127.0.0.1/32 ::1
  15. acl all src all
  16. acl auth proxy_auth REQUIRED
  17. http_access allow auth
  18. http_access allow localhost
  19. http_access deny all
  20. http_port 8735
  21. cache deny all
  22. forwarded_for off
  23. request_header_access X-Forwarded-For deny all
  24. request_header_access From deny all
  25. request_header_access Via deny all

其中以下几条表示高匿名代理

  1. request_header_access X-Forwarded-For deny all
  2. request_header_access From deny all
  3. request_header_access Via deny all

启动

  1. systemctl restart squid.service

联系我们

0574-55011290

QQ:248687950

邮件:admin@nbhao.org

工作时间:周一至周五,9:00-18:00,节假日休息

QR code