Reach the website through cast.weenas.com where Cloudflare is blocked - #185
Merged
Merged
Conversation
In many networks in mainland China castbay.weenas.com (Cloudflare) can't be reached, so the update check fell back to GitHub (without release notes) and problem reports and statistics couldn't be sent at all. A Google TV on such a network timed out connecting to it while reaching GitHub and the developer's server fine. cast.weenas.com is a relay on that server (Apache, its own ZeroSSL certificate, which old Android trusts): it passes only GET /latest.json and POST /api/reports, /api/stats and /api/stats/delete on to the website, keeps no access log, and names the device's address in X-CastBay-Client-IP, which the Worker believes only from the relay's address (RELAY_IPS) and uses only for its rate limits. The app's requests (util/Servers.kt) try the website, then the relay, starting with whichever answered last; an HTTP answer isn't retried elsewhere. -Pcastbay.reportsUrl becomes -Pcastbay.serverUrl, the base address (no relay then). The privacy policy describes the relay. Tested on the Google TV (website unreachable): the update check and a problem report (CB-K481Z8) both went through the relay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
In many mainland-China networks castbay.weenas.com (Cloudflare) is unreachable. On those networks the update check fell back to GitHub, which had no release notes, and problem reports and statistics failed outright.
cast.weenas.comruns on the developer's VPS (Apache, ZeroSSL cert trusted by old Android). It forwards onlyGET /latest.jsonandPOST /api/reports|stats|stats/deleteto the website and keeps no access log. It sends the device's address inX-CastBay-Client-IP.RELAY_IPS(45.195.196.12), and only for its rate limits.util/Servers.kttries the website, then the relay, starting with whichever answered last. An HTTP answer is not retried elsewhere. Update check order: website → relay → GitHub.Tested on a Google TV whose network can't reach Cloudflare:
🤖 Generated with Claude Code