tailscale/ipn/ipnlocal
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
..
dnsconfig_test.go ipnlocal, net/{dns,tsaddr,tstun}, wgengine: support MagicDNS on IPv6 2022-01-04 14:37:22 -08:00
local_test.go ipn/ipnlocal: make TestShrinkDefaultRoute hermetic 2021-12-16 11:31:20 -08:00
local.go ipn/ipnlocal, wgengine/netstack: use netstack for peerapi server 2022-01-31 14:20:08 -08:00
loglines_test.go net/tsdial: move more weirdo dialing into new tsdial package, plumb 2021-12-01 10:36:55 -08:00
peerapi_h2c.go ipn/ipnlocal: add HTTP/2 h2c server support to peerapi on non-mobile platforms 2021-12-06 16:39:14 -08:00
peerapi_macios_ext.go net/tsdial: move macOS/iOS peerapi sockopt logic from LocalBackend 2021-12-01 12:55:31 -08:00
peerapi_test.go ipn/ipnlocal: run peerapi even if Taildrop storage not configured 2021-12-01 16:45:09 -08:00
peerapi.go ipn/ipnlocal, wgengine/netstack: use netstack for peerapi server 2022-01-31 14:20:08 -08:00
state_test.go ipn/ipnlocal: deflake (mostly) TestStateMachine 2021-12-15 13:41:06 -08:00