Releases: xtaci/kcptun
add -log option
- add -log option to redirect logs to files, eg:
-log kcptun.log
see issue: #199
- fixed a potential race in smux
$ go version
go version go1.7.1 darwin/amd64
e8e3e5a
xtaci/kcp-go@1fb16b3
xtaci/smux@9f2b528
MD5 (kcptun-linux-amd64-20160922.tar.gz) = f82d095829c89f088aad5bb6bcaea7fb
MD5 (kcptun-linux-386-20160922.tar.gz) = 3343f7f44abe86206266b53272b0a684
MD5 (kcptun-darwin-amd64-20160922.tar.gz) = 62e3f880d8c7b209fa80b6762a932509
MD5 (kcptun-darwin-386-20160922.tar.gz) = f80b74c9361fbb7dc3c852b3844e76da
MD5 (kcptun-windows-amd64-20160922.tar.gz) = 729ac873a30a23144912a57fc253e40b
MD5 (kcptun-windows-386-20160922.tar.gz) = d76ff17d59397cdf33ffd4fe248ec8c6
MD5 (kcptun-freebsd-amd64-20160922.tar.gz) = 0f267ee40605177e58d8cd13cd6decde
MD5 (kcptun-freebsd-386-20160922.tar.gz) = ec3437df126cba38fc8b7338a30156c7
MD5 (kcptun-linux-arm-20160922.tar.gz) = 8847c88c5e89290cc26aafe041dd2248
Fix "connect: network is unreachable"
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
- faster stream.Write() in smux
- api optimize in kcp-go
$ go version
go version go1.7.1 darwin/amd64kcptun : 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!
$ go version
go version go1.7 darwin/amd64kcptun : 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!
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.
_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: 3db63cdsmux 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
-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
autoexpire
- control yamux recvBuf size & window update.
- 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
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
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
- add support for
blowfish, cast5, 3des
encryption algorithms - 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