summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2023-08-10util/linuxfw: rename ErrorFWModeNotSupportedBrad Fitzpatrick3-8/+8
Go style is for error variables to start with "err" (or "Err") and for error types to end in "Error". Updates #cleanup Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-10tsnet: add new example serving the Tailscale web clientWill Norris1-0/+44
Updates tailscale/corp#13775 Co-authored-by: Sonia Appasamy <sonia@tailscale.com> Signed-off-by: Will Norris <will@tailscale.com> Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-08-09client/web: fix rendering of node owner profileWill Norris1-1/+1
Fixes #8837 Signed-off-by: Will Norris <will@tailscale.com>
2023-08-09client/web: add web client Server structSonia Appasamy2-16/+36
Updates tailscale/corp#13775 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-08-09tailscale/cli: add interactive flow for enabling FunnelSonia Appasamy9-42/+275
Updates tailscale/corp#10577 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-08-09control/controlhttp: remove tstest.Clock from tests (#8830)Andrew Lytvynov1-11/+23
These specific tests rely on some timers in the controlhttp code. Without time moving forward and timers triggering, the tests fail. Updates #8587 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-09util/winutil/authenticode: fix an inaccurate doc commentAaron Klotz1-3/+3
A #cleanup PR Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2023-08-09client/web: extract web client from cli packageWill Norris8-488/+521
move the tailscale web client out of the cmd/tailscale/cli package, into a new client/web package. The remaining cli/web.go file is still responsible for parsing CLI flags and such, and then calls into client/web. This will allow the web client to be hooked into from other contexts (for example, from a tsnet server), and provide a dedicated space to add more functionality to this client. Updates tailscale/corp#13775 Signed-off-by: Will Norris <will@tailscale.com>
2023-08-09cmd/tailscale: refactor shared utility methodsWill Norris7-100/+127
Refactor two shared functions used by the tailscale cli, calcAdvertiseRoutes and licensesURL. These are used by the web client as well as other tailscale subcommands. The web client is being moved out of the cli package, so move these two functions to new locations. Updates tailscale/corp#13775 Signed-off-by: Will Norris <will@tailscale.com>
2023-08-08go.toolchain.rev: merge Go 1.21.0 final (non-rc)Brad Fitzpatrick1-1/+1
Diff: https://github.com/tailscale/go/compare/d149af282305d5365d5a4fb576d9fa81247eb6da..593313088f6e5297cba5d5e3f392f15251bd5915 Updates #8419 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-08derp, net/dns/recursive: use Go 1.21 minBrad Fitzpatrick2-16/+1
Updates #8419 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-08all: require Go 1.21Brad Fitzpatrick7-13/+33
Updates #8419 Change-Id: I809b6a4d59d92a2ab6ec587ccbb9053376bf02c2 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-08util/testenv: add new package to hold InTestMaisem Ali10-25/+53
Removes duplicated code. Updates #cleanup Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-08ipn/ipnlocal: fix profile duplicationMaisem Ali3-76/+66
We would only look for duplicate profiles when a new login occurred but when using `--force-reauth` we could switch users which would end up with duplicate profiles. Updates #7726 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-08ipn/ipnlocal: add test to find issues with profile duplicationMaisem Ali1-10/+187
There are a few situations where we end up with duplicate profiles. Add tests to identify those situations, fix in followup. Updates #7726 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-08control/controlclient: make Direct own all changes to PersistMaisem Ali2-28/+13
It was being modified in two places in Direct for the auth routine and then in LocalBackend when a new NetMap was received. This was confusing, so make Direct also own changes to Persist when a new NetMap is received. Updates #7726 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-08types/persist: drop duplicated Persist.LoginNameMaisem Ali13-76/+46
It was duplicated from Persist.UserProfile.LoginName, drop it. Updates #7726 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-08wgengine/router: add auto selection heuristic for iptables/nftablesKevinLiang105-13/+216
This commit replaces the TS_DEBUG_USE_NETLINK_NFTABLES envknob with a TS_DEBUG_FIREWALL_MODE that should be set to either 'iptables' or 'nftables' to select firewall mode manually, other wise tailscaled will automatically choose between iptables and nftables depending on environment and system availability. updates: #319 Signed-off-by: KevinLiang10 <kevinliang@tailscale.com>
2023-08-08control/controlclient: use ptr.ToMaisem Ali1-2/+2
Updates #cleanup Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-08ipn/ipnlocal: make tests pass when offlineMaisem Ali1-1/+11
Updates #cleanup Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-08wgengine,ipn,cmd/tailscale: add size option to ping (#8739)salman aljammaz12-30/+125
This adds the capability to pad disco ping message payloads to reach a specified size. It also plumbs it through to the tailscale ping -size flag. Disco pings used for actual endpoint discovery do not use this yet. Updates #311. Signed-off-by: salman <salman@tailscale.com> Co-authored-by: Val <valerie@tailscale.com>
2023-08-07ipn/ipnlocal: add profile pic header to serve HTTP proxySonia Appasamy2-2/+8
Fixes #8807 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-08-07ipn: avoid useless no-op WriteState callsBrad Fitzpatrick5-14/+80
Rather than make each ipn.StateStore implementation guard against useless writes (a write of the same value that's already in the store), do writes via a new wrapper that has a fast path for the unchanged case. This then fixes profileManager's flood of useless writes to AWS SSM, etc. Updates #8785 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-06licenses: update android licensesLicense Updater1-3/+3
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2023-08-05go.mod.sri: update SRI hash for go.mod changesFlakes Updater3-3/+3
Signed-off-by: Flakes Updater <noreply+flakes-updater@tailscale.com>
2023-08-04control: use tstime instead of time (#8595)Claire Wang10-43/+61
Updates #8587 Signed-off-by: Claire Wang <claire@tailscale.com>
2023-08-04licenses: update tailscale{,d} licensesLicense Updater1-4/+4
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2023-08-03cmd/dist,release/dist: expose RPM signing hook (#8789)Andrew Lytvynov4-31/+44
Plumb a signing callback function to `unixpkgs.rpmTarget` to allow signing RPMs. This callback is optional and RPMs will build unsigned if not set, just as before. Updates https://github.com/tailscale/tailscale/issues/1882 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-03go.mod: upgrade nfpm to v2 (#8786)Andrew Lytvynov6-427/+167
Upgrade the nfpm package to the latest version to pick up https://github.com/goreleaser/nfpm/commit/24a43c5ad7cfc549e8a4ec930521a97a30f26cc8. The upgrade is from v0 to v2, so there was some breakage to fix. Generated packages should have the same contents as before. Updates https://github.com/tailscale/tailscale/issues/1882 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-03go.mod, cmd/tailscaled, ipn/localapi, util/osdiag, util/winutil, ↵Aaron Klotz17-305/+575
util/winutil/authenticode: add Windows module list to OS-specific logs that are written upon bugreport * We update wingoes to pick up new version information functionality (See pe/version.go in the https://github.com/dblohm7/wingoes repo); * We move the existing LogSupportInfo code (including necessary syscall stubs) out of util/winutil into a new package, util/osdiag, and implement the public LogSupportInfo function may be implemented for other platforms as needed; * We add a new reason argument to LogSupportInfo and wire that into localapi's bugreport implementation; * We add module information to the Windows implementation of LogSupportInfo when reason indicates a bugreport. We enumerate all loaded modules in our process, and for each one we gather debug, authenticode signature, and version information. Fixes #7802 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2023-08-02tailcfg,ipn/localapi,client/tailscale: add QueryFeature endpointSonia Appasamy5-0/+128
Updates tailscale/corp#10577 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-08-02go.toolchain.rev: go1.21rc4 (now that VERSION file is updated upstream)Brad Fitzpatrick1-1/+1
Updates #8419 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-02cmd/tailscale/cli: add latest version output to "tailscale version" (#8700)Andrew Lytvynov2-3/+34
Add optional `--upstream` flag to `tailscale version` to fetch the latest upstream release version from `pkgs.tailscale.com`. This is useful to diagnose `tailscale update` behavior or write other tooling. Example output: $ tailscale version --upstream --json { "majorMinorPatch": "1.47.35", "short": "1.47.35", "long": "1.47.35-t6afffece8", "unstableBranch": true, "gitCommit": "6afffece8a32509aa7a4dc2972415ec58d8316de", "cap": 66, "upstream": "1.45.61" } Fixes #8669 RELNOTE=adds "tailscale version --upstream" Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-08-01licenses: update android licensesLicense Updater1-9/+11
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2023-08-01go.toolchain.rev: bump to ~go1.21rc4Brad Fitzpatrick1-1/+1
Updates tailscale/go#69 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-01tailcfg: add CapabilityHTTPS constSonia Appasamy1-0/+1
A #cleanup Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-08-01ipnlocal, net/*: deprecate interfaces.GetState, use netmon more for itBrad Fitzpatrick5-10/+10
Updates #cleanup Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-08-01licenses: update tailscale{,d} licensesLicense Updater1-1/+1
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2023-08-01all: implement lock revoke-keys commandTom DNetto7-3/+709
The revoke-keys command allows nodes with tailnet lock keys to collaborate to erase the use of a compromised key, and remove trust in it. Signed-off-by: Tom DNetto <tom@tailscale.com> Updates ENG-1848
2023-08-01cmd/tailscale/cli, util/winutil/authenticode: flesh out authenticode supportAaron Klotz7-29/+681
Previously, tailscale upgrade was doing the bare minimum for checking authenticode signatures via `WinVerifyTrustEx`. This is fine, but we can do better: * WinVerifyTrustEx verifies that the binary's signature is valid, but it doesn't determine *whose* signature is valid; tailscale upgrade should also ensure that the binary is actually signed *by us*. * I added the ability to check the signatures of MSI files. * In future PRs I will be adding diagnostic logging that lists details about every module (ie, DLL) loaded into our process. As part of that metadata, I want to be able to extract information about who signed the binaries. This code is modelled on some C++ I wrote for Firefox back in the day. See https://searchfox.org/mozilla-central/rev/27e4816536c891d85d63695025f2549fd7976392/toolkit/xre/dllservices/mozglue/Authenticode.cpp for reference. Fixes #8284 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2023-08-01cmd/sniproxy: add client metricsDenton Gentry1-0/+18
Count number of sessions, number of DNS queries answered successfully and in error, and number of http->https redirects. Updates #1748 Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2023-07-31cmd/dist,release/dist: sign release tarballs with an ECDSA key (#8759)Andrew Lytvynov4-10/+63
Pass an optional PEM-encoded ECDSA key to `cmd/dist` to sign all built tarballs. The signature is stored next to the tarball with a `.sig` extension. Tested this with an `openssl`-generated key pair and verified the resulting signature. Updates #8760 Signed-off-by: Andrew Lytvynov <awly@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>