Last active
May 28, 2021 10:15
-
-
Save azmodude/3968be00971e98d5e7da45e7f07af29c to your computer and use it in GitHub Desktop.
shadowsock2 install
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
#!/bin/bash | |
# Install shadowsock2 service. | |
# Tested on Fedora34 | |
read -p 'Listening Port (443 recommended): ' ssport | |
read -s -p 'Password: ' sspw | |
echo "SHADOWSOCK_PORT=${ssport}" > /root/.shadowsock.env | |
echo "SHADOWSOCK_PASSWORD=${sspw}" >> /root/.shadowsock.env | |
echo | |
dnf install -y golang-github-dreamacro-shadowsocks2 | |
cat << "EOF" > /etc/systemd/system/shadowsock2.service | |
[Unit] | |
Description=Shadowsock2 Proxy Server | |
[Service] | |
Type=simple | |
EnvironmentFile=/root/.shadowsock.env | |
ExecStart=/usr/bin/go-shadowsocks2 -s ss://AEAD_XCHACHA20_POLY1305:${SHADOWSOCK_PASSWORD}@:${SHADOWSOCK_PORT} -verbose | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
systemctl daemon-reload && systemctl reload-or-restart shadowsock2.service && systemctl enable shadowsock2.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment