centos 7 安装 privoxy

 •  Filed under centos, proxy, centos7, privoxy

安装编译工具

yum groupinstall "Development Tools"

下载privoxy最新版

http://sourceforge.net/projects/ijbswa/files/Sources/

编译

tar xzvf privoxy-3.0.23-stable-src.tar.gz
cd privoxy-3.0.23-stable
autoheader
autoconf
./configure      # (--help to see options)
make             # (the make from GNU, sometimes called gmake)

建立账户

sudo useradd privoxy -r -s /usr/sbin/nologin

安装

sudo make install

更改侦听地址

nano /usr/local/etc/privoxy/config

将listen-address值更改为 0.0.0.0:8118
重启

systemctl restart privoxy

打开防火墙端口

firewall-cmd --permanent --add-port=8118/tcp
firewall-cmd --reload

范例配置(使用本地socks5上级代理,本地地址不走代理)

nano /usr/local/etc/privoxy/config

增加

forward-socks5 / 127.0.0.1:12080 .
forward 10.*.*.*/ .
forward 192.168.*.*/ .
forward 127.*.*.*/ .
forward localhost/ .