Jordan Whited
12d5c99b04
client/tailscale,ipn/{ipnlocal,localapi}: check UDP GRO config ( #10071 )
...
Updates tailscale/corp#9990
Signed-off-by: Jordan Whited <jordan@tailscale.com >
2023-11-09 11:34:41 -08:00
Will Norris
fdbe511c41
cmd/tailscale: add -webclient flag to up and set
...
Initially, only expose this flag on dev and unstable builds.
Updates tailscale/corp#14335
Signed-off-by: Will Norris <will@tailscale.com >
2023-11-08 10:00:58 -08:00
James Tucker
ca4c940a4d
ipn: introduce app connector advertisement preference and flags
...
Introduce a preference structure to store the setting for app connector
advertisement.
Introduce the associated flags:
tailscale up --advertise-connector{=true,=false}
tailscale set --advertise-connector{=true,=false}
```
% tailscale set --advertise-connector=false
% tailscale debug prefs | jq .AppConnector.Advertise
false
% tailscale set --advertise-connector=true
% tailscale debug prefs | jq .AppConnector.Advertise
true
% tailscale up --advertise-connector=false
% tailscale debug prefs | jq .AppConnector.Advertise
false
% tailscale up --advertise-connector=true
% tailscale debug prefs | jq .AppConnector.Advertise
true
```
Updates tailscale/corp#15437
Signed-off-by: James Tucker <james@tailscale.com >
2023-11-01 10:58:54 -07:00
Andrew Lytvynov
33bb2bbfe9
tailcfg,cmd/tailscale: add UrgentSecurityUpdate flag to ClientVersion ( #9848 )
...
This flag is used in clients to surface urgent updates more prominently.
Updates #755
Signed-off-by: Andrew Lytvynov <awly@tailscale.com >
2023-10-17 11:04:44 -07:00
Kristoffer Dalby
623926a25d
cmd/tailscale: add --posture-checking flag to set
...
Updates #5902
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com >
2023-10-09 08:15:38 +02:00
Andrew Lytvynov
3ee756757b
cmd/tailscale/cli: add update notification to "up" ( #9644 )
...
Add available update message in "tailscale up" output. Also update the
message in "tailscale status" to match and mention auto-update.
Updates https://github.com/tailscale/tailscale/issues/755
Signed-off-by: Andrew Lytvynov <awly@tailscale.com >
2023-10-05 16:21:06 -07:00
Andrew Lytvynov
34e3450734
cmd/tailscale,ipn: add auto-update flags and prefs ( #8861 )
...
The flags are hidden for now. Adding propagation to tailscaled and
persistence only. The prefs field is wrapped in a struct to allow for
future expansion (like update schedule).
Updates #6907
Signed-off-by: Andrew Lytvynov <awly@tailscale.com >
2023-09-01 13:45:12 -07:00
Will Norris
69f1324c9e
cmd/tailscale: refactor shared utility methods
...
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-09 08:59:10 -07:00
Maisem Ali
682fd72f7b
util/testenv: add new package to hold InTest
...
Removes duplicated code.
Updates #cleanup
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2023-08-08 19:51:44 -06:00
Maisem Ali
6aaf1d48df
types/persist: drop duplicated Persist.LoginName
...
It was duplicated from Persist.UserProfile.LoginName, drop it.
Updates #7726
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2023-08-08 13:43:37 -06:00
Tom DNetto
abcb7ec1ce
cmd/tailscale: warn if node is locked out on bringup
...
Updates https://github.com/tailscale/corp/issues/12718
Signed-off-by: Tom DNetto <tom@tailscale.com >
2023-07-19 12:31:21 -05:00
Denton Gentry
4f95b6966b
cmd/tailscale: remove TS_EXPERIMENT_OAUTH_AUTHKEY guardrail
...
We've had support for OAuth client keys in `--authkey=...`
for several releases, and we're using it in
https://github.com/tailscale/github-action
Remove the TS_EXPERIMENT_* guardrail, it is fully supported now.
Fixes https://github.com/tailscale/tailscale/issues/8403
Signed-off-by: Denton Gentry <dgentry@tailscale.com >
2023-07-13 07:20:38 -07:00
Brad Fitzpatrick
4664318be2
client/tailscale: revert CreateKey API change, add Client.CreateKeyWithExpiry
...
The client/tailscale is a stable-ish API we try not to break. Revert
the Client.CreateKey method as it was and add a new
CreateKeyWithExpiry method to do the new thing. And document the
expiry field and enforce that the time.Duration can't be between in
range greater than 0 and less than a second.
Updates #7143
Updates #8124 (reverts it, effectively)
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2023-05-12 21:05:12 -07:00
shayne
678bb92bb8
cmd/tailscale/cli: [up] fix CreateKey missing argument ( #8124 )
...
Signed-off-by: Shayne Sweeney <shayne@tailscale.com >
2023-05-12 02:03:17 -04:00
Maisem Ali
a8f10c23b2
cmd/tailscale/cli: [up] reuse --advertise-tags for OAuth key generation
...
We need to always specify tags when creating an AuthKey from an OAuth key.
Check for that, and reuse the `--advertise-tags` param.
Updates #7982
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2023-04-26 14:17:29 -07:00
Brad Fitzpatrick
b2b5379348
cmd/tailscale/cli: [up] change oauth authkey format
...
Updates #7982
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2023-04-26 13:36:17 -07:00
Brad Fitzpatrick
13de36303d
cmd/tailscale/cli: [up] add experimental oauth2 authkey support
...
Updates #7982
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2023-04-26 12:25:42 -07:00
Anton Tolchanov
2a933c1903
cmd/tailscale: extend hostname validation ( #7678 )
...
In addition to checking the total hostname length, validate characters used in each DNS label and label length.
Updates https://github.com/tailscale/corp/issues/10012
Signed-off-by: Anton Tolchanov <anton@tailscale.com >
2023-03-27 18:21:58 +01:00
James 'zofrex' Sanderson
9534783758
tailscale/cmd: Warn for up --force-reauth over SSH without accepting the risk ( #7575 )
...
Fixes #6377
Signed-off-by: James Sanderson <jsanderson@tailscale.com >
2023-03-16 15:47:24 +00:00
Sonia Appasamy
0c1510739c
cmd/tailscale/cli: update device authorization copy
...
"Device Authorization" was recently renamed to "Device Approval"
on the control side. This change updates the linux cli to match.
Signed-off-by: Sonia Appasamy <sonia@tailscale.com >
2023-03-01 14:02:28 -05:00
Brad Fitzpatrick
b1248442c3
all: update to Go 1.20, use strings.CutPrefix/Suffix instead of our fork
...
Updates #7123
Updates #5309
Change-Id: I90bcd87a2fb85a91834a0dd4be6e03db08438672
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2023-02-01 15:23:54 -08:00
Will Norris
71029cea2d
all: update copyright and license headers
...
This updates all source files to use a new standard header for copyright
and license declaration. Notably, copyright no longer includes a date,
and we now use the standard SPDX-License-Identifier header.
This commit was done almost entirely mechanically with perl, and then
some minimal manual fixes.
Updates #6865
Signed-off-by: Will Norris <will@tailscale.com >
2023-01-27 15:36:29 -08:00
Brad Fitzpatrick
8aac77aa19
cmd/tailscale: fix "up" warning about netfilter-mode on Synology
...
Fixes #6811
Change-Id: Ia43723e6ebedc9b01729897cec271c462b16e9ae
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-12-20 12:03:17 -08:00
Mihai Parparita
5b8323509f
cmd/tailscale/cli: use "account" instead of "profile" in user-visible text
...
Matches the UI clients
Updates #713
Signed-off-by: Mihai Parparita <mihai@tailscale.com >
2022-12-02 09:01:44 -08:00
Brad Fitzpatrick
7e016c1d90
ipn/ipnserver: remove IPN protocol server
...
Unused in this repo as of the earlier #6450 (300aba61a6 )
and unused in the Windows GUI as of tailscale/corp#8065 .
With this ipn.BackendServer is no longer used and could also be
removed from this repo. The macOS and iOS clients still temporarily
depend on it, but I can move it to that repo instead while and let its
migration proceed on its own schedule while we clean this repo up.
Updates #6417
Updates tailscale/corp#8051
Change-Id: Ie13f82af3eb9f96b3a21c56cdda51be31ddebdcf
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-25 08:12:06 -08:00
Brad Fitzpatrick
300aba61a6
ipn, cmd/tailscale/cli: add LocalAPI IPN bus watch, Start, convert CLI
...
Updates #6417
Updates tailscale/corp#8051
Change-Id: I1ca360730c45ffaa0261d8422877304277fc5625
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-22 13:11:44 -08:00
Maisem Ali
b94b91c168
cmd/tailscale/cli: add ability to set short names for profiles
...
This adds a `--nickname` flag to `tailscale login|set`.
Updates #713
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-11-22 04:03:24 +05:00
Mihai Parparita
33520920c3
all: use strs.CutPrefix and strs.CutSuffix more
...
Updates places where we use HasPrefix + TrimPrefix to use the combined
function.
Updates #5309
Signed-off-by: Mihai Parparita <mihai@tailscale.com >
2022-11-21 14:32:16 -08:00
Maisem Ali
f3519f7b29
cmd/tailscale/cli: add login and switch subcommands
...
Updates #713
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-11-17 10:27:56 +05:00
Maisem Ali
1f4669a380
all: standardize on LocalAPI
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-11-16 23:15:24 +05:00
Maisem Ali
8e85227059
cmd/tailscale/cli: [set] handle selectively modifying routes/exit node
...
Noticed this while debugging something else, we would reset all routes if
either `--advertise-exit-node` or `--advertise-routes` were set. This handles
correctly updating them.
Also added tests.
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-11-13 08:17:51 +05:00
Brad Fitzpatrick
08e110ebc5
cmd/tailscale: make "up", "status" warn if routes and --accept-routes off
...
Example output:
# Health check:
# - Some peers are advertising routes but --accept-routes is false
Also, move "tailscale status" health checks to the bottom, where they
won't be lost in large netmaps.
Updates #2053
Updates #6266
Change-Id: I5ae76a0cd69a452ce70063875cd7d974bfeb8f1a
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-11 10:56:50 -08:00
Maisem Ali
4d330bac14
ipn/ipnlocal: add support for multiple user profiles
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-11-11 10:45:47 +05:00
Brad Fitzpatrick
a7f7e79245
cmd/tailscale/cli: hide old, useless --host-routes flag
...
It was from very early Tailscale and no longer makes sense.
Change-Id: I31b4e728789f26b0376ebe73aa1b4bbbb1d62607
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-11-01 10:54:49 -07:00
Maisem Ali
19b5586573
cmd/tailscale/cli: add beginnings of tailscale set
...
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-10-25 22:27:37 -07:00
Brad Fitzpatrick
9475801ebe
ipn/ipnlocal: fix E.G.G. port number accounting
...
Change-Id: Id35461fdde79448372271ba54f6e6af586f2304d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-10-18 06:43:47 -07:00
Brad Fitzpatrick
ed248b04a7
cmd/tailscale: remove leftover debug prints from earlier commit
...
From 6632504f45
Change-Id: If21789232b3ecc14c1639cf87814af6fa73f535f
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-09-19 21:13:56 -07:00
Maisem Ali
6632504f45
cmd/tailscale/cli: [up] move lose-ssh check after other validations
...
The check was happening too early and in the case of error would wait 5
s and then error out. This makes it so that it does validations before
the SSH check.
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-09-19 12:04:14 -07:00
Brad Fitzpatrick
ba3cc08b62
cmd/tailscale/cli: add backwards compatibility 'up' processing for legacy client
...
Updates tailscale/corp#6781
Change-Id: I843fc810cbec0140d423d65db81e90179d6e0fa5
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-09-01 14:21:48 -07:00
Kamal Nasser
f983962fc6
fix typo in incomplete default routes error message
...
Signed-off-by: Kamal Nasser <hello@kamal.io >
2022-08-20 14:02:17 -07:00
Mihai Parparita
e846481731
cmd/tailscale/cli: use printf and outln consistently
...
Fix some fmt.Println and fmt.Printf calls that crept in since
5df7ac70d6 .
Signed-off-by: Mihai Parparita <mihai@tailscale.com >
2022-08-02 12:37:45 -07:00
Brad Fitzpatrick
116f55ff66
all: gofmt for Go 1.19
...
Updates #5210
Change-Id: Ib02cd5e43d0a8db60c1f09755a8ac7b140b670be
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-08-02 10:08:05 -07:00
Brad Fitzpatrick
a12aad6b47
all: convert more code to use net/netip directly
...
perl -i -npe 's,netaddr.IPPrefixFrom,netip.PrefixFrom,' $(git grep -l -F netaddr.)
perl -i -npe 's,netaddr.IPPortFrom,netip.AddrPortFrom,' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IPPrefix,netip.Prefix,g' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IPPort,netip.AddrPort,g' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IP\b,netip.Addr,g' $(git grep -l -F netaddr. )
perl -i -npe 's,netaddr.IPv6Raw\b,netip.AddrFrom16,g' $(git grep -l -F netaddr. )
goimports -w .
Then delete some stuff from the net/netaddr shim package which is no
longer neeed.
Updates #5162
Change-Id: Ia7a86893fe21c7e3ee1ec823e8aba288d4566cd8
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-07-25 21:53:49 -07:00
Brad Fitzpatrick
6a396731eb
all: use various net/netip parse funcs directly
...
Mechanical change with perl+goimports.
Changed {Must,}Parse{IP,IPPrefix,IPPort} to their netip variants, then
goimports -d .
Finally, removed the net/netaddr wrappers, to prevent future use.
Updates #5162
Change-Id: I59c0e38b5fbca5a935d701645789cddf3d7863ad
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-07-25 21:12:28 -07:00
Brad Fitzpatrick
7eaf5e509f
net/netaddr: start migrating to net/netip via new netaddr adapter package
...
Updates #5162
Change-Id: Id7bdec303b25471f69d542f8ce43805328d56c12
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-07-25 16:20:43 -07:00
soypete
412c4c55e2
cmd/tailscale: make up respect explicitly empty --operator= value
...
Fixes #3808
Signed-off-by: soypete <miriah@tailscale.com >
2022-06-27 13:59:45 -06:00
Brad Fitzpatrick
467eb2eca0
cmd/tailscale/cli, ipn/ipnlocal: give SSH tips when off/unconfigured
...
Updates #3802
Change-Id: I6b9a3175f68a6daa670f912561f2c2ececc07770
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-06-17 19:37:59 -07:00
Brad Fitzpatrick
2bac8b6013
Revert "cmd/tailscale/cli: disallow --ssh on Synology"
...
This reverts commit 03e3e6abcd
in favor of #4785 .
Change-Id: Ied65914106917c4cb8d15d6ad5e093a6299d1d48
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com >
2022-06-03 13:49:42 -07:00
Maisem Ali
03e3e6abcd
cmd/tailscale/cli: disallow --ssh on Synology
...
Updates tailscale/corp#5468
Updates #3802
Signed-off-by: Maisem Ali <maisem@tailscale.com >
2022-06-04 01:39:33 +05:00
Jordan Whited
43f9c25fd2
cmd/tailscale: surface authentication errors in status.Health ( #4748 )
...
Fixes #3713
Signed-off-by: Jordan Whited <jordan@tailscale.com >
2022-06-03 10:52:07 -07:00