Skip to content

OPEN-7: Route/latency tools — region wiring, ICE policy, richer region pings#174

Merged
zortos293 merged 2 commits intomainfrom
cursor/OPEN-7-network-route-optimization-a6c4
Mar 31, 2026
Merged

OPEN-7: Route/latency tools — region wiring, ICE policy, richer region pings#174
zortos293 merged 2 commits intomainfrom
cursor/OPEN-7-network-route-optimization-a6c4

Conversation

@zortos293
Copy link
Copy Markdown
Collaborator

Description

Addresses OPEN-7 (ExitLag-style “route optimization”) with what we can do inside an open GFN client: no proprietary VPN mesh, but clearer data-center routing, optional WebRTC relay-only for tricky networks, and better region latency probes (avg + jitter + min/max).

Changes

  • Region setting now applies: When you pick a region (or rely on Auto), the chosen https://… base URL is used as the CloudMatch/streaming base URL instead of only the login provider default (the setting was previously unused for API calls).
  • Connection → ICE path: Default vs Relay only maps to RTCPeerConnection iceTransportPolicy (all vs relay). Relay-only can help when only TURN works (VPN / strict NAT); it may add latency.
  • Region ping: Main process now runs 5 TCP connect samples per region and returns min, max, and jitter (std dev); the settings UI shows average ms with optional ±jitter and a tooltip with range.

npm run typecheck passes.

Linear Issue: OPEN-7

Open in Web Open in Cursor 

cursoragent and others added 2 commits March 31, 2026 21:49
… pings

- Use Settings.region as CloudMatch streaming base URL when set (was unused).
- Add Connection settings: WebRTC ICE transport policy (all vs relay-only).
- Region latency probe: 5 TCP samples with min/max/jitter; show jitter in UI.
- Clarify that region choice optimizes data center routing, not a VPN booster.

Co-authored-by: Zortos <zortosdev@proton.me>
…on section

Co-authored-by: Zortos <zortosdev@proton.me>
@zortos293 zortos293 marked this pull request as ready for review March 31, 2026 21:59
@zortos293 zortos293 merged commit b6d25fc into main Mar 31, 2026
5 checks passed
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

const preferred = settings.region?.trim() ?? "";
if (preferred && preferred.startsWith("https://")) {
return preferred.endsWith("/") ? preferred : `${preferred}/`;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale region URLs override valid provider endpoint

Medium Severity

effectiveStreamingBaseUrl accepts any saved settings.region that starts with https:// without checking it exists in current regions. A stale or cross-provider region URL now overrides selectedProvider.streamingServiceUrl, so CloudMatch calls can be routed to an invalid endpoint and session/game actions fail.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants