Mihai Parparita
33520920c3
all: use strs.CutPrefix and strs.CutSuffix more
...
Updates places where we use HasPrefix + TrimPrefix to use the combined
function.
Updates #5309
Signed-off-by: Mihai Parparita <mihai@tailscale.com>
3 years ago
David Anderson
37c150aee1
derp: use new node key type.
...
Update #3206
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
Brad Fitzpatrick
d37451bac6
cmd/derper: dial VPC address with right context
...
Fix bug from just-submitted e422e9f4c9 .
Updates #2414
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
Brad Fitzpatrick
e422e9f4c9
cmd/derper: mesh over VPC network
...
Updates #2414
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
Brad Fitzpatrick
741d654aa3
derp/derphttp: add a context and infoLogger option to RunWatchConnectionLoop
5 years ago
Brad Fitzpatrick
3553512a71
cmd/derper: fix embarassing bug introduced in earlier refactor
...
The remove hook implementation was copy/pasted from the line above and
I didn't change the body, resulting in packet forwarding routes never
being removed.
Fortunately we weren't using this path yet, but it led to stats being
off, and (very) slow memory growth.
6 years ago
Brad Fitzpatrick
c8cf3169ba
cmd/derper, derp/derphttp: move bulk of derp mesh code into derphttp
...
To be reused in various other tools.
6 years ago
Brad Fitzpatrick
7cbf6ab771
cmd/derper: remove unused parameter in runMeshClient
6 years ago
Brad Fitzpatrick
abd79ea368
derp: reduce DERP memory use; don't require callers to pass in memory to use
...
The magicsock derpReader was holding onto 65KB for each DERP
connection forever, just in case.
Make the derp{,http}.Client be in charge of memory instead. It can
reuse its bufio.Reader buffer space.
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