Created
December 31, 2019 14:05
-
-
Save gardner/bf71868fb62109021ea66c5274c2a4e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt update && apt install python-pip -y && pip install shadowsocks | |
cat << EOF > /etc/shadowsocks/ss.json | |
{ | |
"server": "0.0.0.0", | |
"server_port": "1080", | |
"password":"changeme", | |
"timeout": 300, | |
"method":"aes-256-cfb" | |
"mode": "tcp_only", | |
"fast_open": true, | |
"nameserver": "1.1.1.1" | |
} | |
EOF | |
cat << EOF > /etc/shadowsocks/ss.json | |
{ | |
"server": "12.34.56.78", | |
"server_port": "1080", | |
"password":"changeme", | |
"timeout": 300, | |
"method":"aes-256-cfb", | |
"mode": "tcp_only", | |
"fast_open": true, | |
"nameserver": "1.1.1.1" | |
} | |
EOF | |
systemctl stop ssclient ; systemctl start ssclient ; systemctl status ssclient | |
mkdir -p /usr/lib/systemd/system/ | |
cat << EOF > /usr/lib/systemd/system/ssserver.service | |
[Unit] | |
Description=Daemon to start shadowsocks server | |
Wants=network-online.target | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/ss.json -qq | |
User=nobody | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
mkdir -p /usr/lib/systemd/system/ | |
cat << EOF > /usr/lib/systemd/system/ssclient.service | |
[Unit] | |
Description=Daemon to start shadowsocks server | |
Wants=network-online.target | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/local/bin/sslocal -c /etc/shadowsocks/ss.json -qq | |
User=nobody | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment