Skip to content

Releases: xtaci/kcptun

Fix "connect: network is unreachable"

19 Sep 02:54
Compare
Choose a tag to compare

Fix the problem below:

2016/09/18 20:21:21 dial udp **********:80: connect: network is unreachable
net.DialUDP
github.com/xtaci/kcp-go.DialWithOptions
    /Users/xtaci/.godeps/src/github.com/xtaci/kcp-go/sess.go:832
main.main.func1.1
...

addressed by waiting until a connection is created.

$ go version
go version go1.7.1 darwin/amd64
09aea30
xtaci/kcp-go@1fb16b3
xtaci/smux@bc68dab

MD5 (kcptun-linux-amd64-20160919.tar.gz) = 37323b632184240bd7f0d2c319524686
MD5 (kcptun-linux-386-20160919.tar.gz) = e16da92bd14041609cbf8b2385198ce9
MD5 (kcptun-darwin-amd64-20160919.tar.gz) = c5b65645f7e53e3943fb62e946fe1aea
MD5 (kcptun-darwin-386-20160919.tar.gz) = 3473b32f8ceaaf3923204a439c5a2826
MD5 (kcptun-windows-amd64-20160919.tar.gz) = 16f8201310fa5f09fbe2333f09942146
MD5 (kcptun-windows-386-20160919.tar.gz) = 734d57fc138313118625e70cdd71324f
MD5 (kcptun-freebsd-amd64-20160919.tar.gz) = a27726e60f0dc53393855dedc2c8d4db
MD5 (kcptun-freebsd-386-20160919.tar.gz) = 5ff7d5b57974a752b92e11722cdd6281
MD5 (kcptun-linux-arm-20160919.tar.gz) = b66faa598612df499580cfdfd0a36d3d

SMUX optimize-II

12 Sep 03:14
Compare
Choose a tag to compare
  1. faster stream.Write() in smux
  2. api optimize in kcp-go

$ go version
go version go1.7.1 darwin/amd64

kcptun : 3127b2d
kcp-go: xtaci/kcp-go@6610d52
smux: xtaci/smux@82139ae

MD5 (kcptun-linux-amd64-20160912.tar.gz) = e460751bd95ade13810a92e59d6bf26d
MD5 (kcptun-linux-386-20160912.tar.gz) = e3d82630fe8c78e36b6b7959f515d819
MD5 (kcptun-darwin-amd64-20160912.tar.gz) = c2f78171e0703228f0a29fac435011bf
MD5 (kcptun-darwin-386-20160912.tar.gz) = 8b0006fd1326f25976f00beaa89ec84d
MD5 (kcptun-windows-amd64-20160912.tar.gz) = 02895382d20638f8ab54cc28daddd614
MD5 (kcptun-windows-386-20160912.tar.gz) = 2dd3fcd02cd85528027df2bd92c3bb81
MD5 (kcptun-freebsd-amd64-20160912.tar.gz) = ccd31d73e39bfcb2ed463c4c68b468a5
MD5 (kcptun-freebsd-386-20160912.tar.gz) = 562e804a67e17c219e771edf94265027
MD5 (kcptun-linux-arm-20160912.tar.gz) = 66559ed463297126408e5cc3490b0c25

SMUX optimize!

06 Sep 05:13
Compare
Choose a tag to compare
  1. memory allocation reduce in smux.
  2. fix a possible leak in smux.
  3. a full lint for the source codes.

2016-09-06 1 21 46

$ go version
go version go1.7 darwin/amd64

kcptun : 3127b2d
kcp-go: xtaci/kcp-go@fdc1712
smux: xtaci/smux@f78c306

MD5 (kcptun-linux-amd64-20160906.tar.gz) = 77723cd673e5e03b64d4973a9a54605b
MD5 (kcptun-linux-386-20160906.tar.gz) = 72b572b38fdc625294783a58be978b05
MD5 (kcptun-darwin-amd64-20160906.tar.gz) = 700500b2a802e3fda2285f5cda508f40
MD5 (kcptun-darwin-386-20160906.tar.gz) = b09a9cfd7bfe4231b22f02b45ecd38ec
MD5 (kcptun-windows-amd64-20160906.tar.gz) = 0943014cdb9f4555bad35eb42702b538
MD5 (kcptun-windows-386-20160906.tar.gz) = 2e7ddfcdb606cf5dcda0eba14839303b
MD5 (kcptun-freebsd-amd64-20160906.tar.gz) = 6ecf96c6e8f915db1d9ae3cd9604bffe
MD5 (kcptun-freebsd-386-20160906.tar.gz) = 553cefa3a801d960a4ddf2999af03001
MD5 (kcptun-linux-arm-20160906.tar.gz) = 313f2e27d9195fe2b950cf93e0b83cee

SMUX Powered!

02 Sep 10:02
Compare
Choose a tag to compare

Replaced original yamux with smux.

smux provides a _Token bucket_ controlled receiving, which leads to smoother bandwidth graph. (see smux here) and lower memory footprint.

2016-09-06 10 31 43

_Warning: SMUX is incompatible with all previous releases, you have to upgrade both client & server_.

Issues about SMUX can be found & discussed here : #168

compiler: go version go1.7 darwin/amd64
kcptun version: 3db63cd

smux version: xtaci/smux@f4d95a8

kcp-go version: xtaci/kcp-go@108b5ca

MD5 (kcptun-linux-amd64-20160904.tar.gz) = 4c8118d27b5658e9dfa9f1a1ebf89a23
MD5 (kcptun-linux-386-20160904.tar.gz) = 33ad69223a68650986b6e98dbe5599e5
MD5 (kcptun-darwin-amd64-20160904.tar.gz) = 2715ed67a5e1d11e8f3e9b988b44ef27
MD5 (kcptun-darwin-386-20160904.tar.gz) = edab932a2c2d8fc42bb9cf2b20a87bfe
MD5 (kcptun-windows-amd64-20160904.tar.gz) = 26d7f7ff2ed89dac368e296dac656558
MD5 (kcptun-windows-386-20160904.tar.gz) = 7456cd01c09bb0c1369b5af3954287ee
MD5 (kcptun-freebsd-amd64-20160904.tar.gz) = 5bd55bec45e3a1c2ceb2e3becd5d6029
MD5 (kcptun-freebsd-386-20160904.tar.gz) = ca8c99d88eca2afda03c82df626e56d0
MD5 (kcptun-linux-arm-20160904.tar.gz) = 9e47e31b32988aa3b1dc5aca80851bba

support -c flag for json config

30 Aug 07:57
Compare
Choose a tag to compare

-c config.json to apply json configuration file.

example client.json:

{
    "localaddr": ":12948",
    "remoteaddr": "vps:29900",
    "key": "ahufr6qedR",
    "crypt": "salsa20",
    "mode": "fast2",
    "conn": 1,
    "autoexpire": 60,
    "mtu": 1350,
    "sndwnd": 128,
    "rcvwnd": 1024,
    "datashard": 70,
    "parityshard": 30,
    "dscp": 46,
    "nocomp": false,
    "acknodelay": false,
    "nodelay": 0,
    "interval": 40,
    "resend": 0,
    "nc": 0,
    "sockbuf": 4194304,
    "keepalive": 10
}

example server.json

{
    "listen": ":29900",
    "target": "127.0.0.1:12948",
    "key": "ahufr6qedR",
    "crypt": "salsa20",
    "mode": "fast2",
    "mtu": 1350,
    "sndwnd": 1024,
    "rcvwnd": 1024,
    "datashard": 70,
    "parityshard": 30,
    "dscp": 46,
    "nocomp": false,
    "acknodelay": false,
    "nodelay": 0,
    "interval": 40,
    "resend": 0,
    "nc": 0,
    "sockbuf": 4194304,
    "keepalive": 10
}
MD5 (kcptun-linux-amd64-20160830.tar.gz) = 1ad86a3d8fd9fe03601f348ee12eb0df
MD5 (kcptun-linux-386-20160830.tar.gz) = eb3d8608ebdcf43daa8f40fdd008608a
MD5 (kcptun-darwin-amd64-20160830.tar.gz) = c72dd92ff4c5a0b947d89e207ae3cb59
MD5 (kcptun-darwin-386-20160830.tar.gz) = 2212f818e9a5b984db46b3926affc747
MD5 (kcptun-windows-amd64-20160830.tar.gz) = 6cc050aa9b11cd84c58f618350c479c8
MD5 (kcptun-windows-386-20160830.tar.gz) = 3403e25d2d3ae3e2be2eeb6b926ebf00
MD5 (kcptun-freebsd-amd64-20160830.tar.gz) = f455d148bacf861ee0c3efaa403cc813
MD5 (kcptun-freebsd-386-20160830.tar.gz) = 3f656c7f27afed0e6202124351925117
MD5 (kcptun-linux-arm-20160830.tar.gz) = 5573a5053986878696ad35509fc4bf03

autoexpire

26 Aug 05:09
Compare
Choose a tag to compare

autoexpire

  1. control yamux recvBuf size & window update.
  2. add option -autoexpire to client, to establish auto-reconnecting after expired(already opened streams are keeped)

eg: client_darwin_amd64 -r ..... -autoexpire 60 will establish a re-connection after 1 minutes.

MD5 (kcptun-linux-amd64-20160826.tar.gz) = 873f5b483a826145614cc5bdfb2b0e00
MD5 (kcptun-linux-386-20160826.tar.gz) = bf93afd694ddddde526aebac6ef0441a
MD5 (kcptun-darwin-amd64-20160826.tar.gz) = f82a9fe4652a5eba4de688d04d2d589d
MD5 (kcptun-darwin-386-20160826.tar.gz) = cc129e96d464cd7b34a8b40f6c49bb4a
MD5 (kcptun-windows-amd64-20160826.tar.gz) = 08f65d88436fff7ba454cddd046f7bab
MD5 (kcptun-windows-386-20160826.tar.gz) = 0bbcb3e8a7897b0c2d3f8797ec9febca
MD5 (kcptun-freebsd-amd64-20160826.tar.gz) = 101b5fd287218cbf2baaf6de019d3983
MD5 (kcptun-freebsd-386-20160826.tar.gz) = a80309360ca5acca40523bead62be8d3
MD5 (kcptun-linux-arm-20160826.tar.gz) = 31c61f1286a46f84ebc985e7073bb614

Disable RTO backoff when nc is set to 1

23 Aug 13:15
Compare
Choose a tag to compare

Disable RTO backoff when nc is set to 1

MD5 (kcptun-linux-amd64-20160823.tar.gz) = 338a519621bd88410d580160a1825a39
MD5 (kcptun-linux-386-20160823.tar.gz) = 20a74e757a2773e4be78d405db44faff
MD5 (kcptun-darwin-amd64-20160823.tar.gz) = 18de2fd625f7cbbfff38bf0c93234289
MD5 (kcptun-darwin-386-20160823.tar.gz) = 5c36b7a19cf19d1eeea778c97efa45bb
MD5 (kcptun-windows-amd64-20160823.tar.gz) = 35820143a8a4e31eb4448e263e32aa98
MD5 (kcptun-windows-386-20160823.tar.gz) = 1e3a94e872fa0bed6068787714f0cb7d
MD5 (kcptun-freebsd-amd64-20160823.tar.gz) = 9a3eff252f67550360b24fce89e38417
MD5 (kcptun-freebsd-386-20160823.tar.gz) = c1101fb8c84b735933f152939dae1a69
MD5 (kcptun-linux-arm-20160823.tar.gz) = 1e5272862a40f0bdc4e21d70ee3d0fb1

the missing encryption algorithms #2

20 Aug 07:17
Compare
Choose a tag to compare

added support for salsa20 , twofish , xtea cryptos.
P.S. salsa20 is really lighting fast.

