Brad Fitzpatrick
6196b7e658
wgengine/magicsock: change API to not permit disco key changes
...
Generate the disco key ourselves and give out the public half instead.
Fixes #525
2020-07-06 12:10:39 -07:00
Brad Fitzpatrick
fe50cd0c48
ipn, wgengine: plumb NetworkMap down to magicsock
...
Now we can have magicsock make decisions based on tailcfg.Debug
settings sent by the server.
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-06-25 19:14:24 -07:00
Brad Fitzpatrick
19d95e095a
wgengine: fix blank line in interface method comment
2020-06-24 14:10:42 -07:00
Brad Fitzpatrick
53fb25fc2f
all: generate discovery key, plumb it around
...
Not actually used yet.
Updates #483
2020-06-19 12:12:00 -07:00
Dmytro Shynkevych
511840b1f6
tsdns: initial implementation of a Tailscale DNS resolver ( #396 )
...
Signed-off-by: Dmytro Shynkevych <[email protected] >
2020-06-08 18:19:26 -04:00
Brad Fitzpatrick
e6b84f2159
all: make client use server-provided DERP map, add DERP region support
...
Instead of hard-coding the DERP map (except for cmd/tailscale netcheck
for now), get it from the control server at runtime.
And make the DERP map support multiple nodes per region with clients
picking the first one that's available. (The server will balance the
order presented to clients for load balancing)
This deletes the stunner package, merging it into the netcheck package
instead, to minimize all the config hooks that would've been
required.
Also fix some test flakes & races.
Fixes #387 (Don't hard-code the DERP map)
Updates #388 (Add DERP region support)
Fixes #399 (wgengine: flaky tests)
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-05-23 22:31:59 -07:00
David Anderson
9ccbcda612
wgengine/router: rename config.Settings to config.Config, make pointer.
...
Signed-off-by: David Anderson <[email protected] >
2020-05-12 15:58:33 -07:00
David Anderson
72cae5504c
wgengine: generate and plumb router.Settings in from ipn.
...
This saves a layer of translation, and saves us having to
pass in extra bits and pieces of the netmap and prefs to
wgengine. Now it gets one Wireguard config, and one OS
network stack config.
Signed-off-by: David Anderson <[email protected] >
2020-05-12 15:58:33 -07:00
David Anderson
bfdc8175b1
wgengine/router: add a setting to disable SNAT for subnet routes.
...
Part of #320 .
Signed-off-by: David Anderson <[email protected] >
2020-05-11 20:17:13 +00:00
David Anderson
89af51b84d
wgengine: plumb locally advertised subnet routes.
...
With this change, advertising subnet routes configures the
firewall correctly.
Signed-off-by: David Anderson <[email protected] >
2020-05-07 17:48:49 +00:00
David Anderson
1ac570def7
wgengine/router: split out from wgengine.
...
The router implementations are logically separate, with their own API.
Signed-off-by: David Anderson <[email protected] >
2020-04-30 13:31:24 -07:00
Brad Fitzpatrick
3a3b64301e
wgengine: quiet some engine reconfig logging, make more consistent
...
Updates #282
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-04-10 13:53:01 -07:00
Brad Fitzpatrick
322499473e
cmd/tailscaled, wgengine, ipn: add /debug/ipn handler with world state
...
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-03-26 14:26:24 -07:00
Brad Fitzpatrick
2e420ad8b6
wgengine, wgengine/filter: minor doc, style, performance, locking changes
...
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-03-25 08:41:01 -07:00
Avery Pennarun
f53e78e0d5
wgengine: don't lose filter state on filter reconfig.
...
We were abandoning the UDP port LRU every time we got a new packet
filter from tailcontrol, which caused return packets to suddenly stop
arriving.
2020-03-25 04:52:41 -04:00
David Crawshaw
addbdce296
wgengine, ipn: include number of active DERPs in status
...
Use this when making the ipn state transition from Starting to
Running. This way a network of quiet nodes with no active
handshaking will still transition to Active.
Signed-off-by: David Crawshaw <[email protected] >
2020-03-19 17:55:16 +11:00
Brad Fitzpatrick
db31550854
wgengine: don't Reconfig on boring link changes
...
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-03-13 07:45:59 -07:00
Brad Fitzpatrick
eac62ec5ff
ipn, wgengine/magicsock: add ipn.Prefs.DisableDERP bool
...
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-03-04 12:53:37 -08:00
Brad Fitzpatrick
b27d4c017a
magicsock, wgengine, ipn, controlclient: plumb regular netchecks to map poll
...
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-03-04 08:19:45 -08:00
David Crawshaw
d0f697ee07
wgengine: update for wgcfg changes
...
Signed-off-by: David Crawshaw <[email protected] >
2020-02-19 11:44:37 -05:00
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 <[email protected] >
2020-02-17 09:53:17 -08:00
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 <[email protected] >
2020-02-17 08:04:31 -08:00
Brad Fitzpatrick
7e5e32775a
wgengine: flesh out some docs, minor cleanups
...
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-02-12 13:37:45 -08:00
Brad Fitzpatrick
819daf10e2
wgengine: flesh out some docs
...
Signed-off-by: Brad Fitzpatrick <[email protected] >
2020-02-12 13:37:45 -08:00
David Anderson
a07906d1d8
wgengine: make SetRoutesFunc less appealing to use.
...
It exists as a way to glue the mac-specific xcode logic with the OSS
logic, and shouldn't be used by anything but the xcode glue.
2020-02-10 21:40:00 -08:00
Earl Lee
a8d8b8719a
Move Linux client & common packages into a public repo.
2020-02-09 09:32:57 -08:00