Repository navigation
feat: reach portmap and its services over Tailscale - #6
Merged
Merged
Conversation
portmap stays bound to loopback. When the tailscale CLI is available it reads this machine's tailnet name and `tailscale serve` mappings, accepts names under the tailnet's MagicDNS suffix as a Host, and gives every web service a link other tailnet devices can open: - services listening on all interfaces link straight to the tailnet name - loopback-only services get a "share on tailnet" button that creates or removes a tailnet-only `tailscale serve` mapping (never Funnel); only the node's owner or this machine can toggle it - mappings the user created themselves are linked but never removed Also adds PORTMAP_ALLOWED_HOSTS for extra Host names, PORTMAP_TAILSCALE to point at or disable the CLI, and compose.tailscale.yaml for running a Tailscale sidecar with its own hostname. Documented in the README.
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.
What
portmap stays bound to
127.0.0.1. When thetailscaleCLI is available (override withPORTMAP_TAILSCALE, oroffto disable), it now:tailscale servemappings, and accepts names under the tailnet's MagicDNS suffix as aHosttailscale servemapping (never Funnel)Also adds
PORTMAP_ALLOWED_HOSTSfor extraHostnames andcompose.tailscale.yamlfor running a Tailscale sidecar with its own hostname. README documents all of it, including the security implications.Why
Cards linked to
localhost:<port>, which doesn't work when portmap is opened from a phone or another machine on the tailnet.Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo testall pass locally (84 tests, including new tailnet and share/unshare tests).assets/UI change (share button) was not covered by tests and no screenshot is attached.