Repository navigation
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #2040
What this changes
Adds cross-platform userspace Tailscale / Headscale support without occupying the OS VPN slot, backed by a dedicated Tailscale accounts list under Credentials so different servers can connect through different Tailscale accounts / tailnets simultaneously.
Architecture
Stripped Go
tsnetuserspace engine (native/tailscale/+hook/tailscale_build.dart)tailscale.com/tsnet(v1.104.1) compiled with Tailscale'sts_omit_*feature tags (native/tailscale/build_tags.txt— omittinglogtail,aws,kube,ssh,drive,taildrop,webclient,systray, etc.) and telemetry disabled (TS_NO_LOGS_NO_SUPPORT=true,logger.Discard).sbm_ts_*) with process-wide handle tables (so background SFTP/SCP transfer isolates reuse the active node viasbm_ts_lookup) and directsbm_ts_dial_tcp+sbm_ts_conn_{read,write,close}stream I/O (avoiding Unix-onlysocketpair(2)and iOS loopback-listener suspension issues).c-archive/StaticLinkingon iOS;c-shared/DynamicLoadingBundledon Android, macOS, Linux, Windows;-trimpath -buildvcs=false -ldflags="-s -w -buildid="+ 16 KB Android page alignment). Stripped macOS arm64libserverbox_tsnet.dylibmeasures 16 MB.hooks.user_defines.server_box.tailscale: falseorSBM_SKIP_TAILSCALE_NATIVE=1(runtime degrades cleanly withTailscaleManager.shared.isAvailable == false).Schema v48, Store, Backup & Sync
TailscaleAccount(id,name,controlUrl,hostname,authMode[interactive/authKey],authKey,ephemeral) andtailscale_accounttable (WITHOUT ROWID, uniquename).server.ssh_tailscale_account_idandserver.monitor_tailscale_account_idforeign keys (ON DELETE SET NULL) +TailscaleAccountMigration(m047_tailscale_account.dart,SchemaVersion.current = 48), following theSshProxy(m046) pattern including fail-closed pending links during out-of-order sync.authKeyis stripped from unencrypted backups and QR server shares, preserved only in encrypted backups/sync), while each account'stsnetnode state directory (<appSupport>/tailscale/<accountId>/) stays strictly device-local to avoid WireGuard node-key collisions.Transport Parity, Discovery & UI
TailscaleSocket implements SSHSocketwired intoSshClient,HostKeyProbe,SshTransferCreds/transfer_worker, andControlMaster(disabled on userspace Tailscale routes; mutually exclusive with Jump/Proxy/ProxyCommand and Mosh).bridgeTailscaleConnToSocketwired intoMonitorHttpClient(connectionFactory+probePrimary()TLS certificate pinning).UserspaceTailscaleDiscoverysurfaces peers from running userspace accounts alongside local Tailscale CLI discovery.TailscaleAccountsListPage,TailscaleAccountEditPagewith interactive browser login, Auth Key mode withAppAuth.confirmreveal, session connect/disconnect/logout), plus Tailscale SSH route segment and Monitor HTTP Tailscale account picker in Server Edit. English and Simplified Chinese strings added.How it was tested
Tested on macOS arm64 (Flutter 3.50.1, Rust 1.98.1, Go 1.27.4):
native/tailscale:go test -count=1 -race -v -tags="..." ./...&go vet— 4/4 passed.flutter analyze lib test integration_test hook— 0 issues.flutter pub get --enforce-lockfile— clean.python3 scripts/check-l10n.py --app-only --dump zh— 0 issues.m028–m047), backup/sync, widget, and real nativelibserverbox_tsnet.dylibFFI smoke tests — 106/106 passed.flutter testsuite — 4,565+ passed (only local-env failures: missingtmuxCLI intmux_control_real_protocol_test.dart, unpulled Git LFS PNGs intheme_store_tree_test.dart).Remaining before ready for review
Go Tailscale tests,check,testsshards,Build input checks)macOS build,Windows build,iOS Linux engine,Android reproducible build)test/fixtures/schema/v47_store.dbrelease migration fixture (matchingv46_store.db)Checklist
make analyzeandmake testpassmake genwas run, if any model / ARB file changedcargo test --workspacepasses, if anything undercrates/ormonitor/changed (not modified)