Skip to content

Instantly share code, notes, and snippets.

@zeusro
Last active September 19, 2019 16:04
Show Gist options
  • Save zeusro/3299c28b60737b4251c2fae5afa0d8be to your computer and use it in GitHub Desktop.
Save zeusro/3299c28b60737b4251c2fae5afa0d8be to your computer and use it in GitHub Desktop.
Ubuntu
prepare(){
sudo apt update
sudo apt install -y shadowsocks-libev git software-properties-common
# golang
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update -y
sudo apt-get install -y golang-go
# v2ray
git clone https://github.com/shadowsocks/v2ray-plugin.git
cd v2ray-plugin
go build
cp v2ray-plugin /usr/bin
cd ~
# config
cat >/lib/systemd/system/shadowsocks.service << EOF
[Unit]
Description=Shadowsocks-libev Server Service
After=network.target
[Service]
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/config.json -p 80 --plugin v2ray-plugin --plugin-opts "server"
ExecReload=/bin/kill -HUP \$MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable shadowsocks
systemctl start shadowsocks
}
bbr(){
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
./bbr.sh
}
bbr
prepare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment