Add QR code to server startup for easy mobile testing during local development#5
Open
jcorbettfrank wants to merge 1 commit intohytopiagg:mainfrom
Open
Add QR code to server startup for easy mobile testing during local development#5jcorbettfrank wants to merge 1 commit intohytopiagg:mainfrom
jcorbettfrank wants to merge 1 commit intohytopiagg:mainfrom
Conversation
jcorbettfrank
added a commit
to jcorbettfrank/hytopia-source
that referenced
this pull request
Mar 3, 2026
- Remove dead 'h' from BOOLEAN_FLAGS (single-dash handled at top level) - Fix --flag=value parsing to preserve data after second '=' sign - Add SIGKILL fallback after 2s timeout for tunnel process cleanup - Log tunnel startup errors when DEBUG env var is set - Add comment explaining --no-tls-verify necessity (self-signed cert) - Use fixed Content-Type for CORS allow-headers instead of reflecting - Add comment explaining allow-private-network rationale Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9c367d4 to
fdabe0d
Compare
|
Noting that this PR has a similar use, so should be compared for best solution: |
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
Adds a
--tunnelflag tohytopia startthat creates a Cloudflare quick tunnel and prints a QR code, making it easy to test your local dev server from a phone or tablet on any network. Also hardens the game server's CORS policy from a*wildcard to a strict origin allowlist.What changed
hytopia start --tunnelspawns acloudflaredquick tunnel, prints a scannable QR code and a mobile-friendly join URL. Tunnel failure is non-fatal; the server still starts with the local URL.hytopia.com,play.hytopia.com,*.play.hytopia.com, localhost). Adds properOPTIONSpreflight handling andaccess-control-allow-private-networkfor local dev.hytopia start --help.Configuration
--tunneldefaults to usingcloudflaredfromPATH.HYTOPIA_CLOUDFLARED_BIN=/path/to/cloudflaredfor a custom binary location.HYTOPIA_CLOUDFLARED_NPX_PACKAGE=<name@version>to run via npx with a pinned version.Testing
QR code printed on server startup with

--tunnel:Connected from iPhone:

Desktop still works:
