商务合作加Q:411239339

ss和kcptun启动脚本编写

浏览:483次阅读
没有评论

共计 544 个字符,预计需要花费 2 分钟才能阅读完成。

#!/bin/bash

if [$# -lt 1];then
    echo "$0 start|stop"
    exit 0
fi

SERVER="www.meijubie.com"

start()
{
    echo "Starting..."
    /home/chin/kcptun/client_linux_amd64 -l :12948 -r ${SERVER}:19900 -key hello -mode fast2 -sndwnd 2048 -rcvwnd 2048 &
    /usr/local/bin/sslocal -s 127.0.0.1 -p 12948 -k hello -l 1080 -b 0.0.0.0 -m aes-256-cfb -d start

}
stop()
{
    echo "Stoping..."
    CLIENT_PID=`ps -ef | grep client_linux_amd64 | grep -v grep | awk '{print $2}'`
    kill -9 $CLIENT_PID
    /usr/local/bin/sslocal -s 127.0.0.1 -p 12948 -k hello -l 1080 -b 0.0.0.0 -m aes-256-cfb -d stop

}

case $1 in
    start)
        start
    ;;
    stop)
        stop
    ;;
    *)
        echo "$0 start|stop"
        exit 0
    ;;
esac

exit 0

正文完
扫码赞助
post-qrcode
 0
果子
版权声明:本站原创文章,由 果子 于2018-05-20发表,共计544字。
转载说明:除特殊说明外本站文章皆由果较瘦原创发布,转载请注明出处。