- 安装git :
yum install git -y
- 下载:
git clone https://github.com/jech/polipo.git
cd polipo
(可选)使用发布的版本
git checkout polipo-1.1.1
- 安装:
make all
make install
建立配置文件:
mkdir /opt/polipo
nano /opt/polipo/config
添加如下内容:
touch /var/log/polipo.log
logSyslog = true
socksParentProxy = "localhost:1080"
socksProxyType = socks5
logFile = /var/log/polipo.log
logLevel = 4
proxyAddress = "0.0.0.0"
proxyPort = 8123
chunkHighMark = 50331648
objectHighMark = 16384
serverMaxSlots = 64
serverSlots = 16
serverSlots1 = 32
- 新建启动脚本
vim /usr/lib/systemd/system/polipo.service
[Unit]
Description=polipo web proxy
After=network.target
[Service]
Type=simple
WorkingDirectory=/tmp
User=root
Group=root
ExecStart=/usr/local/sbin/polipo -c /opt/polipo/config
Restart=always
SyslogIdentifier=Polipo
[Install]
WantedBy=multi-user.target
- 打开防火墙:
firewall-cmd --permanent --add-port=8123/tcp
firewall-cmd --reload
- 关闭SELINUX
vi /etc/selinux/config
SELINUX=disable
- 启动:
systemctl start polipo.service
- 开机启动
systemctl enable polipo
Q & S:
make cc : 命令未找到:
yum install gcc -y
yum install gcc-c++ -y
若,make : makeinfo : 命令未找到:
yum install texinfo -y