#安裝
#!/bin/bash yum install tor yum install epel-release yum install tor yum install privoxy
#編輯設定
vi /etc/privoxy/config
#修改設定
listen-address 0.0.0.0:8118
#關閉防火牆相關
systemctl disable iptables.service systemctl disable iptables systemctl disable firewall.service systemctl disable firewalld.service systemctl stop firewalld.service
#修改limits
vi /etc/security/limits.conf
#新增
* soft nofile 65535 * hard nofile 65535
#修改IPv4設定
vi /etc/sysctl.conf
#新增下列參數
net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.ipv4.tcp_fin_timeout = 10 net.ipv4.tcp_tw_recycle = 1 net.core.netdev_max_backlog = 30000 net.ipv4.tcp_no_metrics_save = 1 net.core.somaxconn = 65535
#套用生效
sysctl -p
#服務啟用
service privoxy start systemctl enable privoxy.service