#3087·Provenance

[Netplay] Phase 4: WAN internet play via RA.ME relay server

Author: github-actions[bot]Created Mar 13, 2026Updated Mar 27, 2026
Labelsenhancementappstoreagent-workci

Summary

Enable internet (WAN) netplay via the RA.ME (RetroArch relay) server. Users can connect with friends over the internet without port forwarding. Optionally integrate Apple GameKit for App Store builds.

Part of #2483 Depends on: Phase 2 (#TBD)

Background

RetroArch ships with relay server support via RA.ME (relay.retroarch.com). With HAVE_NETPLAY enabled, users only need to configure the relay hostname in RetroArch settings. @JoeMatt is friends with the RetroArch team and can negotiate relay access for Provenance users or a dedicated relay endpoint.

This phase also adds WAN room listing via the RetroArch lobby API (publicly available REST endpoint listing active sessions).

Options

Option A: RA.ME Relay (Recommended first)

  • No infrastructure cost to Provenance project
  • Works immediately with HAVE_NETPLAY
  • Configure netplay_relay_server = relay.retroarch.com in retroarch.cfg
  • @JoeMatt to negotiate Provenance-specific relay terms with RetroArch team

Option B: Provenance-hosted Relay (Future)

  • Full control, custom domain
  • ~$20/mo for 1000 concurrent sessions (RA relay is lightweight ~10KB/s/pair)
  • Requires backend ops

Option C: Apple GameKit (App Store builds only)

  • Uses Apple's GKMatch for relay + matchmaking
  • App Store only (not sideload/AltStore)
  • Adds multiplayer matchmaking UI

Changes Required

Phase 3A (RA.ME):

  • Default relay.retroarch.com in PVNetplaySettings
  • Settings UI for relay server hostname
  • "WAN" section in NetplayRoomBrowserView (calls RetroArch lobby REST API)
  • UI to share room invite links (deep link provenance://netplay/join?host=...&port=...)

Phase 3B (GameKit, optional):

  • Conditional compilation for App Store builds (#if APPSTORE)
  • GKMatchmaker for opponent finding
  • Voice channel via GKVoiceChat

Relay Server Notes

  • Default RetroArch relay port: 55435
  • Relay only relays UDP packets — no ROM data, no state — privacy-safe
  • Sessions are ephemeral; no persistent data on relay server

Acceptance Criteria

  • Default relay server pre-configured in settings
  • WAN rooms visible in room browser (via RetroArch lobby API)
  • Players can connect over internet without port forwarding
  • Invite link can be shared via iOS share sheet
  • Relay server configurable in settings (custom server support)
  • Graceful fallback to direct P2P if relay unreachable

Source: Provenance-Emu/Provenance