Repository navigation
fix(cli): serve remote access on a random unguessable subdomain - #53962
Merged
Merged
Conversation
thdxr
enabled auto-merge (squash)
October 8, 2026 13:38
3 of 6 tasks
2 of 6 tasks
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.
Issue for this PR
Closes #
Type of change
What does this PR do?
Remote access served the service on a fixed subdomain of the device's OpenTunnel tunnel (
opencode,opencode-<channel>). Tunnel hostnames are published in certificate transparency logs, so the remote address was guessable and anyone could reach the service's sign-in.The route is now 16 random hex characters (64 bits from
crypto.randomBytes), for examplehttps://3f9c2a7be41d08c6.<tunnel-id>.opentunnel.xyz. The tunnel certificate covers subdomains with a wildcard, so the route never appears in certificate logs, and OpenTunnel drops connections for routes nobody claims. Server authentication is unchanged and still required on every request."remote": { "route": "…" }when on, absent when off. The route is generated once, so the URL survives restarts; turning remote off forgets it, so turning it on again issues a new address."remote": true|false) still decode, keeping the rest of the config. A service started withtruegenerates its route on first start.opencode service gethides the route, like the password.How did you verify your code works?
service.jsoncontaining"remote": true: all other keys, including the password, were kept.bun run checkpasses.Screenshots / recordings
N/A
Checklist
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