summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2023-07-31client/tailscale/apitype,tailcfg: document WhoIsResponse fieldsmaisem/docMaisem Ali2-5/+15
Updates #cleanup Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-07-31client/tailscale/apitype: document never-nil property of WhoIsResponseDavid Anderson2-2/+3
Every time I use WhoIsResponse I end up writing mildly irritating nil-checking for both Node and UserProfile, but it turns out our code guarantees that both are non-nil in successful whois responses. Updates #cleanup Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-30derp/derphttp: add optional Client.BaseContext hookBrad Fitzpatrick1-5/+23
Like net/http.Server.BaseContext, this lets callers specify a base context for dials. Updates tailscale/corp#12702 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-07-29tailcfg: add helper to unmarshal PeerCap valuesMaisem Ali1-0/+19
Updates #4217 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-07-29wgengine/magicsock: remove dead code (#8745)salman aljammaz1-5/+0
The nonce value is not read by anything, and di.sharedKey.Seal() a few lines below generates its own. #cleanup Signed-off-by: salman <salman@tailscale.com>
2023-07-28licenses: update tailscale{,d} licensesLicense Updater1-2/+2
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2023-07-28types/logid: add a Compare methodDavid Anderson1-1/+5
Updates #cleanup Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-28all: update exp/slices and fix call sitesDavid Anderson16-50/+91
slices.SortFunc suffered a late-in-cycle API breakage. Updates #cleanup Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-27derp: use tstime (#8634)Claire Wang8-27/+43
Updates #8587 Signed-off-by: Claire Wang <claire@tailscale.com>
2023-07-27ipn: use tstime (#8597)Claire Wang8-43/+52
Updates #8587 Signed-off-by: Claire Wang <claire@tailscale.com>
2023-07-27ipn/{ipnlocal,localapi}: actually renew certs before expiry (#8731)Andrew Lytvynov5-40/+63
While our `shouldStartDomainRenewal` check is correct, `getCertPEM` would always bail if the existing cert is not expired. Add the same `shouldStartDomainRenewal` check to `getCertPEM` to make it proceed with renewal when existing certs are still valid but should be renewed. The extra check is expensive (ARI request towards LetsEncrypt), so cache the last check result for 1hr to not degrade `tailscale serve` performance. Also, asynchronous renewal is great for `tailscale serve` but confusing for `tailscale cert`. Add an explicit flag to `GetCertPEM` to force a synchronous renewal for `tailscale cert`. Fixes #8725 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-07-27api.md: update device authorize API docs to allow for deauth (#8728)tinku-tailscale1-1/+2
Signed-off-by: tinku-tailscale <139132124+tinku-tailscale@users.noreply.github.com>
2023-07-26cli: introduce exit-node subcommand to list and filter exit nodesCharlotte Brandhorst-Satzkorn7-1/+571
This change introduces a new subcommand, `exit-node`, along with a subsubcommand of `list` and a `--filter` flag. Exit nodes without location data will continue to be displayed when `status` is used. Exit nodes with location data will only be displayed behind `exit-node list`, and in status if they are the active exit node. The `filter` flag can be used to filter exit nodes with location data by country. Exit nodes with Location.Priority data will have only the highest priority option for each country and city listed. For countries with multiple cities, a <Country> <Any> option will be displayed, indicating the highest priority node within that country. Updates tailscale/corp#13025 Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
2023-07-26wgengine/magicsock: document mysterious-looking assignmentDavid Anderson1-0/+2
Updates #cleanup Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-26wgengine/magicsock: factor out more separable partsDavid Anderson7-1285/+1350
Updates #8720 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-26disco: move disco pcap helper to disco packageDavid Anderson4-42/+52
Updates tailscale/corp#13464 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-26wgengine/magicsock: factor out peerMap into separate fileDavid Anderson2-173/+183
Updates tailscale/corp#13464 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-26wgengine/magicsock: factor out endpoint into its own fileDavid Anderson2-1125/+1140
Updates tailscale/corp#13464 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-26wgengine/magicsock: delete unused stuffDavid Anderson4-65/+0
Updates tailscale/corp#13464 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-25cmd/tailscale/cli: implement update on FreeBSD (#8710)Andrew Lytvynov1-4/+45
Implement `tailscale update` on FreeBSD. This is much simpler than other platforms because `pkg rquery` lets us get the version in their repos without any extra parsing. Updates #6995 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-07-25tailcfg,ipn/ipnlocal,wgengine: add values to PeerCapabilitiesMaisem Ali13-68/+139
Define PeerCapabilty and PeerCapMap as the new way of sending down inter-peer capability information. Previously, this was unstructured and you could only send down strings which got too limiting for certain usecases. Instead add the ability to send down raw JSON messages that are opaque to Tailscale but provide the applications to define them however they wish. Also update accessors to use the new values. Updates #4217 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-07-24cmd/tailscale/cli,version/distro: update support for Alpine (#8701)Andrew Lytvynov3-3/+140
Similar to Arch support, use the latest version info from the official `apk` repo and don't offer explicit track or version switching. Add detection for Alpine Linux in version/distro along the way. Updates #6995 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-07-24net/art: use more intelligible, go-ish state tracking in table.GetDavid Anderson1-10/+10
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: use encoding/binary for address bit twiddlingDavid Anderson1-4/+3
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: move slice closer to its useDavid Anderson1-3/+2
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: factor out picking the right strideTable for addr familyDavid Anderson1-18/+13
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: make Table.Get alloc-freeDavid Anderson1-2/+14
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: document return value of strideTable.deleteDavid Anderson1-1/+3
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: reword confusing function docstringDavid Anderson1-2/+2
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: use "index", not "idx" in function namesDavid Anderson2-8/+4
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: document valid values of strideTable.prefixDavid Anderson1-2/+5
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: fix comment typoDavid Anderson1-1/+1
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: fix slowPrefixTable bugs found by fuzzingDavid Anderson1-2/+4
One is a straight "I forgot how to Go" bug, the others are semantic mismatches with the main implementation around masking the prefixes passed to insert/delete. Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: add another consistency test for insert/deleteDavid Anderson1-0/+29
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: add more exhaustive table testingDavid Anderson1-12/+705
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: fix format of debug outputDavid Anderson1-1/+1
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: add debug hooks to strideTableDavid Anderson2-4/+17
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: implement path compression optimizationDavid Anderson2-72/+569
Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: make each strideTable track the IP prefix it representsDavid Anderson3-8/+59
This is a prerequisite for path compression, so that insert/delete can determine when compression occurred. Updates #7781 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24net/art: fix running tests outside of CIDavid Anderson1-0/+1
Updates #7866 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-07-24licenses: update tailscale{,d} licensesLicense Updater1-5/+5
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2023-07-24cmd/tailscale/cli: implement update for dnf/yum-based distros (#8678)Andrew Lytvynov2-56/+269
This is the Fedora family of distros, including CentOS, RHEL and others. Tested in `fedora:latest` and `centos:7` containers. Updates #6995 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-07-23tailcfg: add UserProfile.GroupsBrad Fitzpatrick6-12/+129
Updates tailscale/corp#13375 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-07-23net/dns: overwrite /tmp/resolv.conf on gokrazyMichael Stapelberg3-5/+22
Appliances built using https://gokrazy.org/ have a read-only root file system, including /etc/resolv.conf, which is a symlink to /tmp/resolv.conf. The system’s dhcp client overwrites /tmp/resolv.conf instead, so we need to use this path in Tailscale, too. related to https://github.com/gokrazy/gokrazy/issues/209 fixes https://github.com/tailscale/tailscale/issues/8689 Signed-off-by: Michael Stapelberg <michael@stapelberg.de>
2023-07-22go.toolchain.rev: bump Go versionBrad Fitzpatrick1-1/+1
For https://github.com/tailscale/go/commit/a96a9eddc031c85f22378ef1e37e3fd7e9c482ef Updates tailscale/corp#12702 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-07-22tailcfg: deprecate Debug, flesh out Node.DERP docsBrad Fitzpatrick1-11/+29
Updates #docs Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-07-21api.md: add documentation to API endpoint about SCIM group warningsJenny Zhang1-0/+15
Updates #8645 Signed-off-by: Jenny Zhang <jz@tailscale.com>
2023-07-21logtail: use tstime (#8607)Claire Wang3-33/+34
Updates #8587 Signed-off-by: Claire Wang <claire@tailscale.com>
2023-07-21ssh: ignore io.EOF from sftp.Server.ServeJoe Tsai1-1/+6
If the connection provided to sftp.NewServer is closed, Serve returns the io.EOF error verbatim from io.Reader.Read. This is an odd error since this is an expected situation, so we manually ignore io.EOF. This is somewhat buggy since the sftp package itself incorrectly reports io.EOF in cases where it should actually be reporting io.ErrUnexpectedEOF. See https://github.com/pkg/sftp/pull/554 which patches Serve to return nil on clean closes and fixes buggy uses of io.ReadFull. Fixes #8592 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-07-20util/linuxfw: remove yet-unused code to fix linux/arm64 crashBrad Fitzpatrick6-863/+11
The util/linuxfw/iptables.go had a bunch of code that wasn't yet used (in prep for future work) but because of its imports, ended up initializing code deep within gvisor that panicked on init on arm64 systems not using 4KB pages. This deletes the unused code to delete the imports and remove the panic. We can then cherry-pick this back to the branch and restore it later in a different way. A new test makes sure we don't regress in the future by depending on the panicking package in question. Fixes #8658 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>