summaryrefslogtreecommitdiffhomepage
path: root/control/controlclient
AgeCommit message (Collapse)AuthorFilesLines
2021-01-14all: convert from []wgcfg.Endpoint to stringJosh Bleecher Snyder1-4/+7
This eliminates a dependency on wgcfg.Endpoint, as part of the effort to eliminate our wireguard-go fork. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-01-13control/controlclient: let clients opt in to Sharer-vs-User split modelBrad Fitzpatrick1-33/+32
Updates tailscale/corp#1183
2021-01-12control/controlclient: treat node sharer as owner for display purposesBrad Fitzpatrick1-0/+14
This make clients (macOS, Windows, tailscale status) show the node sharer's profile rather than the node owner (which may be anonymized). Updates #992
2021-01-12tailcfg, control/controlclient: make MapResponse.CollectServices an opt.BoolBrad Fitzpatrick1-1/+6
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-01-11ipn: only send services in Hostinfo if Tailnet has opted-in to services ↵Sonia Appasamy2-16/+23
collection (#1107) Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2021-01-10cmd/tailscale: change formatting of "tailscale status"Brad Fitzpatrick1-1/+25
* show DNS name over hostname, removing domain's common MagicDNS suffix. only show hostname if there's no DNS name. but still show shared devices' MagicDNS FQDN. * remove nerdy low-level details by default: endpoints, DERP relay, public key. They're available in JSON mode still for those who need them. * only show endpoint or DERP relay when it's active with the goal of making debugging easier. (so it's easier for users to understand what's happening) The asterisks are gone. * remove Tx/Rx numbers by default for idle peers; only show them when there's traffic. * include peers' owner login names * add CLI option to not show peers (matching --self=true, --peers= also defaults to true) * sort by DNS/host name, not public key * reorder columns
2021-01-08Add more tests for Direct.Denton Gentry1-0/+65
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2021-01-08cover one more case in TestStatusEqual.Denton Gentry1-0/+5
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2021-01-08control/controlclient: use lite map request handler to avoid aborting streamsBrad Fitzpatrick2-13/+83
Previously, any change to endpoints or hostinfo (or hostinfo's netinfo) would result in the long-running map request HTTP stream being torn down and restarted, losing all compression context along with it. This change makes us instead send a lite map request (OmitPeers: true, Stream: false) that doesn't subscribe to anything, and then the coordination server knows to not close other streams for that node when it recives a lite request. Fixes tailscale/corp#797 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-01-05ipn: delete domainsForProxying, require explicit DNS search domains (mapver ↵Brad Fitzpatrick1-1/+1
9) (#1078) Previously the client had heuristics to calculate which DNS search domains to set, based on the peers' names. Unfortunately that prevented us from doing some things we wanted to do server-side related to node sharing. So, bump MapRequest.Version to 9 to signal that the client only uses the explicitly configured DNS search domains and doesn't augment it with its own list. Updates tailscale/corp#1026 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-12-30wgkey: new packageJosh Bleecher Snyder4-31/+32
This is a replacement for the key-related parts of the wireguard-go wgcfg package. This is almost a straight copy/paste from the wgcfg package. I have slightly changed some of the exported functions and types to avoid stutter, added and tweaked some comments, and removed some now-unused code. To avoid having wireguard-go depend on this new package, wgcfg will keep its key types. We translate into and out of those types at the last minute. These few remaining uses will be eliminated alongside the rest of the wgcfg package. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-12-28all: replace wgcfg.IP and wgcfg.CIDR with netaddr typesJosh Bleecher Snyder3-28/+12
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-12-21control/controlclient, version/distro: detect NixOS explicitlyBrad Fitzpatrick2-1/+14
The fallthrough happened to work in controlclient already due to the /etc/os-release PRETTY_NAME default, but make it explicit so it doesn't look like an accident. Also add it to version/distro, even though nothing needs it yet.
2020-12-21all: annotate log verbosity levels on most egregiously spammy log printsBrad Fitzpatrick3-15/+17
Fixes #924 Fixes #282 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-12-21control/controlclient: clarify a commentBrad Fitzpatrick1-1/+2
2020-12-19tailcfg: introduce map version 8, for clients that support v6 node config.David Anderson1-1/+1
For now, the server will only send v6 configuration to mapversion 8 clients as part of an early-adopter program, while we verify that the functionality is robust. Signed-off-by: David Anderson <danderson@tailscale.com>
2020-12-19control/controlclient: report broken routing for v4 and v6.David Anderson1-11/+52
Signed-off-by: David Anderson <danderson@tailscale.com>
2020-12-15wgengine/filter, tailcfg: support CIDRs+ranges in PacketFilter (mapver 7)Brad Fitzpatrick1-1/+1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-12-15Merge branch 'main' into report-status-systemdChristine Dodrill2-49/+19
2020-12-15ipn/ipnserver: enable systemd-notify supportChristine Dodrill1-0/+3
Addresses #964 Still to be done: - Figure out the correct logging lines in util/systemd - Figure out if we need to slip the systemd.Status function anywhere else - Log util/systemd errors? (most of the errors are of the "you cannot do anything about this, but it might be a bad idea to crash the program if it errors" kind) Assistance in getting this over the finish line would help a lot. Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: rename the nonlinux file to appease the magic Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: fix package name Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: fix review feedback from @mdlayher Signed-off-by: Christine Dodrill <me@christine.website> cmd/tailscale{,d}: update depaware manifests Signed-off-by: Christine Dodrill <me@christine.website> util/systemd: use sync.Once instead of func init Signed-off-by: Christine Dodrill <me@christine.website> control/controlclient: minor review feedback fixes Signed-off-by: Christine Dodrill <me@christine.website> {control,ipn,systemd}: fix review feedback Signed-off-by: Christine Dodrill <me@christine.website> review feedback fixes Signed-off-by: Christine Dodrill <me@christine.website> ipn: fix sprintf call Signed-off-by: Christine Dodrill <me@christine.website> ipn: make staticcheck less sad Signed-off-by: Christine Dodrill <me@christine.website> ipn: print IP address in connected status Signed-off-by: Christine Dodrill <me@christine.website> ipn: review feedback Signed-off-by: Christine Dodrill <me@christine.website> final fixups Signed-off-by: Christine Dodrill <me@christine.website>
2020-12-14control/controlclient: don't spin when starting up when node key is expiredBrad Fitzpatrick1-47/+11
Fixes #1018 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-12-07tailcfg, control/controlclient: make nil PacketFilter mean unchanged (mapver 6)Brad Fitzpatrick1-2/+8
After mapver 5's incremental netmap updates & user profiles, much of the remaining bandwidth for streamed MapResponses were redundant, unchanged PacketFilters. So make MapRequest.Version 6 mean that nil means unchanged from the previous value.
2020-11-12control/controlclient: diagnose zero bytes from controlBrad Fitzpatrick1-0/+9
Updates #921 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-11-11net/dnscache, control/controlclient: use DNS cache when dialing controlBrad Fitzpatrick1-1/+6
Cache DNS results of earlier login.tailscale.com control dials, and use them for future dials if DNS is slow or broken. Fixes various issues with trickier setups with the domain's DNS server behind a subnet router. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-11-09wgengine/filter: remove the Matches type.David Anderson2-4/+4
It only served to obscure the underlying slice type without adding much value. Signed-off-by: David Anderson <danderson@tailscale.com>
2020-11-04control/controlclient: send warning flag in map request when IP forwarding offBrad Fitzpatrick1-0/+36
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-11-04ipn: clean up Prefs logging at startBrad Fitzpatrick1-2/+7
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-10-28version: use OSS repo's version when building.David Anderson1-1/+1
When building with redo, also include the git commit hash from the proprietary repo, so that we have a precise commit that identifies all build info (including Go toolchain version). Add a top-level build script demonstrating to downstream distros how to burn the right information into builds. Adjust `tailscale version` to print commit hashes when available. Fixes #841. Signed-off-by: David Anderson <danderson@tailscale.com>
2020-10-27control/controlclient: also log active account in netmapsBrad Fitzpatrick2-4/+14
Updates tailscale/corp#461
2020-10-27control/controlclient: remove prior temporary macos debuggingBrad Fitzpatrick1-39/+0
It was an x/net/http2 bug, since fixed.
2020-10-20control/controlclient: add some temporary debugging for #839Brad Fitzpatrick1-0/+39
2020-10-20tailcfg: bump, document MapRequest.Version valueBrad Fitzpatrick1-10/+8
Fixes tailscale/corp#634 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-10-20control/controlclient: rename map debug knob, make it do both request+responseBrad Fitzpatrick1-4/+3
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-10-19tailcfg: add a DebugFlags field for experiments and debugging.David Anderson1-14/+13
Also replaces the IPv6Overlay bool with use of DebugFlags, since it's currently an experimental configuration. Signed-off-by: David Anderson <danderson@tailscale.com>
2020-10-19control/controlclient: log Hostinfo on changeBrad Fitzpatrick1-0/+2
Fixes #830 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-10-15tailcfg: add a field to advertise support for IPv6 tailscale config.David Anderson1-9/+14
Signed-off-by: David Anderson <danderson@tailscale.com>
2020-10-14control/controlclient: also include our own profile (for when no self-owned ↵Brad Fitzpatrick1-4/+7
peers) Fix from regression in previous commit (0e3048d8e01921758655dea212ecf010346d9300) that was caught by e2e tests. In that previous commit, the user's own profile was omitted from the NetworkMap in the case where the user only had one node.
2020-10-14control/controlclient: support delta userprofiles from controlBrad Fitzpatrick1-2/+13
I was going to make support for this advertised from the client, but turns out only "tailscale status" even uses the UserProfiles field and fails gracefully (omits that field) if a user profile for a user is missing, so I think we can just reuse the DeltaPeers field from the client to ask the control server to also delta encode the user profiles. For the few users running 1.1.x (unstable) versions between DeltaPeers support (1.1.82) and this (~1.1.541), they'll just sometimes have missing names in "tailscale status --json" or "tailscale status --web" (the only places the UserProfile is used).
2020-10-14control/controlclient: adjust some logging point namesBrad Fitzpatrick1-5/+5
The previous code read too explicitly like log.Printf("I am here1"), log.Printf("I am here2"). It still is with this change, but prettier, and less subject to code rearranging order.
2020-10-14control/controlclient: set MapRequest.ReadOnly on initial empty endpoint requestBrad Fitzpatrick1-8/+33
On startup, clients do a MapRequest with empty endpoints while they learn the DERP map to discover the STUN servers they then query to learn their endpoints. Set MapRequest.ReadOnly on those initial queries to not broadcast the empty endpoints out to peers. The read results will come a half second later (or less). Updates tailscale/corp#557
2020-10-08controlclient: print http errors if result code != 200.apenwarr/faketunAvery Pennarun1-1/+7
Turns out for the particular error I was chasing, it actually returns 200 and zero data. But this code mirrors the same check in the map poll, and is the right thing to do in the name of future debugging. Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2020-10-06control/controlclient: some extra debug info in errorsDavid Crawshaw1-2/+2
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-10-01control/controlclient, ipn: store machine key separately from user prefs/persistBrad Fitzpatrick3-40/+55
Updates #610 (fixes after some win/xcode changes in a separate repo)
2020-09-30all: use IsZero methodsJosh Bleecher Snyder1-2/+2
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-30Revert "all: keep UserProfiles a slice instead of a map for longer"Brad Fitzpatrick2-4/+9
This reverts commit e5894aba427cf3736039ac9e2369daffff7d0041. Breaks macOS/iOS build. Reverting per chat with Josh; he'll fix later today.
2020-09-29control/controlclient: use wgcfg.PrivateKey.IsZeroJosh Bleecher Snyder1-3/+3
Generated by eg using template: --- package p import "github.com/tailscale/wireguard-go/wgcfg" func before(k wgcfg.PrivateKey) bool { return k == wgcfg.PrivateKey{} } func after(k wgcfg.PrivateKey) bool { return k.IsZero() } Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-29all: keep UserProfiles a slice instead of a map for longerJosh Bleecher Snyder2-9/+4
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-29control/controlclient: remove Roles fields from clientJosh Bleecher Snyder2-2/+0
They are unused. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-22control/controlclient, version/distro, wgengine: recognize OpenWrtBrad Fitzpatrick1-3/+9
And help out with missing packages. Thanks to @willangley for tips. Updates #724
2020-09-17tailcfg: add MapRequest.ReadOnly and OmitPeers; remove DebugForceDiscoBrad Fitzpatrick1-25/+19
DebugForceDisco was a development & safety knob during the the transition to discovery. It's no longer needed. Add MapRequest.ReadOnly to prevent clients needing to do two peer-spamming MapRequest at start-up. This only adds the field, not the use of the field. (The control server needs to support it first.) Updates tailscale/corp#557 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>