Question

How to install and run KCPTUN with Shadowsocks on Ubuntu 16.04?

I’m running a DO Ubuntu 16.04 droplet and I want to build and install KCPTUN in conjunction with Shadowsocks to channel traffic from my client through UDP towards my DO server. the problem is that when I download the KCPTUN tar.gz file from GitHub and run build script it makes a lot of dummy tar.gz files for various distributions that are all empty. https://github.com/xtaci/kcptun/blob/master/README.en.md it also displays a lot of errors concerning about the absence of Go lang:

can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_linux_amd64: Cannot stat: No such file or directory
tar: server_linux_amd64: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-linux-amd64-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_linux_386: Cannot stat: No such file or directory
tar: server_linux_386: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-linux-386-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_darwin_amd64: Cannot stat: No such file or directory
tar: server_darwin_amd64: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-darwin-amd64-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_darwin_386: Cannot stat: No such file or directory
tar: server_darwin_386: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-darwin-386-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_windows_amd64.exe: Cannot stat: No such file or directory
tar: server_windows_amd64.exe: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-windows-amd64-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_windows_386.exe: Cannot stat: No such file or directory
tar: server_windows_386.exe: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-windows-386-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_freebsd_amd64: Cannot stat: No such file or directory
tar: server_freebsd_amd64: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-freebsd-amd64-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_freebsd_386: Cannot stat: No such file or directory
tar: server_freebsd_386: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-freebsd-386-20160914.tar.gz
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/client: cannot find package "github.com/xtaci/kcptun/client" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/client (from $GOROOT)
	($GOPATH not set)
can't load package: package github.com/xtaci/kcptun/server: cannot find package "github.com/xtaci/kcptun/server" in any of:
	/usr/lib/go-1.6/src/github.com/xtaci/kcptun/server (from $GOROOT)
	($GOPATH not set)
tar: client_linux_arm*: Cannot stat: No such file or directory
tar: server_linux_arm*: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
8b1ac0b4eff5e6cc2819ed0eb697fb19  kcptun-linux-arm-20160914.tar.gz

I installed the Go lang using apt install golang but nothing changed. I need help on connection KCPTUN to shadowsocks (which is configured and works beautifully).

uname : 4.4.0-36-generic #55-Ubuntu x86_64 x86_64 x86_64 GNU/Linux

please let me know if i can provide any additional info.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I have installed a few instances of this and have got it working with shadowsocks but don’t get much if any speed improvement in my typical circumstances so have given up for now. I think it’s still a bit early though it is very promising. I used the binaries from the GitHub releases instead of compiling the go code myself. You can use a json file like this with the -c option. I would wait though.

{ “listen”: “:38175”, “target”: “SS server or local port put here”, “key”: “this-is-where-you-put-the-key”, “crypt”: “aes”, “mode”: “fast2”, “mtu”: 1350, “sndwnd”: 2048, “rcvwnd”: 2048, “datashard”: 70, “parityshard”: 30, “dscp”: 46, “nocomp”: false, “acknodelay”: false, “nodelay”: 0, “interval”: 40, “resend”: 0, “nc”: 0, “sockbuf”: 4194304, “keepalive”: 10 }