tailscale/wgengine
Brad Fitzpatrick bd90781b34 ipn/ipnlocal, wgengine/netstack: use netstack for peerapi server
We're finding a bunch of host operating systems/firewalls interact poorly
with peerapi. We either get ICMP errors from the host or users need to run
commands to allow the peerapi port:

https://github.com/tailscale/tailscale/issues/3842#issuecomment-1025133727

... even though the peerapi should be an internal implementation detail.

Rather than fight the host OS & firewalls, this change handles the
server side of peerapi entirely in netstack (except on iOS), so it
never makes its way to the host OS where it might be messed with. Two
main downsides are:

1) netstack isn't as fast, but we don't really need speed for peerapi.
   And actually, with fewer trips to/from the kernel, we might
   actually make up for some of the netstack performance loss by
   staying in userspace.

2) tcpdump / Wireshark etc packet captures will no longer see the peerapi
   traffic. Oh well. Crawshaw's been wanting to add packet capture server
   support to tailscaled, so we'll probably do that sooner now.

A future change might also then use peerapi for the client-side
(except on iOS).

Updates #3842 (probably fixes, as well as many exit node issues I bet)

Change-Id: Ibc25edbb895dc083d1f07bd3cab614134705aa39
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-01-31 14:20:08 -08:00
..
bench types/netmap: use key.NodePublic instead of tailcfg.NodeKey. 2021-11-01 17:07:40 -07:00
filter envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
magicsock derp/derphttp, wgengine/magicsock: prefer IPv6 to DERPs when IPv6 works 2022-01-29 15:55:54 -08:00
monitor support running in a FreeBSD jail 2021-12-05 21:42:52 -08:00
netstack ipn/ipnlocal, wgengine/netstack: use netstack for peerapi server 2022-01-31 14:20:08 -08:00
router envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
wgcfg wgengine/wgcfg: recover from mismatched PublicKey/Endpoints 2021-11-18 14:28:41 -08:00
wglog wgengine/wgcfg: convert to use new node key type. 2021-10-28 09:39:23 -07:00
winnet all: gofmt -w -s (simplify) tests 2021-12-15 08:43:41 -08:00
mem_ios.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
pendopen.go envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
userspace_ext_test.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
userspace_test.go all: gofmt -w -s (simplify) tests 2021-12-15 08:43:41 -08:00
userspace.go envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
watchdog_test.go all: close fake userspace engines when tests complete 2021-09-15 15:31:51 -07:00
watchdog.go envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
wgengine.go net/socks5/tssocks, wgengine: permit SOCKS through subnet routers/exit nodes 2021-11-30 11:54:14 -08:00