diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2020-09-03 15:45:41 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2020-09-07 21:23:21 -0700 |
| commit | d27301638ac40a96b5160bdb72c36a12e4d74c27 (patch) | |
| tree | 2e874c4dc2d7cc6c1f18fba8494b7b9f3f669fb4 /cmd | |
| parent | 468bb3afce28a3b64a7836ff50118616e0e64d82 (diff) | |
| download | tailscale-bradfitz/gvisor_netstack.tar.xz tailscale-bradfitz/gvisor_netstack.zip | |
WIP: playing with using gvisor's netstack for pure userspace TCP/relayingbradfitz/gvisor_netstack
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/tailscaled/tailscaled.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/tailscaled/tailscaled.go b/cmd/tailscaled/tailscaled.go index a9226c0ee..12692c39b 100644 --- a/cmd/tailscaled/tailscaled.go +++ b/cmd/tailscaled/tailscaled.go @@ -29,6 +29,7 @@ import ( "tailscale.com/types/logger" "tailscale.com/wgengine" "tailscale.com/wgengine/magicsock" + "tailscale.com/wgengine/netstack" "tailscale.com/wgengine/router" ) @@ -136,7 +137,11 @@ func run() error { var e wgengine.Engine if args.fake { - e, err = wgengine.NewFakeUserspaceEngine(logf, 0) + impl := netstack.Impl + if args.tunname != "netstack" { + impl = nil + } + e, err = wgengine.NewFakeUserspaceEngine(logf, 0, impl) } else { e, err = wgengine.NewUserspaceEngine(logf, args.tunname, args.port) } |
