wgengine: make Tun optional again, default to fake.

This makes setup more explicit in prod codepaths, without
requiring a bunch of arguments or helpers for tests and
userspace mode.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-03-28 19:25:01 -07:00
parent e18c3a7d84
commit 0fb738760f
3 changed files with 17 additions and 11 deletions

View File

@@ -170,7 +170,8 @@ func startIPNServer(ctx context.Context, logid string) error {
dev.Close()
return nil, err
}
eng, err := wgengine.NewUserspaceEngine(logf, dev, wgengine.Config{
eng, err := wgengine.NewUserspaceEngine(logf, wgengine.Config{
Tun: dev,
Router: r,
ListenPort: 41641,
})