Repository navigation
WSL backend receives the listen selection (#9) - #17
Merged
Merged
Conversation
The WSL launch path hardcoded `host: "0.0.0.0"` and always advertised the distro's eth0 IP, so "Limited to this machine" was untrue inside the distro and the selection the user made on Windows stopped at the WSL boundary. The bootstrap envelope now carries the listen-interface selection (ADR 0003) for WSL exactly as it does for the native backend, and the Linux side resolves it against WSL's own interfaces. `backendConfig` carries the selection itself instead of a pre-spelled `--host` string, so both envelope builders format the one value. The renderer only uses the distro IP when the selection carries `lan`, which is the only case that binds the distro's virtual NIC; local-only and tailscale-only stay on WSL2 localhost forwarding and skip the probe entirely. Unverified on real WSL: no WSL machine was available. Closes #9
5 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.
Ticket: #9 (parent spec #1, ADR 0003). Closes #9. Supersedes #2's two-valued fix on the fork; #2 remains open only to track upstream pingdotgg#10358.
The WSL backend receives the user's listen-interface selection instead of a hardcoded wildcard. The bootstrap envelope carries the selection into the distro and the Linux server resolves it against WSL's own interfaces; the desktop's backend config carries the selection rather than a pre-spelled host string, so WSL and native envelope builders format one value. The distro-IP probe and renderer URL are gated on the selection carrying
lan(the only case that binds the distro's virtual NIC); local-only and tailscale-only ride WSL2 localhost forwarding and skip the probe. Native path behaviourally unchanged.ADR 0003 records what a selection means inside WSL, the NAT-mode limitation, and the trade against upstream's wildcard (which existed because loopback-only inside WSL failed readiness probes on some hosts). If that returns, the named fix is a distro-NIC fallback on a failed loopback probe, not a wildcard.
Verification: contracts 379 and desktop 827 tests pass, desktop typecheck clean. Tests cover local-only, tailscale-only, lan, and custom-with-address: host string, renderer URL and probe count each asserted, so no wildcard and no pre-resolved IP can reach the WSL launch path.
Not verified on a real WSL machine — none available. Loopback-only bind, localhost forwarding and distro-NIC advertisement are argued from code and WSL2's documented networking, not observed; commit body and ADR both say so. A WSL user confirming local-only would close the gap.