64位的kcptunlinux
mkdir kcptun
cd kcptun
wget https://github.com/xtaci/kcptun/releases/download/v20160906/kcptun-linux-amd64-20160906.tar.gz
tar -zxf kcptun-linux-amd64-20160906.tar.gzgit
vi /root/kcptun/start.sh
./server_linux_amd64 -l :29900 -t 127.0.0.1:53 -key 12345653 -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 &github
53與12345653自行修改端口與密碼.net
建立 stop.sh
vi /root/kcptun/stop.sh
寫入如下內容:
#!/bin/sh
PID=`ps -ef | grep server_linux_amd64 | grep -v grep | awk '{print $2}'`
if [[ "" != "$PID" ]]; then
echo "killing $PID"
kill -9 $PID
firest
vi /root/kcptun/restart.shserver
#!/bin/sh
cd /root/kcptun/
echo "Stopping Kcptun..."
sh stop.sh
sh start.sh
echo "Kcptun started."blog
添加開機啓動:
echo "sh /root/kcptun/start.sh" >> /etc/rc.d/rc.localci
32位的kcptunget
mkdir kcptun
cd kcptun
wget https://github.com/xtaci/kcptun/releases/download/v20160906/kcptun-linux-386-20160906.tar.gz
tar -zxf kcptun-linux-386-20160906.tar.gzit
vi /root/kcptun/start.sh
./server_linux_386 -l :29900 -t 127.0.0.1:53 -key 12345653 -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 &
建立 stop.sh
vi /root/kcptun/stop.sh
寫入如下內容:
#!/bin/sh
PID=`ps -ef | grep server_linux_386 | grep -v grep | awk '{print $2}'`
if [[ "" != "$PID" ]]; then
echo "killing $PID"
kill -9 $PID
fi
vi /root/kcptun/restart.sh
#!/bin/sh
cd /root/kcptun/
echo "Stopping Kcptun..."
sh stop.sh
sh start.sh
echo "Kcptun started."
添加開機啓動:
echo "sh /root/kcptun/start.sh" >> /etc/rc.d/rc.local
https://github.com/xtaci/kcptun/releases
http://blog.csdn.net/per_son/article/details/51994542
https://github.com/xtaci/kcptun/releases http://blog.csdn.net/per_son/article/details/51994542