Brad Fitzpatrick
1cb7dab881
cmd/derper: support forwarding packets amongst set of peer DERP servers
...
Updates #388
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
484b7fc9a3
derp, cmd/derper: add frameWatchConns, framePeerPresent for inter-DERP routing
...
This lets a trusted DERP client that knows a pre-shared key subscribe
to the connection list. Upon subscribing, they get the current set
of connected public keys, and then all changes over time.
This lets a set of DERP server peers within a region all stay connected to
each other and know which clients are connected to which nodes.
Updates #388
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Dmitry Adamushko
806645ea0e
derp: prevent readFrame() from reading more than len(b) bytes.
...
Signed-off-by: Dmitry Adamushko <da@stablebits.net>
6 years ago
Brad Fitzpatrick
1ab5b31c4b
derp, magicsock: send new "peer gone" frames when previous sender disconnects
...
Updates #150 (not yet enabled by default in magicsock)
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
6978b93bdd
derp, magicsock: track home (preferred) vs visiting connections for stats
6 years ago
Brad Fitzpatrick
bf704a5218
derp: protocol negotiation, add v2: send src pub keys to clients in packets
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
379a3125fd
derp, wgengine/magicsock: support more than just packets from Client.Recv
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
88f1cc0c98
derp, cmd/derper: add rate limiting support, add default 5Mbps limit
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
f029c4c82d
derp: change the protocol framing to always include a length
...
Addresses one of crawshaw's TODOs.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
11048b8932
derp: add docs on current protocol overview, break accept apart a bit
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
259406e797
derp: move away from [32]byte key types
...
And some minor cleanup in the process.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago