feat(api): add explicit local network sharing - #39
Merged
Conversation
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.
Summary
vidxp-api --sharewith an app-managed reusable bearer token, detected LAN binding, trusted-host configuration, and printed health/MCP connection detailsvidxp uiloopback-only by default and add an explicit unauthenticated--sharemode using Streamlit's wildcard bind and native URL outputvidxp-api --portRoot cause and impact
The API only exposed low-level environment configuration for non-loopback serving, while the UI inherited Streamlit's wildcard default and could become LAN-accessible without an explicit VidXP choice. The API also used Uvicorn's heavily reused development port, increasing collision risk for native installs. This change makes network exposure intentional and self-contained, protects API/MCP access with a generated token, keeps the browser UI local unless explicitly shared, and uses a lower-collision native port.
LAN traffic remains plain HTTP and share mode prints a warning. The browser UI remains unauthenticated and is labeled accordingly.
Validation
uv run --no-sync python -m unittest tests.test_api_cli tests.test_network_share tests.test_cli tests.test_api tests.test_authentication tests.test_mcp(106 passed)uv run --no-sync python -m unittest tests.test_packaging(10 passed)git diff --checkpassed/healthfrom another LAN machine