(Update@21:16 0820: hashicorp/yamux#39, try to fix i/o deadline problem)

Benchmarks:

$ go test -bench . -run=^$
BenchmarkAES128-4         200000         11174 ns/op
BenchmarkAES192-4         100000         12647 ns/op
BenchmarkAES256-4         100000         13452 ns/op
BenchmarkTEA-4             50000         26966 ns/op
BenchmarkSimpleXOR-4     3000000           432 ns/op
BenchmarkBlowfish-4        30000         48540 ns/op
BenchmarkNone-4         20000000           108 ns/op
BenchmarkCast5-4           30000         59313 ns/op
BenchmarkTripleDES-4        2000        856720 ns/op
BenchmarkTwofish-4         20000         66519 ns/op
BenchmarkXTEA-4            20000         77909 ns/op
BenchmarkSalsa20-4        300000          4980 ns/op
PASS
ok      github.com/xtaci/kcp-go 23.007s
MD5 (kcptun-linux-amd64-20160820.tar.gz) = 93ed244cc735dcf8539795e2879760e5
MD5 (kcptun-linux-386-20160820.tar.gz) = 92e89dbfc3cbbe83e5224d0850df654f
MD5 (kcptun-darwin-amd64-20160820.tar.gz) = 94687e4562393b82b26ed4f6d8df3721
MD5 (kcptun-darwin-386-20160820.tar.gz) = 6bbd5b4a7f5c0fd57c4968cb8fd2c907
MD5 (kcptun-windows-amd64-20160820.tar.gz) = 06f0c25545444b098b384375929e53ea
MD5 (kcptun-windows-386-20160820.tar.gz) = 12d916d02dfdd74dbf7a5e8bf713ad14
MD5 (kcptun-freebsd-amd64-20160820.tar.gz) = 9377cf860db447326d0e9a705065c285
MD5 (kcptun-freebsd-386-20160820.tar.gz) = 6478f51603aca99989a93d7300c695aa
MD5 (kcptun-linux-arm-20160820.tar.gz) = a8a61fb874c55631696faa5fd38e85a0

the missing encryption algorithms

19 Aug 05:30
Compare
Choose a tag to compare
  1. add support for blowfish, cast5, 3des encryption algorithms
  2. change yamux keepalive timeout to 10s
MD5 (kcptun-linux-amd64-20160819.tar.gz) = 623d6e4805514a85490533b43006893c
MD5 (kcptun-linux-386-20160819.tar.gz) = 9989faf00b59009e27b26c4059211709
MD5 (kcptun-darwin-amd64-20160819.tar.gz) = 46b3fbfe4c470b27d385169c37deb57f
MD5 (kcptun-darwin-386-20160819.tar.gz) = 56e01abc72997bc9de27bb39c3cb6396
MD5 (kcptun-windows-amd64-20160819.tar.gz) = 54d440a02beede900816a17c48e3abc2
MD5 (kcptun-windows-386-20160819.tar.gz) = c8a05265b854b7f79008008f3f3f546a
MD5 (kcptun-freebsd-amd64-20160819.tar.gz) = ff36cae4b4a10b1bd9b72bd6586bb67d
MD5 (kcptun-freebsd-386-20160819.tar.gz) = e07e9233fb2f79acf9a214b531afe80b
MD5 (kcptun-linux-arm-20160819.tar.gz) = 1d884fc64a6392d53b05fe874b6f9d22

re-compiled with golang 1.7 stable

16 Aug 08:49
Compare
Choose a tag to compare

re-compiled with golang 1.7 stable.
add aes-128, aes-192 encryptions.

golang 1.7 稳定版重制。
增加 aes-128, aes-192加密

(Update 20160818: revert a minor unstable changes, if you feel something strange, please re-download. )

MD5 (kcptun-linux-amd64-20160816.tar.gz) = 52cd6456b54cce01627e629767dc9deb
MD5 (kcptun-linux-386-20160816.tar.gz) = 20573d91391e38f48e97f32f0ffc8a34
MD5 (kcptun-darwin-amd64-20160816.tar.gz) = d0b272376029f9ae518ae05ff0afb727
MD5 (kcptun-darwin-386-20160816.tar.gz) = 9acc1ad52c335fe7f04c967d10104b1c
MD5 (kcptun-windows-amd64-20160816.tar.gz) = a2c5563ab2053976441d5a7bbffa98c2
MD5 (kcptun-windows-386-20160816.tar.gz) = f709eb7c813b586a5fdb24ee07e31df0
MD5 (kcptun-freebsd-amd64-20160816.tar.gz) = 0b3417ffc9c4ff418a14a0f76871338e
MD5 (kcptun-freebsd-386-20160816.tar.gz) = 9e367205d268a51794ce5e3310584c53
MD5 (kcptun-linux-arm-20160816.tar.gz) = 16ffab9f9a0084ae4141a9648e4b2cfc