Centos 7 配置 ***
1 借助python安装***
2 配置代理文件
vim /etc/***.json
######################
{
"server": "202.182.120.181",
"server_port": 8989,
"password":"mayjlee08",
"timeout": 300,
"method": "aes-256-cfb"
}
3 配置***代理自启动
vim /etc/systemd/system/***.service
####记得修改ExecStart的内容####
[Unit]
Description=***
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/sslocal -c /etc/***.json
[Install]
WantedBy=multi-user.target
4 启动***代理并验证
#启动
systemctl enable ***.service
systemctl start ***.service
systemctl status ***
#验证,如果正常运行则返回所配置的ip地址
curl --socks5 127.0.0.1:1080 http://httpbin.org/ip
5 由于***是socket5服务,需要使用privoxy将流量转到http/https上
yum install privoxy
#启动privoxy服务
systemctl enable privoxy
systemctl start privoxy
systemctl status privoxy
6 配置privoxy服务
vim /etc/privoxy/config
#找到这两行去掉注释,并且将端口改为1080
listen-address 127.0.0.1:8118
forward-socks5t / 127.0.0.1:1080 .
7 修改/etc/profile,在最后添加
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
###使其生效
source /etc/profile
8 验证能够访问谷歌,则生效
curl www.google.com

浙公网安备 33010602011771号