fix(host): tolerate browser-injected unusable SSLKEYLOGFILE paths - #114
Conversation
Prevent browser-injected relative TLS key-log paths from terminating the native host during Tailscale initialization. Preserve absolute paths for intentional debugging and cover both cases with a regression test.\n\nRefs dantraynor#113
Probe the configured key-log path with Tailscale's required access and clear it only when the native host cannot open it. This handles Bitdefender's protected absolute volume path while preserving usable debugging targets.\n\nRefs dantraynor#113
Leave a trace in helper stderr so a cleared key-log path is diagnosable instead of silently ignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@danekurian-git thanks for the issue and the fix — great writeup. Verified the root cause against tailscale 1.100.0 (the log.Fatal in tlsdial.go) and the approach checks out. Only thing I added was a log line when the var gets cleared, so the reason shows up in helper stderr instead of key logging silently disappearing. Since you have the actual Firefox + Bitdefender setup, a quick run on the updated branch to confirm it still behaves would be appreciated. Marking this ready for review. |
|
@dantraynor Honestly, I was pleasantly surprised to hear back so quickly — thank you for independently validating the root cause and for adding the stderr trace. I pulled your update and retested commit
Confirmed: the logging addition behaves as intended, and the fix remains effective with the real Firefox + Bitdefender injection. |
|
@danekurian-git absolutely, thanks for opening the issue and the associated pr, will merge this and should be able to make a new release soon |
What
SSLKEYLOGFILEwhen the browser launches Tailchrome's native host with a path it cannot open.Why
Closes #113.
Bitdefender's encrypted web scanning injects
SSLKEYLOGFILE=\\?\Volume{...}\virtual_file.loginto Firefox child processes. The Tailchrome helper inherits the protected absolute volume path. Tailscale 1.100.0's TLS dialer treats the failed open as fatal, so the helper exits before initialization and Tailchrome repeatedly reportsnative-host-stopped.The sanitization runs only in native-host mode. Installer, uninstaller, and version operations are unchanged.
How to Test
corepack pnpm typecheckcorepack pnpm test(567 tests)corepack pnpm test:installerunder Ubuntu 24.04 WSL(cd host && go test ./... && go vet ./...)on Windows amd64git diff --checkgo test -race ./...locally (Windows host has no C compiler; Linux PR CI runs this gate)Checklist