Brad Fitzpatrick
d488678fdc
cmd/tailscaled, wgengine{,/netstack}: add netstack hybrid mode, add to Windows
...
For #707
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-04-06 21:37:28 -07:00
David Anderson
bc4381447f
net/tstun: return the real interface name at device creation.
...
This is usually the same as the requested interface, but on some
unixes can vary based on device number allocation, and on Windows
it's the GUID instead of the pretty name, since everything relating
to configuration wants the GUID.
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-04-05 22:53:10 -07:00
David Anderson
0fb738760f
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>
2021-03-28 21:45:02 -07:00
David Anderson
93a4aa697c
wgengine: default Router to a no-op router.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-03-28 18:59:48 -07:00
David Anderson
2df8adef9d
wgengine: make the tun.Device required at construction.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-03-27 00:33:09 -07:00
David Anderson
018200aeba
net/tstun: rename from net/tun.
...
We depend on wireguard-go/tun, identical leaf packages can be
confusing in code.
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-03-26 22:31:54 -07:00
David Anderson
44d9929208
wgengine: remove Config.TUNName, require caller to create device.
...
Also factors out device creation and associated OS workarounds to
net/tun.
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-03-26 21:08:11 -07:00
Brad Fitzpatrick
dad10fee9c
Revert "cmd/tailscaled: split package main into main shim + package"
...
This reverts commit b81bd8025b
.
Not needed. See:
https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
2021-03-25 09:06:00 -07:00
Brad Fitzpatrick
82c4cb765c
cmd/tailscaled: split package main into main shim + package
...
So we can empty import the guts of cmd/tailscaled from another
module for go mod tidy reasons.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-03-24 21:23:00 -07:00
David Anderson
793cb131f0
wgengine/router: toggle killswitch when using default routes on windows.
...
Fixes #1398 .
Signed-off-by: David Anderson <danderson@tailscale.com>
2021-03-01 19:37:22 -08:00
Brad Fitzpatrick
ee6475a44d
wgengine: unify NewUserspaceEngine, NewUserspaceEngineAdvanced
...
Also rename EngineConfig to Config to avoid wgengine.EngineConfig
stutter.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-02-27 21:52:24 -08:00
Brad Fitzpatrick
fb6b0e247c
cmd/tailscaled: rename Windows service to just Tailscale
...
Updates #1232
2021-02-05 11:13:34 -08:00
Brad Fitzpatrick
a7562be5e1
cmd/tailscaled: move more of the Windows server setup code into tailscaled
...
Updates #1232
2021-02-05 09:53:54 -08:00
Brad Fitzpatrick
6099ecf7f4
cmd/tailscaled: run as a service on Windows
...
Updates #1232
2021-02-05 08:46:12 -08:00