feat(proxy): selective proxy for Railway IP-blocked providers - #2020
Merged
Conversation
dev → main: RPC benches 222-231, provider fixes, Greymass logo
- rpc-capabilities: patch http.DefaultTransport at startup with a host-keyed proxy function; PROBE_PROXY_URL + PROBE_PROXY_HOSTS env vars control which providers route through the rotating proxy vs direct connection - pm-rate-limits: add proxy.go with makeTransport() helper; UseProxy field on Venue routes blocked venues (predictit, smarkets) through PROBE_PROXY_URL; cold and ramp clients use makeTransport() so proxy applies consistently - venues.go: mark predictit + smarkets UseProxy=true; fix smarkets list URL (sort=popular was rejected by API, replaced with sort=start_datetime,id) - cronos-zkevm-rpc.yml: remove blastapi provider (no public endpoint exists), update counts from 3 to 2 providers throughout
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
initSelectiveProxy()in main.go — patcheshttp.DefaultTransportwith a per-host proxy function. SetPROBE_PROXY_URL+PROBE_PROXY_HOSTSenv vars on the 3 Railway services to unblock specific providers (e.g.public.blastapi.io) without routing other measurements through the proxy (which would corrupt latency numbers).proxy.gowithmakeTransport(useProxy bool)helper.Venue.UseProxy=trueroutes that venue throughPROBE_PROXY_URL. Fixes predictit and smarkets (both Railway IP-blocked). Also fixes smarkets list URL (sort=popularwas rejected by their API — updated tosort=start_datetime,id).Railway env vars to set after merge
pm-rate-limits service:
rpc-capabilities (us/eu/sgp) — when a specific host needs unblocking:
Test plan
go build ./...)go build ./...)pmapi_request_duration_seconds_bucket