wgengine, cmd/tailscaled: refactor netstack, forward TCP to hello as demo (#1301)

Updates #707
Updates #504

Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
Naman Sood
2021-02-25 14:18:16 -05:00
committed by GitHub
parent daf6de4f14
commit 517c90d7e5
5 changed files with 274 additions and 152 deletions

View File

@@ -192,9 +192,9 @@ func run() error {
var e wgengine.Engine
if args.fake {
var impl wgengine.FakeImplFunc
var impl wgengine.FakeImplFactory
if args.tunname == "userspace-networking" {
impl = netstack.Impl
impl = netstack.Create
}
e, err = wgengine.NewFakeUserspaceEngine(logf, 0, impl)
} else {