基于centos搭建代理服务器

基于centos搭建代理服务器

第一步:安装pip

下载pip

1
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

执行get-pip.py

1
python get-pip.py

第二步:安装shadowsocks

1
pip install shadowsocks

第三步:配置shadowsocks

1
vi /etc/shadowsocks.json

输入下列内容

1
2
3
4
5
6
7
8
{
"server":"0.0.0.0",
"server_port":50013,
"local_port":1080,
"password":"1234567890",
"timeout":600,
"method":"aes-256-cfb"
}

第四步:将shadowsocks加入系统服务

1
vi /etc/systemd/system/shadowsocks.service

输入下列内容

1
2
3
4
5
6
7
[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target

第五步:启动shadowsocks服务并设置开机自启

1
2
3
4
5
6
7
8
#设置开机自启
systemctl enable shadowsocks

# 启动命令
systemctl start shadowsocks

# 查看状态
systemctl status shadowsocks

linux 使用ssr客户端

安装方法同上,建立配置文件

1
2
3
4
5
6
7
8
{
"server":"0.0.0.0",
"server_port":50013,
"local_port":1080,
"password":"1234567890",
"timeout":600,
"method":"aes-256-cfb"
}
未完待续。。。