-
-
Save Guojin118/1249a501be043b93d4441d469085d458 to your computer and use it in GitHub Desktop.
Bandwagon(搬瓦工) CentOS 7 安装 shadowsocks-libev 和 kcptun
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
###################### | |
## shadowsocks-libev | |
###################### | |
# install dependencies | |
yum install epel-release -y | |
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y | |
# install shadowsocks-libev | |
cd /etc/yum.repos.d/ | |
wget https://copr.fedoraproject.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo | |
yum update | |
yum install shadowsocks-libev | |
# edit config.json | |
vi /etc/shadowsocks-libev/config.json | |
{ | |
"server":"0.0.0.0", | |
"server_port":8888, | |
"local_port":1080, | |
"password":"xxxxxxxxxxx", | |
"timeout":60, | |
"method":"aes-256-cfb" | |
} | |
# run application on startup | |
systemctl enable shadowsocks-libev | |
systemctl start shadowsocks-libev | |
systemctl status shadowsocks-libev | |
chkconfig shadowsocks-libev on | |
# configure firewall (if needed) | |
firewall-cmd --zone=public --add-port=8888/tcp --permanent | |
firewall-cmd --zone=public --add-port=8888/udp --permanent | |
firewall-cmd --reload | |
# watch log | |
journalctl | grep ss-server | |
###################### | |
## kcptun | |
###################### | |
# install server | |
wget --no-check-certificate https://raw.githubusercontent.com/kuoruan/kcptun_installer/master/kcptun.sh | |
chmod +x ./kcptun.sh | |
./kcptun.sh | |
# configure firewall (if needed) | |
firewall-cmd --zone=public --add-port=29900/udp --permanent | |
firewall-cmd --reload | |
# install client | |
open https://github.com/xtaci/kcptun/releases | |
# create run_client.sh and run_client.plist | |
# run on startup | |
launchctl load run_client.plist | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>kcptun.client</string> | |
<key>KeepAlive</key> | |
<true/> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/bin/sh</string> | |
<string>/path/to/run_client.sh</string> | |
</array> | |
<key>StandardOutPath</key> | |
<string>/path/to/run-out.log</string> | |
<key>StandardErrorPath</key> | |
<string>/path/to/run-out.log</string> | |
</dict> | |
</plist> |
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
/path/to/client_darwin_amd64 --remoteaddr 10.10.10.10:29900 --autoexpire 60 --key "kcptun_password" --crypt "salsa20" --mode "fast2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment