Covers a new ProxyGroup getting a Parallel StatefulSet, and an existing
OrderedReady one being deleted and then recreated as Parallel.
Updates tailscale/corp#38175
Signed-off-by: chaosinthecrd <[email protected]>
With a readiness probe and the default OrderedReady policy, one unready
ProxyGroup Pod stops the rest from starting, so ProxyGroup StatefulSets now
use Parallel. The policy can't change in place, so an existing StatefulSet is
deleted with its Pods orphaned and recreated, adopting them.
Updates tailscale/corp#38175
Signed-off-by: chaosinthecrd <[email protected]>
Covers the ProxyClass probe defaults and overrides, the env cases that skip or
move the probes, probes on ProxyGroup proxies, and rejecting probes on the
init container or with an env that leaves the endpoints unreachable.
Updates tailscale/corp#38175
Signed-off-by: chaosinthecrd <[email protected]>
Proxies now serve /livez and /readyz, but nothing points Kubernetes probes at
them. This adds livenessProbe and readinessProbe fields to the ProxyClass
Tailscale container, each off unless set, with tunable timing (older proxy
images don't serve the endpoints, so a probe would fail against them), and
wires them into ProxyGroup proxies. A ProxyGroup is rejected if its ProxyClass
sets probes but its env would leave the endpoints unreachable, such as
TS_ENABLE_HEALTH_CHECK=false, TS_LOCAL_ADDR_PORT on loopback, or the
deprecated TS_HEALTHCHECK_ADDR_PORT. Probes follow a custom TS_LOCAL_ADDR_PORT
port, and liveness gets a 5s timeout by default, as a restart drops traffic
that a slow tailscaled still carries.
Updates tailscale/corp#38175
Signed-off-by: chaosinthecrd <[email protected]>
Covers the Probe handlers and conditions, AllCertsPresent with present,
missing, expired and unreadable certs, and the containerboot checks for
tailscaled failing or timing out, certs for advertised HTTPS-only Services and
a serve config file that doesn't exist.
Updates tailscale/corp#38175
Signed-off-by: chaosinthecrd <[email protected]>
Proxies only serve /healthz, which reports whether the node has a tailnet IP,
so it can't back a liveness or readiness probe. When TS_ENABLE_HEALTH_CHECK is
set, containerboot now also serves /livez, which fails only when tailscaled
stops answering LocalAPI, and /readyz, which passes once the node has tailnet
IPs and, with TS_SERVE_CONFIG set, has applied the serve config and has a cert
for each HTTPS-only Tailscale Service it advertises. Certs are checked through
the read-only cert-status endpoint so the probe never triggers issuance. An
expired or unreadable cert counts as present, as failing readiness on it would
stop a StatefulSet rollout before it reaches the replica that renews certs.
Updates tailscale/corp#38175
Signed-off-by: chaosinthecrd <[email protected]>
Add an optional auth-exchange-attempts flag to up that allows for
controlling the number of attempts made on transient errors (e.g, 5XX or
client-side deadline exceeded errors) during OAuth or workload identity
federation auth exchange operations.
This defaults to 1 (e.g., no retries). Specifying a larger number of
attempts enables retrying the auth exchange with exponential backoff
instead of the default of failing after a single try.
Updates https://github.com/tailscale/tailscale/issues/20339
Signed-off-by: Mario Minardi <[email protected]>
The resolv.conf watcher needs one watch on one directory and a
blocking read. gonotify v3.0.2 has a bug where it loops forever
without advancing when a record's name length runs past the end of a
read. It also never closes its fd on cancel and allocates 32 KB per
Read. Use x/sys/unix directly, return an error on a malformed record,
and stop when the kernel removes the watch.
Fixes#16576
Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: If2bc5e94f8aab2922ee9e07b3c2b75a76f4f9236
Log which data keys the operator Secret contains when the expected state is
missing.
Discard logs for tsnet.Servers created as part of test setup and during
tests to reduce log noise.
Updates tailscale/corp#34562
Change-Id: I37d730a46304004fb1579350a755bc92cdf46e42
Signed-off-by: Becky Pauley <[email protected]>
An egress Service without the tailscale.com/hostname annotation gets the
default proxy hostname <namespace>-<name>. When that hostname exceeds 63
bytes, the operator rejects the Service. This includes ProxyGroup egress
Services, which do not use the hostname.
For egress Services, shorten a default that is too long to a 54-char
prefix and an 8-char hash. Defaults that fit do not change, so no
existing proxy is renamed. Explicit annotations and ingress hostnames
keep the current validation.
Rename TruncateLabelValue to TruncateWithHash, as it now also truncates
hostnames.
Fixes#22080
Change-Id: Ib1589a5e9c750cd37d0641829a84fabd0c4352a7
Signed-off-by: David Bond <[email protected]>
This commit widens the egress match port range from [10000, 11000) to
[10000, 30000). The old limit of 1000 ports was arbitrary, and users
with many egress Services reach it. The new range ends below the Linux
ephemeral port range, so match ports do not collide with ports that the
proxy itself uses.
The port count also no longer includes the health check port, which
lowered the real limit by one. A new test covers allocation up to the
limit.
Fixes#22195
Change-Id: Ie20feb2744b40dce052d3732f9f486b1bff31b32
Signed-off-by: David Bond <[email protected]>
Import yarn.lock into pnpm with the same supply-chain settings as
cmd/tsconnect, plus overrides replacing yarn resolutions, two narrow
trustPolicyExclude entries for packages published without provenance,
and denied esbuild/@swc/core install scripts.
Switch assets.go, cmd/build-webclient, release/dist and CI to
tool/pnpm. release/dist now looks up pnpm only when building web
client assets; Build.Yarn is deprecated.
Updates tailscale/corp#51439
Change-Id: Ib472fc8439e916bfe41158e3952f9fa8c02f522d
Signed-off-by: Jim Wright <[email protected]>
Add conn25 connectors to the targets for routecheck probing. Enables
conn25 clients to use the routecheck report to help decide which
connector to use.
Updates tailscale/corp#47251
Signed-off-by: Fran Bull <[email protected]>
Import yarn.lock to pnpm-workspace.yaml and pnpm-lock.yaml
Add pnpm tool and update references
Fixestailscale/corp#51437
Change-Id: Ia25017e7e82cf3af13e04fc3c07b82196f211744
Signed-off-by: Jim Wright <[email protected]>
Adds table tests for shouldResync, covering peer device and Tailscale
Service targets that lose and regain their addresses, a device or
Tailscale Service that failed to resolve at the last sync, a device
replaced by a Tailscale Service, a target removed from the config, a
Service that gains a second host (which must not resync), and a 4via6
route that is withdrawn or advertised.
Updates #21159
Updates #21426
Signed-off-by: chaosinthecrd <[email protected]>
The egress proxy only stored a target FQDN's addresses after a lookup
that returned some, and on a netmap update only compared them with peer
device names. Targets that failed to resolve, had no addresses or were
Tailscale Services were never rechecked, so their rules stayed missing
until a config change or Pod restart.
This fixes this by storing every lookup result, rebuilt on each sync,
and resolving each stored FQDN in shouldResync the same way sync does.
A target that leaves the netmap now triggers a resync too, so its rules
are removed straight away. serviceIPsFromNetMap returns each Service IP
once, so a Service gaining or losing a host doesn't cause a resync.
Fixes#21159Fixes#21426
Signed-off-by: chaosinthecrd <[email protected]>
pkg.css was publishing Tailwind CSS classes unnecessarily which could
cause conflicts with downstream consumers (e.g., if the downstream uses
Tailwind 4 as an example).
Only publish xterm's styles as these are needed for the components used
by the library.
Updates https://github.com/tailscale/corp/issues/50293
Signed-off-by: Mario Minardi <[email protected]>
A burst of PR pushes on 2026-11-13 left several GitHub-hosted test
shards sitting in "test all" for hours after their disks filled up,
holding hosted runner slots until GitHub's 6 hour job limit. Nothing
bounded them: go test's -timeout only limits a test binary while it
runs, not compiling and linking it, and test.yml set no job timeouts.
Give every test.yml job a timeout-minutes of roughly twice the slowest
successful run seen across ~1200 recent jobs.
In testwrapper, kill go test if it goes quiet for longer than any
single test binary may run (the go test -timeout plus a 5 minute
margin, overridable via TS_TESTWRAPPER_IDLE_MARGIN) and log the
process tree under testwrapper so the stuck process is visible.
Also bound the go list and listpkgs invocations and each retry
attempt, including its rebuild.
While here, fix testwrapper exiting 0 when go test was killed by a
signal (exit code -1) with no failed tests recorded.
Updates tailscale/corp#51500
Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: I52bd41c247fca157d8e56381319fe80ae2f7cf02
Control via nodecap.LogUploadAuth may notify the node
that there is an authorization token to use when uploading logs.
If specified, then the logtail.Logger will use that token
when uploading.
Unfortunately, there is a time-of-use and time-of-check discrepancy
that complicates logging. When logs are written under the context
of being for a particular node, we cannot store the token,
as it may be invalid by the time that the logs are uploaded.
Instead, we add Logger.SetAuthID to annotate subsequent log entries
with an identifier for the token to later use.
Only when we upload do we strip out the auth ID, lookup the
auth token to use, and then perform the upload.
We assume that control will notify the client of new tokens
well before they expire. Fetching a refreshed token
is not the job of the client.
Updates tailscale/corp#39092
Signed-off-by: Joe Tsai <[email protected]>
For kube-apiserver ProxyGroups with static endpoints, the operator sets
PORT on the k8s-proxy container to the targetPort of the NodePort
Services behind the advertised endpoints. k8s-proxy never read PORT, so
tsnet listened on a random port and traffic to the static endpoints was
forwarded to a port with nothing listening. Peers stayed on DERP.
This fixes this by parsing PORT and setting it as tsnet.Server.Port.
Thanks to @icheishvili (#18841) and @rquitales (#21716), whose changes
this is based on.
Updates #21714
Signed-off-by: chaosinthecrd <[email protected]>
Use ControlContext for production net.Dialer socket hooks:
PeerAPI and debug peer dialing, captive-portal probes, stunstamp TCP
measurements, and the test agent connection.
Update the PeerDialControlFunc callback signature and Apple extension
implementation together with both consumers. Preserve namespace binding,
socket settings, timeout values, and existing error handling. Listener
Control and RawConn.Control are separate APIs and remain unchanged.
Add coverage for platform hook forwarding and errors, debug and captive
portal dialing, cancellation, SO_REUSEADDR, and test-agent hook selection
and keepalive configuration. Cover the Apple missing-interface error and
non-Linux bypass no-op in their platform-specific tests.
Updates tailscale/corp#50948
Change-Id: I4fb162666724f307f2d3d0beba6ed1b0ed15bb4f
Signed-off-by: James Tucker <[email protected]>
tsnet called the serve LocalAPI client and LocalBackend methods
unconditionally, so it didn't build with ts_omit_serve, which every
minimal feature set includes. Make those methods return
feature.ErrUnavailable when serve is omitted, as ListenFunnel and
ListenService now do too.
Declare tsnet's minimum feature set (netstack) as
featuretags.TSNetMin, add cmd/featuretags --tsnet to keep it, and add
a test that type-checks tsnet with it and a few other small feature
sets.
Fixes#22282
Updates #22283
Change-Id: I866fa34d052bfd437b1c9d3309063999d7ebb02c
Co-Authored-By: Fredrik Fornwall <[email protected]>
Signed-off-by: Brad Fitzpatrick <[email protected]>
This moves HiddenNetworkDvice policy out of ipnlocal and into an optional ipnext.
This adds a per-session notification hook that uses each watcher's effective policy snapshot to populate NodeGUIVisibility.
A full visibility snapshot is sent on initialization and policy changes, and on subsequent peer updates, only changed peers are evaluated.
The extension populates Notify.NodeGUIVisibility with the hidden peers
among the nodes the Notify covers: all peers when it carries Policy
(initially and on policy change), or the PeersChanged peers otherwise.
Absent means visible, so a Policy-bearing Notify replaces the client's
visibility state and a peer-change Notify updates only the changed peers.
No NodeGUIVisibilityChanges/Removed fields and no per-session node state
are needed: removed peers simply leave the client's peer set, and full
netmap updates already resend every peer alongside SelfChange.
When the feature isn't linked, the hook slice is empty and the fast path
in notifyForSessionLocked is unchanged. When the policy isn't configured,
the hook costs a snapshot lookup per session per Notify and sends nothing.
Updates tailscale/corp#44104
Signed-off-by: kari <[email protected]>
Signed-off-by: Nick Khyl <[email protected]>
GetWindowsDefault called GetAdaptersAddresses to build a map of every
adapter before walking the routing table. Enumerating adapters is
expensive on Windows and, since the call doesn't skip DNS info, it also
goes through the DNS Client service, which on recent Windows builds
enumerates every interface for each DNS server on each adapter.
In this PR, we query only what we need: the routing table, the metric
of each interface with a default route, and the interface row for routes
that beat the current best. We also identify the Tailscale interface by
its Wintun GUID rather than by its description, and move the GUID to
tsconst so that net/tstun and net/netmon share it.
Updates #17772
Updates #21885
Change-Id: I4c6a9d9ed791788fb0567154ee1dbe0f6a2c52a2
Signed-off-by: Nick Khyl <[email protected]>
The PeerRelay reconciler ignored a ProxyClass's spec.metrics, so enabling metrics created no metrics Service or ServiceMonitor and the relay Pods never served /metrics. This fixes this by setting TS_ENABLE_METRICS in ApplyProxyClass and calling tailscaled.EnsureMetricsResources for PeerRelay. PeerRelay now also waits for its ProxyClass to be ready before creating anything, as the other proxies do, so the existing ProxyClass test fixture is marked ready.
ApplyProxyClass now replaces an env var that the ProxyClass also sets instead of appending a second one. The PeerRelay StatefulSet is applied with server-side apply, which rejects duplicate env names, so a ProxyClass that sets an env var the operator also sets, such as TS_ENABLE_METRICS, would stop the StatefulSet from being applied.
Updates #22034
Signed-off-by: chaosinthecrd <[email protected]>
The metrics Service and ServiceMonitor handling lived in cmd/k8s-operator,
and the ProxyClass reconciler kept its own copy of the ServiceMonitor CRD
check, so reconcilers in k8s-operator/reconciler could not share it. This
moves it into the tailscaled package as EnsureMetricsResources and
EnsureMetricsResourcesDeleted, which take the proxy type and parent, and
switches cmd/k8s-operator and the ProxyClass reconciler over to it. No
behaviour change.
Updates #22034
Signed-off-by: chaosinthecrd <[email protected]>
Adds tests that a conflict while provisioning a Service, a Service on a
ProxyGroup, a ProxyGroup or a Connector proxy results in a timed
requeue, and that the Connector and ProxyGroup status is set to
creating rather than failed. The test for a Service on a ProxyGroup
fails the update to the shared ingress config ConfigMap, as no watch
maps that ConfigMap back to the Service, so without the requeue the
conflict was never retried.
Updates #22074
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
Reconcilers logged "optimistic lock error, retrying" with the full
conflict error at Info, and Connector, Recorder and ProxyGroup also put
it in their status. That reads like a failure, but a conflict between a
cached read and an update is expected and is retried. The reconcilers
also returned an empty result, so the retry only happened if a watch
event arrived. This fixes this by logging the conflict at Debug as an
update conflict, using a neutral status message and requeueing after a
short delay.
Updates #22074
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
Move the Recorder reconciler and its object specs into
k8s-operator/reconciler/recorder, following the earlier ProxyClass,
DNSConfig and nameserver moves, and switch it to the shared finalizer,
resource tracker and CreateOrUpdate helpers.
Hoist two duplicated helpers into tailscaled.PrefsFromStateSecret and
reconciler.IsOptimisticLockError, and add
k8s-operator/reconciler/reconcilertest for the test helpers each package
had copied, including one fake Tailscale API client in place of four.
No behaviour change; the Recorder's watches and labels are untouched.
Fixestailscale/corp#37086
Signed-off-by: David Bond <[email protected]>
This commit changes the egress ProxyGroup readiness gate to mark a Pod
ready only when, for each egress Service, the Pod is an endpoint in the
EndpointSlice of every IP family that the proxy reports in its egress
status. Before, the gate accepted a Pod that was in either family's
EndpointSlice. On a dual-stack cluster, the StatefulSet rollout could
then move to the next Pod before the other family routed to the new Pod.
The gate reads the families from the proxy's state Secret, because a
proxy older than v1.102 does not report an IPv6 address. Such a proxy
never joins the IPv6 EndpointSlice, so its Pod must not wait for it.
Fixes#21077
Signed-off-by: David Bond <[email protected]>
This commit removes the owner reference from ProxyGroup state Secrets,
also from Secrets that an older operator created. On a Foreground
delete, the garbage collector deleted these Secrets before the
finalizers ran. The finalizers read them to find devices, so cleanup
failed and devices stayed in the tailnet.
The ProxyGroup cleanup now deletes the Secrets after the devices, and
the reconciler watches them by label. The kube-apiserver cleanup finds
its cert resources by label, so it does not need the state Secrets. A
new e2e test covers Foreground deletes.
Fixes#22072
Signed-off-by: David Bond <[email protected]>
In singleton egress mode (TS_TAILNET_TARGET_FQDN), a failed resolution
of the target FQDN logged the error but then broke out of the main
runLoop instead of continuing to the next netmap update. From then on
containerboot blocked in wg.Wait() while the pod still looked healthy,
and the egress proxy kept forwarding to stale addresses until restart.
A missing target is typically transient (peer not yet in the netmap,
ACL change in flight), so log and continue to let the next netmap
update retry the resolution and reinstall the forwarding rules.
Fixes#22102
Signed-off-by: Santhi Prakash <[email protected]>
When tailscaled denies a serve config, the CLI advises configuring an
operator to avoid root. That advice is wrong for path and Unix socket
targets, which require root regardless. Replace the access-denied
error for those targets with one that says to use sudo.
Updates #21204
Signed-off-by: Brendan Creane <[email protected]>
The funnel command checked Funnel access with a hardcoded port 443, so
any requested port passed and the CLI reported it as available on the
internet. Check the port the user asked for instead. Turning Funnel
off skips the check so existing configs on other ports can still be
removed.
Fixes#10742Fixes#21989
Signed-off-by: Brendan Creane <[email protected]>
* cmd/k8s-operator: grant dnsconfigs/finalizers so the nameserver provisions on OpenShift
The nameserver ServiceAccount, Deployment, Service and ConfigMap are created
with an ownerReference to the cluster-scoped DNSConfig and
blockOwnerDeletion: true. Clusters running the
OwnerReferencesPermissionEnforcement admission plugin - which OpenShift enables
by default and upstream Kubernetes does not - require the creating identity to
hold update on the owner finalizers subresource before accepting such a child.
The operator ClusterRole grants dnsconfigs and dnsconfigs/status but no rule on
any finalizers subresource, so every nameserver reconcile is rejected:
serviceaccounts "nameserver" is forbidden: cannot set blockOwnerDeletion if
an ownerReference refers to a resource you cannot set finalizers on
It retries forever, the DNSConfig never gets a status, and dns-records-reconciler
waits indefinitely. Granting the rule lets the reconcile succeed on the next
attempt; it is inert where the admission plugin is not enabled.
Static manifest regenerated with ./tool/go run ./cmd/k8s-operator/generate staticmanifests
Fixes#21275
Signed-off-by: Hamza Khokhar <[email protected]>
* cmd/k8s-operator: grant proxygroups, recorders and services finalizers
Extend the OwnerReferencesPermissionEnforcement fix to the other owners whose
children are created with blockOwnerDeletion: true: ProxyGroup and Recorder
(tailscale.com) and Service (core). Without update on their finalizers
subresource, creates of the owned resources are rejected on clusters that
enable the admission plugin, such as OpenShift.
Static manifest regenerated with ./tool/go run ./cmd/k8s-operator/generate staticmanifests
Updates #21275
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hamza Khokhar <[email protected]>
---------
Signed-off-by: Hamza Khokhar <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Restructure the L3, L3 HA and L7 ingress e2e tests into IP family subtests
to cover IPv4 and IPv6, plus DualStack for ProxyGroup.
Updates tailscale/corp#38029
Signed-off-by: Becky Pauley <[email protected]>
Serve deletes client-supplied `Tailscale-User-Login` (and similar) headers
before setting its own. However, `http.Header.Del` only matches the exact
canonical name. A client could send Tailscale_User_Login instead, which
was passed through to the backend.
For Go (and some other) backends, that's not an issue, but backends that
map headers to CGI-style variables (HTTP_TAILSCALE_USER_LOGIN) treat
both names the same. Thus, for Funnel requests (or tagged nodes), where
serve sets no identity headers, the backend could trust the spoofed
value. The same applies to Tailscale-App-Capabilities.
This fixes the issue by also deleting any header whose name matches
case-insensitively after replacing '_' with '-'.
This is similar to how other projects do this:
- Django drops them: https://www.djangoproject.com/weblog/2015/jan/13/security/
- nginx does not allow them by default: https://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers
- Puma had a CVE and now drops them: https://nvd.nist.gov/vuln/detail/cve-2024-45614Fixestailscale/corp#50821
Signed-off-by: Andrew Dunham <[email protected]>
Add an ipn.Prefs.Tailnet field, passed through controlclient.Options
into tailcfg.RegisterRequest.Tailnet, so a client can recommend or
require a tailnet at registration (e.g. to skip the tailnet picker when
the intent is already known) without impersonating MDM.
Previously this value could only come from the "Tailnet" syspolicy
setting. That setting still takes precedence as an administrative
override; the prefs value is used only when no policy is set.
Updates #22093
Signed-off-by: Adriano Sela Aviles <[email protected]>
Adds an e2e test for proxy cleanup when the state Secret has no
device_id, as the unit tests use a fake client and can't show that
control honours the machineKey filter. It fills the tailnet with other
devices, checks the filter returns only the proxy's device, then removes
device_id from the state Secret and unexposes the Service. It checks
that the proxy's device is deleted and the other devices are left alone.
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
Adds tests that ProxyGroup scale-down and cleanup, Recorder cleanup and
PeerRelay cleanup delete the device matching the machine key in a state
Secret that has no device ID. The Recorder test puts that Secret on
replica 0, so it also checks that cleanup carries on to the other
replicas.
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
Adds a test that proxy cleanup deletes the device matching the machine
key in a state Secret that has no device_id. It also checks that
device_id is still used when present, that Secrets with a missing or
invalid machine key are skipped, and that Connector status does not
list a proxy before it reports its device ID.
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
ProxyGroup, Recorder and PeerRelay cleanup and replica scale-down only
delete a replica's device if its state Secret holds the device's ID. A
replica that is shut down after it registered with control but before it
learnt its ID leaves its device in the tailnet.
This fixes this by deleting the device by the machine key in the state
Secret in each of these places when there is no ID.
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
Recorder cleanup deletes the device of each replica in turn. When a
replica had no state Secret or no device ID in it, cleanup stopped there
and reported itself done, so the devices of later replicas were left in
the tailnet.
This fixes this by moving on to the next replica instead.
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
Service, Ingress and Connector proxy cleanup finds the devices to delete
through the device_id key in each proxy's state Secret, which
containerboot only writes after the proxy's first netmap. If the proxy is
shut down after it registered with control but before that (for example,
a Service exposed and then unexposed in quick succession), cleanup finds
no device, removes the state Secret and the finalizer, and the device is
left in the tailnet. Connector replica scale-down has the same problem.
This fixes this by deleting the device by the machine key in the state
Secret when there is no device_id. Service, Ingress and Connector status
still only list devices that have an ID.
Updates #18922
Signed-off-by: chaosinthecrd <[email protected]>
Similar to #20866 for 4via6, conn25 needs to block host-scoped
destinations. Due to the similarity between the two situations, the
matching is no longer in a 4via6-specific location. Since there is no
backwards compatibility to satisfy, there is no exception list for
conn25.
ipn/ipnlocal (for 4via6) and feature/conn25 now both use the new
package.
Updates tailscale/corp#50118
Updates tailscale/corp#46169
Change-Id: Ic3f9cccd2f5823a2ca48bd78607792b0fd6d7db9
Signed-off-by: Adrian Dewhurst <[email protected]>
termWriter converted each chunk of the SSH output to a JS string on its
own which incorrectly handles multi-byte characters across chunk
boundaries. Move it to a separate cmd/tsconnect/termwriter package with
tests, and hold back incomplete sequences for the next write.
Fixes#22007
Signed-off-by: Aarnav Tale <[email protected]>