知识共享许可协议
本作品采用知识共享署名-非商业性使用-禁止演绎 3.0 未本地化版本许可协议进行许可。

Squid On Debian

安装
  • 包安装

    apt-get install squid3
    
  • 源码安装

    apt-get install gcc g++ make libssl-dev
    
    wget http://www.squid-cache.org/Versions/v3/3.4/squid-3.4.5.tar.gz
    tar zxvf squid-3.4.5.tar.gz
    cd squid-3.4.5
    
    declare -x CPPFLAGS="-I../libltdl"
    
    ./configure --enable-linux-netfilter \
    --with-filedescriptors=65536 --with-large-files \
    --prefix=/usr --localstatedir=/var \
    --libexecdir=${prefix}/lib/squid --srcdir=. \
    --datadir=${prefix}/share/squid --sysconfdir=/etc/squid3
    
    make && make install
    
配置
    vim /etc/squid3/squid.conf 

    http_access allow all
    http_port 8080
    request_header_access Referer deny all
    request_header_access X-Forwarded-For deny all
    request_header_access Via deny all
    request_header_access Cache-Control deny all
    visible_hostname proxy.yhz.me
    forwarded_for off
重启
    /etc/init.d/squid3 restart