summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2024-01-21Wipirbekrm/proxyclass2Irbe Krumina10-9/+928
Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-16licenses: mention tvOS in apple.md (#10872)Andrea Gottardo1-3/+3
Signed-off-by: Andrea Gottardo <andrea@tailscale.com>
2024-01-16licenses: update tailscale{,d} licensesLicense Updater1-4/+4
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2024-01-16licenses: update android licensesLicense Updater1-7/+7
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2024-01-16all: make use of ctxkey everywhere (#10846)Joe Tsai13-85/+97
Also perform minor cleanups on the ctxkey package itself. Provide guidance on when to use ctxkey.Key[T] over ctxkey.New. Also, allow for interface kinds because the value wrapping trick also happens to fix edge cases with interfaces in Go. Updates #cleanup Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2024-01-16tstime/rate: implement Value.{Marshal,Unmarshal}JSON (#8481)Joe Tsai2-0/+64
Implement support for marshaling and unmarshaling a Value. Updates tailscale/corp#8427 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2024-01-16cmd/k8s-operator: warn if unsupported Ingress Exact path type is used. (#10865)Irbe Krumina1-0/+9
To reduce the likelihood of breaking users, if we implement stricter Exact path type matching in the future. Updates tailscale/tailscale#10730 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-16cmd/k8s-operator: sync StatefulSet labels to their Pods (#10861)Irbe Krumina2-1/+10
So that users have predictable label values to use when configuring network policies. Updates tailscale/tailscale#10854 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-16cmd/k8s-operator: adds a tailscale IngressClass resource, prints warning if ↵Irbe Krumina5-1/+66
class not found. (#10823) * cmd/k8s-operator/deploy: deploy a Tailscale IngressClass resource. Some Ingress validating webhooks reject Ingresses with .spec.ingressClassName for which there is no matching IngressClass. Additionally, validate that the expected IngressClass is present, when parsing a tailscale `Ingress`. We currently do not utilize the IngressClass, however we might in the future at which point we might start requiring that the right class for this controller instance actually exists. Updates tailscale/tailscale#10820 Signed-off-by: Irbe Krumina <irbe@tailscale.com> Co-authored-by: Anton Tolchanov <anton@tailscale.com>
2024-01-13licenses: update win/apple licensesLicense Updater2-7/+7
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2024-01-12util/ctxkey: add package for type-safe context keys (#10841)Joe Tsai2-0/+221
The lack of type-safety in context.WithValue leads to the common pattern of defining of package-scoped type to ensure global uniqueness: type fooKey struct{} func withFoo(ctx context, v Foo) context.Context { return context.WithValue(ctx, fooKey{}, v) } func fooValue(ctx context) Foo { v, _ := ctx.Value(fooKey{}).(Foo) return v } where usage becomes: ctx = withFoo(ctx, foo) foo := fooValue(ctx) With many different context keys, this can be quite tedious. Using generics, we can simplify this as: var fooKey = ctxkey.New("mypkg.fooKey", Foo{}) where usage becomes: ctx = fooKey.WithValue(ctx, foo) foo := fooKey.Value(ctx) See https://go.dev/issue/49189 Updates #cleanup Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2024-01-12net/netmon: when a new network is added, trigger netmon update (#10840)kari-ts1-0/+22
Fixes #10107
2024-01-12ipn/ipnserver: always allow Windows SYSTEM user to connectWill Norris4-2/+28
When establishing connections to the ipnserver, we validate that the local user is allowed to connect. If Tailscale is currently being managed by a different user (primarily for multi-user Windows installs), we don't allow the connection. With the new device web UI, the inbound connection is coming from tailscaled itself, which is often running as "NT AUTHORITY\SYSTEM". In this case, we still want to allow the connection, even though it doesn't match the user running the Tailscale GUI. The SYSTEM user has full access to everything on the system anyway, so this doesn't escalate privileges. Eventually, we want the device web UI to run outside of the tailscaled process, at which point this exception would probably not be needed. Updates tailscale/corp#16393 Signed-off-by: Will Norris <will@tailscale.com>
2024-01-12derp: optimize another per client field alignmentJames Tucker1-4/+4
Updates #self Signed-off-by: James Tucker <james@tailscale.com>
2024-01-12derp: remove unused per-client struct fieldJames Tucker1-2/+0
Updates #self Signed-off-by: James Tucker <james@tailscale.com>
2024-01-12go.mod: update web-client-prebuilt moduleOSS Updater2-3/+3
Signed-off-by: OSS Updater <noreply+oss-updater@tailscale.com>
2024-01-12derp: optimize field order to reduce GC costJames Tucker1-4/+4
See the field alignment lints for more information. Reductions are 64->24 and 64->32 respectively. Updates #self Signed-off-by: James Tucker <james@tailscale.com>
2024-01-12cmd/tailscale/cli: add description to exit-node CLI commandCharlotte Brandhorst-Satzkorn1-0/+2
This change adds a description to the exit-node CLI command. This description will be displayed when using `tailscale -h` and `tailscale exit-node -h`. Fixes #10787 Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
2024-01-12cmd/k8s-operator: minor fix in name gen (#10830)Irbe Krumina2-5/+3
Updates#cleanup Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-11client/web: skip connectivity check on httpsWill Norris1-3/+18
The manage client always listens on http (non-secure) port 5252. If the login client is loaded over https, then the connectivity check to `/ok` will fail with a mixed-content error. Mixed-content enforcement is a browser setting that we have no control over, so there's no way around this. In this case of the login client being loaded over https, we skip the connectivity check entirely. We will always render the sign-in button, though we don't know for sure if the user has connectivity, so we provide some additional help text in case they have trouble signing in. Updates hassio-addons/addon-tailscale#314 Signed-off-by: Will Norris <will@tailscale.com>
2024-01-11derp: reduce excess goroutines blocking on broadcastsJames Tucker1-0/+11
Observed on one busy derp node, there were 600 goroutines blocked writing to this channel, which represents not only more blocked routines than we need, but also excess wake-ups downstream as the latent goroutines writes represent no new work. Updates #self Signed-off-by: James Tucker <james@tailscale.com>
2024-01-11cmd/k8s-operator: remove configuration knob for Connector (#10791)Irbe Krumina4-30/+17
The configuration knob (that defaulted to Connector being disabled) was added largely because the Connector CRD had to be installed in a separate step. Now when the CRD has been added to both chart and static manifest, we can have it on by default. Updates tailscale/tailscale#10878 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-11cmd/k8s-operator: fix base truncating for extra long Service names (#10825)Irbe Krumina2-36/+28
cmd/k8s-operator: fix base truncating for extra long Service names StatefulSet names for ingress/egress proxies are calculated using Kubernetes name generator and the parent resource name as a base. The name generator also cuts the base, but has a higher max cap. This commit fixes a bug where, if we get a shortened base back from the generator, we cut off too little as the base that we have cut will be passed into the generator again, which will then itself cut less because the base is shorter- so we end up with a too long name again. Updates tailscale/tailscale#10807 Co-authored-by: Maisem Ali <maisem@tailscale.com> Signed-off-by: Irbe Krumina <irbekrm@gmail.com>
2024-01-11client/web: add initial types for using peer capabilitiesSonia Appasamy4-4/+225
Sets up peer capability types for future use within the web client views and APIs. Updates tailscale/corp#16695 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2024-01-10wgengine/router: look up absolute path to netsh.exe on WindowsAndrew Dunham2-1/+61
This is in response to logs from a customer that show that we're unable to run netsh due to the following error: router: firewall: adding Tailscale-Process rule to allow UDP for "C:\\Program Files\\Tailscale\\tailscaled.exe" ... router: firewall: error adding Tailscale-Process rule: exec: "netsh": cannot run executable found relative to current directory: There's approximately no reason to ever dynamically look up the path of a system utility like netsh.exe, so instead let's first look for it in the System32 directory and only if that fails fall back to the previous behaviour. Updates #10804 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I68cfeb4cab091c79ccff3187d35f50359a690573
2024-01-10Makefile,build_docker.sh: allow to configure target platform. (#10806)Irbe Krumina2-2/+7
Build dev tailscale and k8s-operator images for linux/amd64 only by default, make it possible to configure target build platform via PLATFORM var. Updates#cleanup Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-10go.mod.sri: update SRI hash for go.mod changesFlakes Updater3-3/+3
Signed-off-by: Flakes Updater <noreply+flakes-updater@tailscale.com>
2024-01-10version/mkversion: allow version override with $TS_VERSION_OVERRIDE (#10799)Andrew Lytvynov1-0/+7
This is useful to build local binaries with custom versions to test version-specific logic (like updates). Updates https://github.com/tailscale/corp/issues/16703 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2024-01-10go.mod: update golang-x-crypto fork (#10786)Andrew Lytvynov3-13/+11
Pick up a bunch of recent upstream commits. Updates #8593 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2024-01-10safesocket: detect macsys from within tailscaledWill Norris1-1/+3
Use the helper method from the version package to detect that we are running the macsys network extension. This method does the same check for the HOME environment variable (which works fine in most cases) as well as the name of the executable (which is needed for the web client). Updates tailscale/corp#16393 Signed-off-by: Will Norris <will@tailscale.com>
2024-01-10go.mod: update web-client-prebuilt moduleOSS Updater2-3/+3
Signed-off-by: OSS Updater <noreply+oss-updater@tailscale.com>
2024-01-10cmd/k8s-operator: add Connector CRD to Helm chart and static manifests (#10775)Irbe Krumina5-10/+273
cmd/k8s-operator: add CRD to chart and static manifest Add functionality to insert CRD to chart at package time. Insert CRD to static manifests as this is where they are currently consumed from. Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-09cli/set: add printout when web client startedSonia Appasamy1-1/+10
Prints a helpful message with the web UI's address when running tailscale set --webclient. Updates tailscale/corp#16345 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2024-01-09taildrop: remove breaking abstraction layers for apple (#10728)Rhea Ghosh6-58/+20
Removes the avoidFinalRename logic and all associated code as it is no longer required by the Apple clients. Enables resume logic to be usable for Apple clients. Fixes tailscale/corp#14772 Signed-off-by: Rhea Ghosh <rhea@tailscale.com>
2024-01-09.github/workflows/govulncheck: migrate to a Github App (#10793)Andrew Lytvynov1-11/+24
Send failures to a new channel using a github app token instead of webhook URL. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2024-01-09net/netutil: allow 16-bit 4via6 site IDsAndrew Dunham3-7/+26
The prefix has space for 32-bit site IDs, but the validateViaPrefix function would previously have disallowed site IDs greater than 255. Fixes tailscale/corp#16470 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I4cdb0711dafb577fae72d86c4014cf623fa538ef
2024-01-09cmd/k8s-operator,k8s-operator: allow the operator to deploy exit nodes via ↵Irbe Krumina10-792/+1052
Connector custom resource (#10724) cmd/k8s-operator/deploy/crds,k8s-operator/apis/v1alpha1: allow to define an exit node via Connector CR. Make it possible to define an exit node to be deployed to a Kubernetes cluster via Connector Custom resource. Also changes to Connector API so that one Connector corresponds to one Tailnet node that can be either a subnet router or an exit node or both. The Kubernetes operator parses Connector custom resource and, if .spec.isExitNode is set, configures that Tailscale node deployed for that connector as an exit node. Signed-off-by: Irbe Krumina <irbe@tailscale.com> Co-authored-by: Anton Tolchanov <anton@tailscale.com>
2024-01-08cmd/{derper,stund},net/stunserver: add standalone stun serverJames Tucker8-110/+474
Add a standalone server for STUN that can be hosted independently of the derper, and factor that back into the derper. Fixes #8434 Closes #8435 Closes #10745 Signed-off-by: James Tucker <james@tailscale.com>
2024-01-08client/web: ensure path prefix has a leading slashWill Norris2-22/+52
This is simply an extra check to prevent hypothetical issues if a prefix such as `--prefix="javascript:alert(1)"` was provided. This isn't really necessary since the prefix is a configuration flag provided by the device owner, not user input. But it does enforce that we are always interpreting the provided value as a path relative to the root. Fixes: tailscale/corp#16268 Signed-off-by: Will Norris <will@tailscale.com>
2024-01-08licenses: update win/apple licensesLicense Updater2-9/+25
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2024-01-08licenses: update tailscale{,d} licensesLicense Updater1-4/+4
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2024-01-08tstest/integration: add tests for auto-update defaulting behavior (#10763)Andrew Lytvynov1-0/+95
Updates #16244 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2024-01-08client/web: rename Disconnect to Log outSonia Appasamy3-12/+30
For consistency w/ the CLI command. And to be more accurate to what is actually happening on this action - node key is expired. Also updates the disconnected view shown after logout. Updates #10261 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2024-01-08cmd/containerboot: add EXPERIMENTAL_TS_CONFIGFILE_PATH env var to allow ↵Irbe Krumina2-56/+148
passing tailscaled config in a file (#10759) * cmd/containerboot: optionally configure tailscaled with a configfile. If EXPERIMENTAL_TS_CONFIGFILE_PATH env var is set, only run tailscaled with the provided config file. Do not run 'tailscale up' or 'tailscale set'. * cmd/containerboot: store containerboot accept_dns val in bool pointer So that we can distinguish between the value being set to false explicitly bs being unset. Signed-off-by: Irbe Krumina <irbe@tailscale.com>
2024-01-05ipn: apply ControlURL policy before loginAdrian Dewhurst3-5/+16
Unlike most prefs, the ControlURL policy needs to take effect before login. This resolves an issue where on first start, even when the ControlURL policy is set, it will generate a login URL to the Tailscale SaaS server. Updates tailscale/coral#118 Fixes #10736 Change-Id: I6da2a521f64028c15dbb6ac8175839fc3cc4e858 Signed-off-by: Adrian Dewhurst <adrian@tailscale.com>
2024-01-05docs: add Windows administrative templateAdrian Dewhurst2-0/+478
To make setting Windows policies easier, this adds ADMX policy descriptions. Fixes #6495 Updates ENG-2515 Change-Id: If4613c9d8ec734afec8bd781575e24b4aef9bb73 Signed-off-by: Adrian Dewhurst <adrian@tailscale.com>
2024-01-05net/dns/resolver: add ID to verbose logs in forwarderAndrew Dunham1-2/+7
To make it easier to correlate the starting/ending log messages. Updates #cleanup Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I2802d53ad98e19bc8914bc58f8c04d4443227b26
2024-01-05taildrop: Allow category Z unicode characters (#10750)Rhea Ghosh2-1/+2
This will expand the unicode character categories that we allow for valid filenames to go from "L, M, N, P, S, and the ASCII space character" to "L, M, N, P, S, Zs" Fixes #10105 Signed-off-by: Rhea Ghosh <rhea@tailscale.com>
2024-01-05cmd/tailscale, ipn/ipnlocal: add 'debug dial-types' commandAndrew Dunham2-0/+139
This command allows observing whether a given dialer ("SystemDial", "UserDial", etc.) will successfully obtain a connection to a provided host, from inside tailscaled itself. This is intended to help debug a variety of issues from subnet routers to split DNS setups. Updates #9619 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: Ie01ebb5469d3e287eac633ff656783960f697b84
2024-01-05util/winutil: add some missing docs to restartmgr errorsAaron Klotz1-0/+5
Just a quick #cleanup. Signed-off-by: Aaron Klotz <aaron@tailscale.com>