feat(http): support explicit bind hosts for web access#279
Open
ben-vargas wants to merge 2 commits intocoollabsio:mainfrom
Open
feat(http): support explicit bind hosts for web access#279ben-vargas wants to merge 2 commits intocoollabsio:mainfrom
ben-vargas wants to merge 2 commits intocoollabsio:mainfrom
Conversation
Treat the HTTP server host as a real bind target instead of collapsing it to a localhost-vs-all-interfaces boolean. This makes headless runs honor explicit addresses such as a Tailscale IP while preserving the existing desktop localhost/all-interfaces preference behavior. The server now parses and binds the requested host directly, reports the actual bind host in server status, logs the effective bind target, and formats URLs correctly for IPv4/IPv6. The CLI help and README were updated to describe the new behavior, and targeted Rust tests were added for host parsing and URL formatting.
Add a persisted http_server_bind_host preference for the desktop app and fall back to the legacy http_server_localhost_only boolean when no explicit host is configured. This keeps existing settings files compatible while allowing the GUI app to bind to a specific address such as a Tailscale IP. The Web Access pane now exposes a bind-address field instead of the old localhost-only toggle, validates localhost/IP input, restarts the server when the bind address changes, and only shows URL rows that are actually reachable for the active bind target. Preference fixtures and Rust unit tests were updated to cover the new fallback behavior.
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.
Problem
Jean's web access currently behaves like a two-mode bind:
That makes private remote access setups awkward. For example, binding only to a Tailscale IP is not possible today.
Change
This PR adds explicit bind-host support for web access.
--hostnow binds to the literal requested addresshttp_server_localhost_onlybehavior is preserved as a fallback for compatibilityThis makes setups like
100.x.y.zTailscale-only binding possible in both headless and desktop usage.Validation
Tested with:
bun run typecheckbun run tauri:devRuntime verification:
0.0.0.0If this isn't a direction you want to support upstream, feel free to close the PR. It's already working well in my fork, so there's no pressure to merge it.