tailscale/wgengine
Brad Fitzpatrick 16a9cfe2f4 wgengine: configure wireguard peers lazily, as needed
wireguard-go uses 3 goroutines per peer (with reasonably large stacks
& buffers).

Rather than tell wireguard-go about all our peers, only tell it about
peers we're actively communicating with. That means we need hooks into
magicsock's packet receiving path and tstun's packet sending path to
lazily create a wireguard peer on demand from the network map.

This frees up lots of memory for iOS (where we have almost nothing
left for larger domains with many users).

We should ideally do this in wireguard-go itself one day, but that'd
be a pretty big change.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-07-24 12:50:15 -07:00
..
filter tsdns: initial implementation of a Tailscale DNS resolver (#396) 2020-06-08 18:19:26 -04:00
magicsock wgengine: configure wireguard peers lazily, as needed 2020-07-24 12:50:15 -07:00
monitor wgengine: fix macos staticcheck errors (#557) 2020-07-14 17:28:02 -06:00
packet all: fix vet warnings 2020-07-16 08:39:38 -07:00
router wgengine/router: support legacy resolvconf 2020-07-23 15:01:46 -04:00
tsdns tsdns: response to type ANY queries 2020-07-14 18:50:07 -04:00
tstun wgengine: configure wireguard peers lazily, as needed 2020-07-24 12:50:15 -07:00
winnet Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
rusage_nowindows.go wgengine: flesh out some docs 2020-02-12 13:37:45 -08:00
rusage_windows.go Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
rusage.go Move "logger" package to under types, now that we have it. 2020-02-14 20:23:05 -08:00
userspace.go wgengine: configure wireguard peers lazily, as needed 2020-07-24 12:50:15 -07:00
watchdog_test.go wgengine: prevent log after exit in watchdog test 2020-07-03 10:52:39 -07:00
watchdog.go wgengine/magicsock: change API to not permit disco key changes 2020-07-06 12:10:39 -07:00
wgengine.go wgengine/magicsock: change API to not permit disco key changes 2020-07-06 12:10:39 -07:00