eycorsican / go-tun2socks

A tun2socks implementation written in Go.
MIT License
1.29k stars 431 forks source link

Remove intermediate buffering and solve the Read blocking issue #150

Open eycorsican opened 3 years ago

oxtoacart commented 3 years ago

I was playing around with this and noticed that sometimes I'd get a panic due to a send on a closed channel. I'll see if I can reproduce and get you more details.

oxtoacart commented 3 years ago

Here's the stack trace for the panic

github.com/eycorsican/go-tun2socks/core.(*tcpConn).Read(0xc000248090, 0xc000151200, 0x5dc, 0x5dc, 0x0, 0x0, 0x0)
    /Users/ox.to.a.cart/gocode/pkg/mod/github.com/eycorsican/go-tun2socks@v1.16.12-0.20201127215618-425fb2eb0eb1/core/tcp_conn.go:206 +0x12b
eycorsican commented 3 years ago

@oxtoacart Thanks for the information.

This is just a quick implementation trying to make the issues in #149 more clear, I'm not surprised there are bugs, it's not going to be merged.