squid代理配置

  1. 安裝Squid
    yum -y update
    yum -y install epel-release
    yum -y update
    yum clean all

    yum -y install squid
    systemctl start squid
    systemctl enable squid   # 開機自啟動
    systemctl status squid   # 查看服務(wù)狀態(tài)
    squid -v   # 查看版本

2.允許不同用戶使用不同的出口IP

    # 安裝生成用戶密碼驗證文件的軟件
    yum -y install httpd-tools
    touch /etc/squid/passwd && chown squid /etc/squid/passwd
    htpasswd /etc/squid/passwd pxuser
    
    # 配置用戶認證信息
        # 選擇的認證方式為basic,認證程序路徑和密碼文件路徑。
        auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd 
        # 認證程序的進程數(shù)
        auth_param basic children 10
        # 認證有效時間
        auth_param basic credentialsttl 4 hours
        # 不區(qū)分大小寫
        auth_param basic casesensitive off


        # 配置不同用戶的出口IP
        acl acl_user1 proxy_auth -i user1
        http_access allow acl_user1
        tcp_outgoing_address 10.10.12.1 acl_user1

        acl acl_user2 proxy_auth -i user2
        http_access allow acl_user2
        tcp_outgoing_address 10.10.12.1 acl_user2

3.設(shè)置代理高匿

    via off
    forwarded_for off  /  forwarded_for delete
    follow_x_forwarded_for deny all


    request_header_access From deny all
    request_header_access Server deny all
    request_header_access WWW-Authenticate deny all
    request_header_access Link deny all
    request_header_access Cache-Control deny all
    request_header_access Proxy-Connection deny all
    request_header_access X-Cache deny all
    request_header_access X-Cache-Lookup deny all
    request_header_access Via deny all
    request_header_access X-Forwarded-For deny all
    request_header_access Pragma deny all
    request_header_access Keep-Alive deny all
  1. 禁用緩存
    cache deny all
    With Squid-2.7, Squid-3.1 and later you can also remove all 'cache_dir' options from your squid.conf to avoid having a cache directory.
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,578評論 19 139
  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 47,275評論 6 342
  • nginx在工作中已經(jīng)有好幾個環(huán)境在使用了,每次都是重新去網(wǎng)上扒博客,各種編譯配置,今天自己也整理一份安裝文檔和n...
    AndyChin閱讀 2,400評論 0 4
  • The quick shall inherit the earth. Fast is better than sl...
    poofee閱讀 894評論 0 1
  • Authorizing Payments 支付授權(quán)處理是支付授權(quán)視圖控制器和它的代理之間的協(xié)力合作的結(jié)果。支付授權(quán)...
    NEWWORLD閱讀 1,556評論 2 0

友情鏈接更多精彩內(nèi)容