Repository navigation
Changing the Cloudflare API IP address - #147
Open
eleutherifer wants to merge 1 commit into
Open
eleutherifer wants to merge 1 commit into
eleutherifer wants to merge 1 commit into
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.
Problem
Due to network restrictions, the default API endpoint api.cloudflareclient.com is completely blocked and unreachable from Russia. This prevents users in this region from registering new consumer WARP accounts during the initial setup, breaking the first-run experience.
Desired outcome
Change the registration logic to use api.devices.cloudflare.com as the primary endpoint instead of api.cloudflareclient.com, or implement an automatic fallback.
Ideally, the application should try api.devices.cloudflare.com first, as it is currently accessible and fully functional for registration under these network restrictions. If that fails, it can fall back to api.cloudflareclient.com.
Alternatives considered
Instead of changing the default endpoint for everyone, a fallback mechanism could be implemented. The app could keep api.cloudflareclient.com as the primary choice, but if the registration fails or times out (which happens due to DPI blocking), it should automatically retry using api.devices.cloudflare.com.
Security, privacy, and compatibility impact
• DPI Circumvention: In Russia, api.cloudflareclient.com is actively blocked by DPI. Switching to or falling back to api.devices.cloudflare.com successfully bypasses this restriction.
• Compatibility: While the official Cloudflare client primarily uses api.devices.cloudflare.com for Zero Trust registration, practical testing confirms that this endpoint fully supports and processes standard consumer registration requests as well.
• Security & Privacy: No impact. Both are official Cloudflare domains using the same secure infrastructure and TLS configurations. No traffic or user data is exposed to third-party servers.