{"action":"created","issue":{"url":"https://api.github.com/repos/xtaci/kcptun/issues/127","repository_url":"https://api.github.com/repos/xtaci/kcptun","labels_url":"https://api.github.com/repos/xtaci/kcptun/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/xtaci/kcptun/issues/127/comments","events_url":"https://api.github.com/repos/xtaci/kcptun/issues/127/events","html_url":"https://github.com/xtaci/kcptun/issues/127","id":171158406,"number":127,"title":"Problem about kcptun over ipv6","user":{"login":"aod321","id":16255068,"avatar_url":"https://avatars.githubusercontent.com/u/16255068?v=3","gravatar_id":"","url":"https://api.github.com/users/aod321","html_url":"https://github.com/aod321","followers_url":"https://api.github.com/users/aod321/followers","following_url":"https://api.github.com/users/aod321/following{/other_user}","gists_url":"https://api.github.com/users/aod321/gists{/gist_id}","starred_url":"https://api.github.com/users/aod321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aod321/subscriptions","organizations_url":"https://api.github.com/users/aod321/orgs","repos_url":"https://api.github.com/users/aod321/repos","events_url":"https://api.github.com/users/aod321/events{/privacy}","received_events_url":"https://api.github.com/users/aod321/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-15T12:10:24Z","updated_at":"2016-08-15T12:31:37Z","closed_at":null,"body":"Sorry to bother you,but I got such problem when I try to use kcptun on my openwrt.\r\nCould you tell me what should I do to fix it?Any help would be  appreciated!\r\nerror log:\r\nroot@OpenWrt:~# kcptun -l :12948 -r [2604:xx]:29900  -key test -mtu 1400 -sndwnd 256 -rcvwnd 2048 -mode fast2 -dscp 46\r\n2016/07/13 10:09:49 version: SELFBUILD\r\n2016/07/13 10:09:50 listening on: [::]:12948\r\n2016/07/13 10:09:50 encryption: aes\r\n2016/07/13 10:09:50 nodelay parameters: 1 20 2 1\r\n2016/07/13 10:09:50 remote address: [2604:XX]:29900\r\n2016/07/13 10:09:50 sndwnd: 256 rcvwnd: 2048\r\n2016/07/13 10:09:50 compression: true\r\n2016/07/13 10:09:50 mtu: 1400\r\n2016/07/13 10:09:50 datashard: 10 parityshard: 3\r\n2016/07/13 10:09:50 acknodelay: false\r\n2016/07/13 10:09:50 dscp: 46\r\n2016/07/13 10:09:50 conn: 1\r\n2016/07/13 10:11:46 stream opened\r\npanic: runtime error: slice bounds out of range\r\n\r\ngoroutine 11 [running]:\r\ngithub.com/golang/snappy.encodeBlock(0x105ae014, 0x12ac8, 0x12ac8, 0x10582000, 0x21c, 0x10000, 0x18bfddac)\r\n\t/opt/mipsgo/src/github.com/golang/snappy/encode_other.go:175 +0x10c4\r\ngithub.com/golang/snappy.Encode(0x105ae012, 0x12aca, 0x12aca, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/golang/snappy/encode.go:37 +0x370\r\ngithub.com/golang/snappy.(*Writer).write(0x1053c6c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/golang/snappy/encode.go:229 +0x280\r\ngithub.com/golang/snappy.(*Writer).Flush(0x1053c6c0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/golang/snappy/encode.go:272 +0xb0\r\nmain.(*compStream).Write(0x1053a660, 0x10626000, 0x21c, 0x8000, 0x21c, 0x0, 0x0)\r\n\t/home/openwrt/kcptun/client/main.go:39 +0x88\r\nbytes.(*Reader).WriteTo(0x10538e20, 0x771ca4a8, 0x1053a660, 0x771ca4c0, 0x10538e20, 0x0, 0x0)\r\n\t/opt/mipsgo/src/bytes/reader.go:131 +0x13c\r\nio.Copy(0x771ca4a8, 0x1053a660, 0x771ca490, 0x10538e20, 0x0, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:354 +0xac\r\ngithub.com/hashicorp/yamux.(*Session).send(0x1053e000)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:387 +0x34c\r\ncreated by github.com/hashicorp/yamux.newSession\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:109 +0x5c0\r\n\r\ngoroutine 1 [IO wait]:\r\nnet.(*pollDesc).Wait(0x10532178, 0x72, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/fd_poll_runtime.go:84 +0x4c\r\nnet.(*pollDesc).WaitRead(0x10532178, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/fd_poll_runtime.go:89 +0x48\r\nnet.(*netFD).accept(0x10532140, 0x0, 0x771c8ad8, 0x1053ab70)\r\n\t/opt/mipsgo/src/net/fd_unix.go:419 +0x3dc\r\nnet.(*TCPListener).AcceptTCP(0x1051c7b8, 0x1051c3d8, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/tcpsock_posix.go:234 +0x58\r\nmain.func·004(0x105008c0, 0x0, 0x0)\r\n\t/home/openwrt/kcptun/client/main.go:267 +0x19ac\r\nreflect.Value.call(0x1f1840, 0x288a88, 0x13, 0x23da48, 0x4, 0x10529b6c, 0x1, 0x1, 0x0, 0x0, ...)\r\n\t/opt/mipsgo/src/reflect/value.go:419 +0xff0\r\nreflect.Value.Call(0x1f1840, 0x288a88, 0x13, 0x10529b6c, 0x1, 0x1, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/reflect/value.go:296 +0xb0\r\ngithub.com/urfave/cli.HandleAction(0x1f1840, 0x288a88, 0x105008c0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/urfave/cli/app.go:485 +0x27c\r\ngithub.com/urfave/cli.(*App).Run(0x1055c000, 0x1050a000, 0x11, 0x11, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/urfave/cli/app.go:244 +0x9e0\r\nmain.main()\r\n\t/home/openwrt/kcptun/client/main.go:283 +0xff4\r\n\r\ngoroutine 5 [select]:\r\ngithub.com/xtaci/kcp-go.(*UDPSession).updateTask(0x1050a1b0)\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:429 +0x2e0\r\ncreated by github.com/xtaci/kcp-go.newUDPSession\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:104 +0x5fc\r\n\r\ngoroutine 6 [runnable]:\r\ngithub.com/xtaci/kcp-go.(*UDPSession).outputTask(0x1050a1b0)\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:336 +0x1804\r\ncreated by github.com/xtaci/kcp-go.newUDPSession\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:105 +0x62c\r\n\r\ngoroutine 7 [select]:\r\ngithub.com/xtaci/kcp-go.(*UDPSession).readLoop(0x1050a1b0)\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:535 +0x578\r\ncreated by github.com/xtaci/kcp-go.newUDPSession\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:107 +0x668\r\n\r\ngoroutine 9 [IO wait]:\r\nnet.(*pollDesc).Wait(0x105330b8, 0x72, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/fd_poll_runtime.go:84 +0x4c\r\nnet.(*pollDesc).WaitRead(0x105330b8, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/fd_poll_runtime.go:89 +0x48\r\nnet.(*netFD).readFrom(0x10533080, 0x10595800, 0x800, 0x800, 0x0, 0x0, 0x0, 0x771c8ad8, 0x1053aad4)\r\n\t/opt/mipsgo/src/net/fd_unix.go:269 +0x418\r\nnet.(*UDPConn).ReadFromUDP(0x1051c3f0, 0x10595800, 0x800, 0x800, 0x4c, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/udpsock_posix.go:67 +0x108\r\ngithub.com/xtaci/kcp-go.(*UDPSession).receiver(0x1050a1b0, 0x10532280)\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:516 +0x108\r\ncreated by github.com/xtaci/kcp-go.(*UDPSession).readLoop\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:532 +0x84\r\n\r\ngoroutine 10 [select]:\r\ngithub.com/xtaci/kcp-go.(*UDPSession).Read(0x1050a1b0, 0x105d2000, 0x4, 0x12ace, 0xc, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:169 +0x854\r\nio.ReadAtLeast(0x771ca1e0, 0x1050a1b0, 0x105d2000, 0x4, 0x12ace, 0x4, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:298 +0x118\r\nio.ReadFull(0x771ca1e0, 0x1050a1b0, 0x105d2000, 0x4, 0x12ace, 0x10534800, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:316 +0x6c\r\ngithub.com/golang/snappy.(*Reader).readFull(0x105322c0, 0x105d2000, 0x4, 0x12ace, 0x1, 0x1)\r\n\t/opt/mipsgo/src/github.com/golang/snappy/decode.go:108 +0x6c\r\ngithub.com/golang/snappy.(*Reader).Read(0x105322c0, 0x10530000, 0x1000, 0x1000, 0xc, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/golang/snappy/decode.go:128 +0x1bc\r\nmain.(*compStream).Read(0x1053a660, 0x10530000, 0x1000, 0x1000, 0xc, 0x0, 0x0)\r\n\t/home/openwrt/kcptun/client/main.go:34 +0x5c\r\nbufio.(*Reader).fill(0x1053c720)\r\n\t/opt/mipsgo/src/bufio/bufio.go:97 +0x1fc\r\nbufio.(*Reader).Read(0x1053c720, 0x1053a130, 0xc, 0xc, 0x105387e0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/bufio/bufio.go:174 +0x25c\r\nio.ReadAtLeast(0x771ca2a8, 0x1053c720, 0x1053a130, 0xc, 0xc, 0xc, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:298 +0x118\r\nio.ReadFull(0x771ca2a8, 0x1053c720, 0x1053a130, 0xc, 0xc, 0xc, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:316 +0x6c\r\ngithub.com/hashicorp/yamux.(*Session).recvLoop(0x1053e000, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:418 +0x14c\r\ngithub.com/hashicorp/yamux.(*Session).recv(0x1053e000)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:406 +0x38\r\ncreated by github.com/hashicorp/yamux.newSession\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:108 +0x594\r\n\r\ngoroutine 12 [select]:\r\ngithub.com/hashicorp/yamux.(*Session).keepalive(0x1053e000)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:302 +0x23c\r\ncreated by github.com/hashicorp/yamux.newSession\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:111 +0x5fc\r\n\r\ngoroutine 15 [select]:\r\nmain.handleClient(0x771ca2f8, 0x1051c3d8, 0x771ca318, 0x10536080)\r\n\t/home/openwrt/kcptun/client/main.go:75 +0x65c\r\ncreated by main.func·004\r\n\t/home/openwrt/kcptun/client/main.go:278 +0x1cdc\r\n\r\ngoroutine 16 [select]:\r\ngithub.com/hashicorp/yamux.(*Stream).Read(0x10536080, 0x1061e000, 0x8000, 0x8000, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/stream.go:125 +0x458\r\nio.Copy(0x771ca398, 0x1051c448, 0x771ca350, 0x10536080, 0x0, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:362 +0x208\r\nnet.genericReadFrom(0x771ca338, 0x1051c3d8, 0x771ca350, 0x10536080, 0x0, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/net.go:404 +0xb4\r\nnet.(*TCPConn).ReadFrom(0x1051c3d8, 0x771ca350, 0x10536080, 0x771ca380, 0x1051c3d8, 0x0, 0x0)\r\n\t/opt/mipsgo/src/net/tcpsock_posix.go:72 +0x118\r\nio.Copy(0x771ca338, 0x1051c3d8, 0x771ca350, 0x10536080, 0x0, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:358 +0x154\r\nmain.func·001()\r\n\t/home/openwrt/kcptun/client/main.go:64 +0xd8\r\ncreated by main.handleClient\r\n\t/home/openwrt/kcptun/client/main.go:66 +0x448\r\n\r\ngoroutine 17 [select]:\r\ngithub.com/hashicorp/yamux.(*Session).waitForSendErr(0x1053e000, 0x1053ab10, 0xc, 0xc, 0x771ca490, 0x10538e20, 0x10616300, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/session.go:338 +0x330\r\ngithub.com/hashicorp/yamux.(*Stream).write(0x10536080, 0x10626000, 0x21c, 0x8000, 0x61248, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/stream.go:183 +0x594\r\ngithub.com/hashicorp/yamux.(*Stream).Write(0x10536080, 0x10626000, 0x21c, 0x8000, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/github.com/hashicorp/yamux/stream.go:139 +0x158\r\nio.Copy(0x771ca430, 0x10536080, 0x771ca448, 0x1051c3d8, 0x0, 0x0, 0x0, 0x0)\r\n\t/opt/mipsgo/src/io/io.go:364 +0x288\r\nmain.func·002()\r\n\t/home/openwrt/kcptun/client/main.go:70 +0xd8\r\ncreated by main.handleClient\r\n\t/home/openwrt/kcptun/client/main.go:72 +0x578"},"comment":{"url":"https://api.github.com/repos/xtaci/kcptun/issues/comments/239790756","html_url":"https://github.com/xtaci/kcptun/issues/127#issuecomment-239790756","issue_url":"https://api.github.com/repos/xtaci/kcptun/issues/127","id":239790756,"user":{"login":"xtaci","id":2346725,"avatar_url":"https://avatars.githubusercontent.com/u/2346725?v=3","gravatar_id":"","url":"https://api.github.com/users/xtaci","html_url":"https://github.com/xtaci","followers_url":"https://api.github.com/users/xtaci/followers","following_url":"https://api.github.com/users/xtaci/following{/other_user}","gists_url":"https://api.github.com/users/xtaci/gists{/gist_id}","starred_url":"https://api.github.com/users/xtaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtaci/subscriptions","organizations_url":"https://api.github.com/users/xtaci/orgs","repos_url":"https://api.github.com/users/xtaci/repos","events_url":"https://api.github.com/users/xtaci/events{/privacy}","received_events_url":"https://api.github.com/users/xtaci/received_events","type":"User","site_admin":false},"created_at":"2016-08-15T12:31:36Z","updated_at":"2016-08-15T12:31:36Z","body":"try add -nocomp to both sides"}}
{"actor":{"display_login":"xtaci"}}