]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
netstack: introduce new module for gvisor tcp tun adapter
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 20 Jan 2021 23:02:32 +0000 (00:02 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 20 Jan 2021 23:16:59 +0000 (00:16 +0100)
commit1d4eb2727a3ad6086229f45354933e84d85fc4e3
treede1b00c7f44bd3ea4fd021a9bd398cdd7fe5eb76
parent294d3bedf959c9c496aaa877919a762acf07c684
netstack: introduce new module for gvisor tcp tun adapter

The Go linker isn't smart enough to prevent gvisor from being pulled
into modules that use other parts of tun/, due to the types exposed. So,
we put this into its own standalone module.

We use this as an opportunity to introduce some example code as well.

I'm still not happy that this not only clutters this repo's go.sum, but
all the other projects that consume it, but it seems like making a new
module inside of this repo will lead to even greater confusion.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
tun/netstack/examples/http_client.go [new file with mode: 0644]
tun/netstack/examples/http_server.go [new file with mode: 0644]
tun/netstack/tun.go [moved from tun/tun_net.go with 98% similarity]