Repository navigation
fix(proxy): probe the OpenCode origin instead of cloudflare.com - #153
Merged
jasonxu114514 merged 1 commit intoNov 5, 2026
Merged
Conversation
Owner
|
The purpose of Cloudflare CDN traces is to prove that the proxy can connect to the network normally, |
Closed
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
The health probe exists to answer one question: can this exit serve traffic? It currently targets
https://cloudflare.com/cdn-cgi/trace— an unrelated third-party host. Proxy providers routinely block or rate-limit Cloudflare on their egress, so an exit that serves OpenCode perfectly well can fail the probe, be disabled afterdisable_after_failures, and eventually be retired — while real anonymous traffic through that same exit still returns 200.Evidence (from our deployment)
200withattempts=1(first exit tried).429 Not Enough Bandwidthfor quota exhaustion). Those say something about the provider's quota, not about whether the OpenCode origin is reachable — but the current probe cannot tell the difference.Change
https://opencode.ai/.checkClaimedProxyalready counts any HTTP response as success, so a 404 from the origin still proves the tunnel reaches it.proxy.bunwhen present, the same client free-model traffic uses. The probe then exercises the path it judges (Bun/uTLS fingerprint) instead of a plain Go TLS handshake.Scope
Verification
go build ./...passes;gofmtclean.