summaryrefslogtreecommitdiffhomepage
path: root/control/controlclient/netmap.go
AgeCommit message (Collapse)AuthorFilesLines
2020-08-06control/controlclient: remove unused NetworkMap.UAPI methodBrad Fitzpatrick1-15/+0
And remove last remaining use of wgcfg.ToUAPI in a test's debug output; replace it with JSON.
2020-08-03control/controlclient: print disco keys NetworkMap diffs (debug change only)Brad Fitzpatrick1-2/+9
NetworkMap text diffs being empty were currently used to short-circuit calling magicsock's SetNetworkMap (via Engine.SetNetworkMap), but that went away in c7582dc2 (0.100.0-230) Prior to c7582dc2 (notably, in 0.100.0-225 and below, down to 0.100.0), a change in only disco key (as when a node restarts) but without endpoint changes (as would happen for a client not behind a NAT with random ports) could result in a "netmap diff: (none)" being printed, as well as Engine.SetNetworkMap being skipped, leading to broken discovery endpoints. c7582dc2 fixed the Engine.SetNetworkMap skippage. This change fixes the "netmap diff: (none)" print so we'll actually see when a peer restarts with identical endpoints but a new discovery key.
2020-07-31all: dns refactor, add Proxied and PerDomain flags from control (#615)Dmytro Shynkevych1-6/+4
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-28ipn: fix netmap change tracking and dns map generation (#609)Dmytro Shynkevych1-3/+5
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
2020-07-25control/controlclient: remove unused, slow, often-not-what-you-want ↵Brad Fitzpatrick1-21/+0
NetworkMap.Equal
2020-07-23control/controlclient: rewrite, test NetworkMap.ConciseDiffFromBrad Fitzpatrick1-52/+144
It stood out a lot in hello.ipn.dev's profiles for generating a lot of garbage (and thus GC CPU).
2020-07-23control/controlclient: rename uflags, give it a type, remove dead codeBrad Fitzpatrick1-29/+15
2020-07-23control/controlclient: generate wireguard config w/o WgQuick text indirectionBrad Fitzpatrick1-66/+53
2020-06-29wgengine/magicsock: add new endpoint type used for discovery-supporting peersBrad Fitzpatrick1-18/+29
This adds a new magicsock endpoint type only used when both sides support discovery (that is, are advertising a discovery key). Otherwise the old code is used. So far the new code only communicates over DERP as proof that the new code paths are wired up. None of the actually discovery messaging is implemented yet. Support for discovery (generating and advertising a key) are still behind an environment variable for now. Updates #483
2020-06-25control/controlclient: add Debug field to NetworkMapBrad Fitzpatrick1-3/+14
As part of disabling background STUN packets when idle, we want an emergency override switch to turn it back on, in case it interacts poorly in the wild. We'll send that via control, but we'll want to plumb it down to magicsock via NetworkMap. Updates tailscale/corp#320 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-06-24control/controlclient: cut down some NetworkMap stringification & diff ↵Brad Fitzpatrick1-3/+9
allocations And start of tests.
2020-06-24control/controlclient: trim /32 suffix a bit more succinctlyBrad Fitzpatrick1-4/+1
2020-06-18control/controlclient: make netmap generation use rate-limited logger.David Anderson1-8/+9
2020-06-18control/controlclient: delete unused function.David Anderson1-8/+0
2020-05-23all: make client use server-provided DERP map, add DERP region supportBrad Fitzpatrick1-0/+4
Instead of hard-coding the DERP map (except for cmd/tailscale netcheck for now), get it from the control server at runtime. And make the DERP map support multiple nodes per region with clients picking the first one that's available. (The server will balance the order presented to clients for load balancing) This deletes the stunner package, merging it into the netcheck package instead, to minimize all the config hooks that would've been required. Also fix some test flakes & races. Fixes #387 (Don't hard-code the DERP map) Updates #388 (Add DERP region support) Fixes #399 (wgengine: flaky tests) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-03-25cmd/relaynode: delete it!Avery Pennarun1-51/+0
tailscale+tailscaled now completely obsoletes relaynode, so let's let it finally go away.
2020-03-24control/controlclient: add TODO to delete the UAPI methodBrad Fitzpatrick1-0/+2
2020-03-19control/controlclient: don't use Node as value typeBrad Fitzpatrick1-1/+1
2020-03-19tailcfg, controlclient: standardize on wgcfg ShortString key printingDavid Crawshaw1-15/+6
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-03-14controlclient: use per-peer KeepAlive signalDavid Crawshaw1-3/+1
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-03-13control/controlclient: remove a number literal in string slice offsetBrad Fitzpatrick1-2/+3
2020-03-12Fix staticcheck complaint.Avery Pennarun1-1/+1
2020-03-12controlclient/netmap: write our own b.ConciseDiffFrom(a) function.Avery Pennarun1-0/+28
This removes the need for go-cmp, which is extremely bloaty so we had to leave it out of iOS. As a result, we had also left it out of macOS, and so we didn't print netmap diffs at all on darwin-based platforms. Oops. As a bonus, the output format of the new function is way better. Minor oddity: because I used the dumbest possible diff algorithm, the sort order is a bit dumb. We print all "removed" lines and then print all "added" lines, rather than doing the usual diff-like thing of interspersing them. This probably doesn't matter (maybe it's an improvement).
2020-03-12controlclient: reformat netmap.Concise() and add DERP server info.Avery Pennarun1-10/+29
The .Concise() view had grown hard to read over time. Originally, we assumed a peer almost always had just one endpoint and one-or-more allowedips. With magicsock, we now almost always have multiple endpoints per peer. And empirically, almost every peer has only one allowedip. Change their order so we can line up allowedips vertically. Also do some tweaking to make multiple endpoints easier to read. While we're here, add a column to show the home DERP server of each peer, if any.
2020-03-02controlclient, tailcfg: deliver DERP addresses in a separate fieldDavid Crawshaw1-6/+11
We still include them directly in the controlclient network map just where we have been. Client plumbing we can do later. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-03-02version: add IsMobile funcBrad Fitzpatrick1-5/+3
And use it control/controlclient.
2020-02-10controlclient: remove unused function.David Anderson1-7/+0
Signed-off-by: David Anderson <dave@natulte.net>
2020-02-09Move Linux client & common packages into a public repo.Earl Lee1-0/+294