David Anderson
4c61ebacf4
wgengine: move DNS configuration out of wgengine/router.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
fcfc0d3a08
net/dns: remove ManagerConfig, pass relevant args directly.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
0a84aaca0a
wgengine/router: remove unused wireguard *Device argument.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
672731ac6f
many: gofmt.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
9f7f2af008
wgengine/router/dns: move to net/dns.
...
Preparation for merging the APIs and whatnot.
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
Denton Gentry
04e72f95cc
wgengine/router: add OpenBSD IPv6 support.
...
Similar to FreeBSD in https://github.com/tailscale/tailscale/issues/1307 ,
add IPv6 addresses with a prefix length of 48.
Fixes https://github.com/tailscale/tailscale/issues/1372
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
5 years ago
Josh Bleecher Snyder
2fe770ed72
all: replace wgcfg.IP and wgcfg.CIDR with netaddr types
...
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
5 years ago
Brad Fitzpatrick
6d14678009
wgengine/router: remove unnecessary newlines in log.Printf formats
6 years ago
Dmytro Shynkevych
28e52a0492
all: dns refactor, add Proxied and PerDomain flags from control ( #615 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago
Dmytro Shynkevych
30bbbe9467
wgengine/router: dns: unify on *BSD, multimode on Linux, Magic DNS ( #536 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago
David Anderson
9ccbcda612
wgengine/router: rename config.Settings to config.Config, make pointer.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
b01db109f5
wgengine/router: use inet.af/netaddr, not wgcfg.CIDR.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
b8f01eed34
wgengine/router: remove wireguard-go config from settings.
...
Instead, pass in only exactly the relevant configuration pieces
that the OS network stack cares about.
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
8861bb5a19
wgengine/router: alter API to support multiple addrs, and use on linux.
...
FreeBSD and OpenBSD will error out with a complaint if we pass >1 address
right now, but we don't yet so that's okay.
6 years ago
David Anderson
1ac570def7
wgengine/router: split out from wgengine.
...
The router implementations are logically separate, with their own API.
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
Martin Baillie
8ae3ba0cf5
wgengine: define default tunname for each platform
...
The device name "tailscale0" will be used for all platforms except for
OpenBSD where "tun" is enforced by the kernel. `CreateTUN()` in
`wireguard-go` will select the next available "tunX" device name on the
OpenBSD system.
Signed-off-by: Martin Baillie <martin@baillie.email>
6 years ago
Martin Baillie
a9bff99a9b
wgengine: add OpenBSD router DNS update handling
...
Also removes validated TODO comments.
Signed-off-by: Martin Baillie <martin@baillie.email>
6 years ago
David Crawshaw
45d687e213
wgengine: fix build on linux/freebsd/openbsd/windows
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
wardn
5d79530caa
wgengine: create freebsd-specific implementation
...
Signed-off-by: wardn <wardn@users.noreply.github.com>
6 years ago
Brad Fitzpatrick
7f5e3febe5
wgengine: move link monitor to be owned by the engine, not the router
...
And make the monitor package portable with no-op implementations on
unsupported operating systems.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
79295b1138
wgengine: simplify, change some signatures
...
* make RouterGen return an error, not take both tunname and tundev
* also remove RouteGen taking a wireguard/device.Device; currently unused
* remove derp parameter (it'll work differently)
* unexport NewUserspaceRouter in per-OS impls, add documented wrapper
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
2896be60db
Move "logger" package to under types, now that we have it.
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
wardn
58ce50389e
wgengine: build for freebsd
...
Signed-off-by: wardn <wardn@users.noreply.github.com>
6 years ago
David Anderson
36f5433476
wgengine: fix the build on darwin, windows, openbsd.
...
7e5e3277 changed the Router interface definition, but forgot to
fix up these platform files.
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
David Anderson
5c2deb66be
wgengine: remove MTU TODO.
...
The MTU is currently set when creating the tun device,
elsewhere in the code. Maybe someday we'll want some kind
of per-platform MTU configuration here, but not in the
short-medium term.
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
David Anderson
afa83358f7
wgenging: use logger.Logf type in openbsd router.
...
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
Martin Baillie
15f8c8dde4
wgengine: add initial rough OpenBSD implementation
...
Signed-off-by: Martin Baillie <martin@baillie.email>
6 years ago