summaryrefslogtreecommitdiffhomepage
path: root/client
AgeCommit message (Collapse)AuthorFilesLines
2024-11-07client/tailscale,ipn/{ipnlocal,localapi}: add a pre-shutdown localAPI ↵Irbe Krumina1-0/+11
endpoint that terminates control connections. (#14028) Adds a /disconnect-control local API endpoint that just shuts down control client. This can be run before shutting down an HA subnet router/app connector replica - it will ensure that all connection to control are dropped and control thus considers this node inactive and tells peers to switch over to another replica. Meanwhile the existing connections keep working (assuming that the replica is given some graceful shutdown period). Updates tailscale/tailscale#14020 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-10-31cmd/tailscale/cli, client/tailscale, ipn/localapi: add tailscale syspolicy ↵Nick Khyl1-0/+28
{list,reload} commands In this PR, we add the tailscale syspolicy command with two subcommands: list, which displays policy settings, and reload, which forces a reload of those settings. We also update the LocalAPI and LocalClient to facilitate these additions. Updates #12687 Signed-off-by: Nick Khyl <nickk@tailscale.com>
2024-10-16ipn/ipnlocal: error when trying to use exit node on unsupported platform ↵Mario Minardi1-23/+3
(#13726) Adds logic to `checkExitNodePrefsLocked` to return an error when attempting to use exit nodes on a platform where this is not supported. This mirrors logic that was added to error out when trying to use `ssh` on an unsupported platform, and has very similar semantics. Fixes https://github.com/tailscale/tailscale/issues/13724 Signed-off-by: Mario Minardi <mario@tailscale.com>
2024-10-11client/tailscale,cmd/{cli,get-authkey,k8s-operator}: set distinct User-AgentsPercy Wegmann1-7/+10
This helps better distinguish what is generating activity to the Tailscale public API. Updates tailscale/corp#23838 Signed-off-by: Percy Wegmann <percy@tailscale.com>
2024-09-26client/web: use tsaddr helpersKristoffer Dalby1-15/+5
Updates #cleanup Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-09-24cli: add `tailscale dns query` (#13368)Andrea Gottardo2-1/+30
Updates tailscale/tailscale#13326 Adds a CLI subcommand to perform DNS queries using the internal DNS forwarder and observe its internals (namely, which upstream resolvers are being used). Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2024-09-10build(deps): bump ws from 8.14.2 to 8.17.1 in /client/web (#12524)dependabot[bot]1-3/+3
Bumps [ws](https://github.com/websockets/ws) from 8.14.2 to 8.17.1. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.14.2...8.17.1) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04cli: implement `tailscale dns status` (#13353)Andrea Gottardo2-0/+20
Updates tailscale/tailscale#13326 This PR begins implementing a `tailscale dns` command group in the Tailscale CLI. It provides an initial implementation of `tailscale dns status` which dumps the state of the internal DNS forwarder. Two new endpoints were added in LocalAPI to support the CLI functionality: - `/netmap`: dumps a copy of the last received network map (because the CLI shouldn't have to listen to the ipn bus for a copy) - `/dns-osconfig`: dumps the OS DNS configuration (this will be very handy for the UI clients as well, as they currently do not display this information) My plan is to implement other subcommands mentioned in tailscale/tailscale#13326, such as `query`, in later PRs. Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2024-09-03client/tailscale: adding missing proto field in ACL parsing structures (#13051)Seaver Thorn1-0/+2
Signed-off-by: Seaver Thorn <swthorn@ncsu.edu>
2024-08-27usermetric: add initial user-facing metricsKristoffer Dalby2-0/+12
This commit adds a new usermetric package and wires up metrics across the tailscale client. Updates tailscale/corp#22075 Co-authored-by: Anton Tolchanov <anton@tailscale.com> Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-08-22all: switch to and require Go 1.23Brad Fitzpatrick1-2/+2
Updates #12912 Change-Id: Ib4ae26eb5fb68ad2216cab4913811b94f7eed5b6 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-08-12client/tailscale: add LocalClient.OmitAuth for testsBrad Fitzpatrick1-2/+12
Similar to UseSocketOnly, but pulled out separately in case people are doing unknown weird things. Updates #13038 Change-Id: I7478e5cb9794439b947440b831caa798941845ea Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-08-09client/tailscale: add Via to UserRuleMatchMaisem Ali1-0/+3
This adds the Via field for the https://tailscale.com/kb/1378/via feature to the ACLPreview response. Updates tailscale/corp#22239 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2024-07-19cmd/tailscale: add --min-validity flag to the cert command (#12822)Andrew Lytvynov1-1/+14
Some users run "tailscale cert" in a cron job to renew their certificates on disk. The time until the next cron job run may be long enough for the old cert to expire with our default heristics. Add a `--min-validity` flag which ensures that the returned cert is valid for at least the provided duration (unless it's longer than the cert lifetime set by Let's Encrypt). Updates #8725 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2024-07-18{tool,client}: bump node version (#12840)Mario Minardi1-1/+1
Bump node version to latest lts on the 18.x line which is 18.20.4 at the time of writing. Updates https://github.com/tailscale/corp/issues/21741 Signed-off-by: Mario Minardi <mario@tailscale.com>
2024-07-18client/tailscale: document ACLTestFailureSummary.User fieldBrad Fitzpatrick1-1/+6
And justify its legacy name. Updates #1931 Change-Id: I3eff043679bf8f046aed6e2c4fb7592fe2e66514 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-07-15client/tailscale: add the nodeAttrs sectionAnton Tolchanov1-0/+11
This change allows ACL contents to include node attributes https://tailscale.com/kb/1337/acl-syntax#node-attributes-nodeattrs Updates tailscale/corp#20583 Signed-off-by: Anton Tolchanov <anton@tailscale.com>
2024-07-08client/tailscale: use safesocket.ConnectContextMaisem Ali1-1/+1
I apparently missed this in 4b6a0c42c89a6a004686a13e16d6a0821680d74d. Updates tailscale/corp#18266 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2024-06-18proxymap, various: distinguish between different protocolsAndrew Dunham1-0/+19
Previously, we were registering TCP and UDP connections in the same map, which could result in erroneously removing a mapping if one of the two connections completes while the other one is still active. Add a "proto string" argument to these functions to avoid this. Additionally, take the "proto" argument in LocalAPI, and plumb that through from the CLI and add a new LocalClient method. Updates tailscale/corp#20600 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I35d5efaefdfbf4721e315b8ca123f0c8af9125fb
2024-06-17client/tailscale: add NodeID to deviceKristoffer Dalby1-0/+5
Updates tailscale/corp#20514 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-06-14ipn/localapi,client/tailscale,cmd/derper: add WhoIs lookup by nodekey, use ↵Brad Fitzpatrick2-1/+59
in derper Fixes #12465 Change-Id: I9b7c87315a3d2b2ecae2b8db9e94b4f5a1eef74a Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-06-10ipn/{ipnlocal,localapi},net/netkernelconf,client/tailscale,cmd/containerboot ↵Irbe Krumina1-0/+21
: optionally enable UDP GRO forwarding for containers (#12410) Add a new TS_EXPERIMENTAL_ENABLE_FORWARDING_OPTIMIZATIONS env var that can be set for tailscale/tailscale container running as a subnet router or exit node to enable UDP GRO forwarding for improved performance. See https://tailscale.com/kb/1320/performance-best-practices#linux-optimizations-for-subnet-routers-and-exit-nodes This is currently considered an experimental approach; the configuration support is partially to allow further experimentation with containerized environments to evaluate the performance improvements. Updates tailscale/tailscale#12295 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-06-02tsnet,wgengine/netstack: add ListenPacket and testsMaisem Ali1-4/+16
This adds a new ListenPacket function on tsnet.Server which acts mostly like `net.ListenPacket`. Unlike `Server.Listen`, this requires listening on a specific IP and does not automatically listen on both V4 and V6 addresses of the Server when the IP is unspecified. To test this, it also adds UDP support to tsdial.Dialer.UserDial and plumbs it through the localapi. Then an associated test to make sure the UDP functionality works from both sides. Updates #12182 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2024-05-24all: do not depend on the testing packageMaisem Ali1-0/+1
Discovered while looking for something else. Updates tailscale/corp#18935 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2024-05-07web: use EditPrefs instead of passing UpdatePrefs to starting (#12040)kari-ts1-1/+9
Web version of https://github.com/tailscale/tailscale-android/pull/370 This allows us to update the prefs rather than creating new prefs Updates tailscale/tailscale#11731 Signed-off-by: kari-ts <kari@tailscale.com>
2024-04-17build(deps-dev): bump vite from 5.1.4 to 5.1.7 in /client/webdependabot[bot]2-37/+25
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.4 to 5.1.7. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.1.7/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.1.7/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16all: use Go 1.22 range-over-intBrad Fitzpatrick1-1/+1
Updates #11058 Change-Id: I35e7ef9b90e83cac04ca93fd964ad00ed5b48430 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-04-15cmd/tailscale, ipn/ipnlocal: add suggest exit node CLI option (#11407)Claire Wang2-0/+17
Updates tailscale/corp#17516 Signed-off-by: Claire Wang <claire@tailscale.com>
2024-04-07ipn/{ipnlocal,localapi}: add API to toggle use of exit nodeBrad Fitzpatrick1-0/+9
This is primarily for GUIs, so they don't need to remember the most recently used exit node themselves. This adds some CLI commands, but they're disabled and behind the WIP envknob, as we need to consider naming (on/off is ambiguous with running an exit node, etc) as well as automatic exit node selection in the future. For now the CLI commands are effectively developer debug things to test the LocalAPI. Updates tailscale/corp#18724 Change-Id: I9a32b00e3ffbf5b29bfdcad996a4296b5e37be7e Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-04-04tailscale: switch tailfs to drive syntax for api and logs (#11625)Charlotte Brandhorst-Satzkorn1-5/+5
This change switches the api to /drive, rather than the previous /tailfs as well as updates the log lines to reflect the new value. It also cleans up some existing tailfs references. Updates tailscale/corp#16827 Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
2024-04-03tailscale: update tailfs functions and vars to use drive naming (#11597)Charlotte Brandhorst-Satzkorn1-13/+13
This change updates all tailfs functions and the majority of the tailfs variables to use the new drive naming. Updates tailscale/corp#16827 Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
2024-04-02tailscale: update tailfs file and package names (#11590)Charlotte Brandhorst-Satzkorn2-7/+7
This change updates the tailfs file and package names to their new naming convention. Updates #tailscale/corp#16827 Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
2024-03-08ipn,cmd/tailscale,client/tailscale: add support for renaming TailFS sharesPercy Wegmann1-7/+16
- Updates API to support renaming TailFS shares. - Adds a CLI rename subcommand for renaming a share. - Renames the CLI subcommand 'add' to 'set' to make it clear that this is an add or update. - Adds a unit test for TailFS in ipnlocal Updates tailscale/corp#16827 Signed-off-by: Percy Wegmann <percy@tailscale.com>
2024-03-08ipn,tailfs: tie TailFS share configuration to user profilePercy Wegmann1-2/+2
Previously, the configuration of which folders to share persisted across profile changes. Now, it is tied to the user's profile. Updates tailscale/corp#16827 Signed-off-by: Percy Wegmann <percy@tailscale.com>
2024-03-07client/web: dedupe packages in yarn.lock (#11327)Mario Minardi1-374/+38
Run yarn-deduplicate on yarn.lock to dedupe packages. This is being done to reduce the number of redundant packages fetched by yarn when existing versions in the lockfile satisfy the version dependency we need. See https://github.com/scinos/yarn-deduplicate for details on the tool used to perform this deduplication. Updates #cleanup Signed-off-by: Mario Minardi <mario@tailscale.com>
2024-03-06client/tailscale: add postures to UserRuleMatchKristoffer Dalby1-8/+32
Updates tailscale/corp#17770 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-02-28client/web: fix Vite CJS deprecation warning (#11288)Ross Zurowski2-11/+14
Starting in Vite 5, Vite now issues a deprecation warning when using a CJS-based Vite config file. This commit fixes it by adding the `"type": "module"` to our package.json to opt our files into ESM module behaviours. Fixes #cleanup Signed-off-by: Ross Zurowski <ross@rosszurowski.com>
2024-02-27client/web: update to typescript 5.3.3 (#11267)Mario Minardi3-40/+125
Update typescript to 5.3.3. This is a major bump from the previous version of 4.8.3. This also requires adding newer versions of @typescript-eslint/eslint-plugin and @typescript-eslint/parser to our resolutions as eslint-config-react-app pulls in versions that otherwise do not support typescript 5.x. eslint-config-react-app has not been updated in 2 years and is seemingly abandoned, so we may wish to fork it or move to a different eslint config in the future. Updates https://github.com/tailscale/corp/issues/17810 Signed-off-by: Mario Minardi <mario@tailscale.com>
2024-02-26client/web: use grants on web UI frontendSonia Appasamy10-310/+548
Starts using peer capabilities to restrict the management client on a per-view basis. This change also includes a bulky cleanup of the login-toggle.tsx file, which was getting pretty unwieldy in its previous form. Updates tailscale/corp#16695 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2024-02-26client/web: restrict serveAPI endpoints to peer capabilitiesSonia Appasamy3-127/+357
This change adds a new apiHandler struct for use from serveAPI to aid with restricting endpoints to specific peer capabilities. Updates tailscale/corp#16695 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2024-02-26tailfs: replace webdavfs with reverse proxiesPercy Wegmann1-1/+1
Instead of modeling remote WebDAV servers as actual webdav.FS instances, we now just proxy traffic to them. This not only simplifies the code, but it also allows WebDAV locking to work correctly by making sure locks are handled by the servers that need to (i.e. the ones actually serving the files). Updates tailscale/corp#16827 Signed-off-by: Percy Wegmann <percy@tailscale.com>
2024-02-23client/web: update vite and vitest to latest versions (#11200)Mario Minardi4-294/+496
Update vite to 5.1.4, and vitest to 1.3.1 (their latest versions). Also remove vite-plugin-rewrite-all as this is no longer necessary with vite 5.x and has a dependency on vite 4.x. Updates https://github.com/tailscale/corp/issues/17715 Signed-off-by: Mario Minardi <mario@tailscale.com>
2024-02-22client/web: update plugin-react-swc to latest version (#11199)Mario Minardi2-60/+73
Update plugin-react-swc to the latest version (3.6.0) ahead of updating vite to 5.x. Updates https://github.com/tailscale/corp/issues/17715 Signed-off-by: Mario Minardi <mario@tailscale.com>
2024-02-22client/web: update vite-plugin-svgr to latest version (#11197)Mario Minardi15-93/+125
Update vite-plugin-svgr to the latest version (4.2.0) ahead of updating vite to 5.x. This is a major version bump from our previous 3.x, and requires changing the import paths used for SVGs. Updates https://github.com/tailscale/corp/issues/17715 Signed-off-by: Mario Minardi <mario@tailscale.com>
2024-02-09tailfs: clean up naming and package structurePercy Wegmann2-11/+26
- Restyles tailfs -> tailFS - Defines interfaces for main TailFS types - Moves implemenatation of TailFS into tailfsimpl package Updates tailscale/corp#16827 Signed-off-by: Percy Wegmann <percy@tailscale.com>
2024-02-09build(deps-dev): bump vite from 4.4.9 to 4.5.2 in /client/webdependabot[bot]2-5/+5
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.9 to 4.5.2. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09client/web: only check policy caps for tagged nodesSonia Appasamy3-12/+61
For user-owned nodes, only the owner is ever allowed to manage the node. Updates tailscale/corp#16695 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2024-02-09tailfs: initial implementationPercy Wegmann1-0/+43
Add a WebDAV-based folder sharing mechanism that is exposed to local clients at 100.100.100.100:8080 and to remote peers via a new peerapi endpoint at /v0/tailfs. Add the ability to manage folder sharing via the new 'share' CLI sub-command. Updates tailscale/corp#16827 Signed-off-by: Percy Wegmann <percy@tailscale.com>
2024-02-08client/web: use smart quotes in web UI frontendWill Norris7-6/+14
add the curly-quotes eslint plugin (same that we use for the admin panel), and fix existing straight quotes in the current web UI. Updates #cleanup Signed-off-by: Will Norris <will@tailscale.com>
2024-02-08client/web: add new readonly modeWill Norris3-6/+30
The new read-only mode is only accessible when running `tailscale web` by passing a new `-readonly` flag. This new mode is identical to the existing login mode with two exceptions: - the management client in tailscaled is not started (though if it is already running, it is left alone) - the client does not prompt the user to login or switch to the management client. Instead, a message is shown instructing the user to use other means to manage the device. Updates #10979 Signed-off-by: Will Norris <will@tailscale.com>