-
-
Save ego008/2a6c2d71a6173e0b4230c87cc2afb42c to your computer and use it in GitHub Desktop.
kcptun template
This file contains hidden or 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
HOST=yourhost.com:38989 | |
LISTEN=12345 #example port | |
KEY=your_very_secure_long_long_key | |
echo $HOST $LISTEN $KEY | |
#kill first | |
kill $(ps aux | grep ${LISTEN} | awk '{print $2}'); | |
#main proc | |
while true; do ./client_linux_amd64 -r "${HOST}" -l ":${LISTEN}" --crypt aes --key ${KEY} --mtu 1350 --sndwnd 128 --rcvwnd 1024 --mode fast2 --quiet; sleep 2; done & | |
#watchdog | |
while true; do sleep 3600; kill $(ps aux | grep ${LISTEN} | awk '{print $2}'); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment