Brad Fitzpatrick
10ac066013
all: fix vet warnings
6 years ago
Brad Fitzpatrick
b87396b5d9
cmd/derper, derp: add some more varz and consistency check handler
...
I'm trying to hunt down a slow drift in numbers not agreeing.
6 years ago
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
b663ab4685
cmd/derper: treat self-connection connection watch as no-op
...
Updates #388
6 years ago
Brad Fitzpatrick
5798826990
cmd/derper: add /home/bradfitz/keys to default mesh key search list
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
Brad Fitzpatrick
b0c10fa610
stun, netcheck: move under net
6 years ago
David Anderson
1e031001db
derp: move write timeout to package constant.
...
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
David Anderson
dbfc916273
derp: add short queues between reader and writer, drop on overload.
...
This avoids the server blocking on misbehaving or heavily contended
clients. We attempt to drop from the head of the queue to keep
overall queueing time lower.
Also:
- fixes server->client keepalives, which weren't happening.
- removes read rate-limiter, deferring instead to kernel-level
global limiter/fair queuer.
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
David Crawshaw
5ad947c761
cmd/derper: set a write timeout
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
6 years ago
Brad Fitzpatrick
8abdbbdd1f
cmd/derper: also link to /debug/varz
6 years ago
David Anderson
f192c05413
metrics: add a LabelMap type for variables with 1 label dimension.
...
This lets us publish sets of vars that are breakdowns along one
dimension in a format that Prometheus and Grafana natively know
how to do useful things with.
Signed-off-by: David Anderson <dave@natulte.net>
6 years ago
Brad Fitzpatrick
e371520cc5
tsweb, derp: add expvar http.Handler for Prometheus's format
...
And add some opinions.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
dd68debd64
cmd/derper: set autocert Email
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
051b6ef141
cmd/derper: accept more LetsEncrypt hostnames without explicit config
6 years ago
Brad Fitzpatrick
00ad93ec25
cmd/derper: add a STUN server
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
824f825552
tsweb, cmd/derper: move common web/debug stuff from derper to new tsweb
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
c763901b1a
cmd/derper: provide debug access over port 80 to trusted (tailscale) IPs
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
2612e54ad1
derp, cmd/derper: add debug handlers, stats
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
37e115834e
cmd/derper: support logging to logtail
...
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
b72e6446e2
cmd/derper: add a basic DERP server
...
Mostly Crawshaw's earlier code, refactored a bit.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago