funman300 b7da8b6e83 Phase 12: bridge completeness — expanded mapper, request replay, full shaper coverage
Mapper (src/mapper.rs):
- Restructured into ExactRoute + PrefixRoute tables (was a flat match list)
- 38 exact mappings (up from 18): SBC, Draft, FUT Champs, Division Rivals,
  Card Upgrades, Notifications, Settings, Trade pile, Club update, Stats, etc.
- 7 prefix-matched routes for path-param endpoints:
  /ut/game/fut/draft/{id}[/pick|/abandon]  → /draft/sessions/:id[/pick|/abandon]
  /ut/game/fut/champs/{id}/result|claim    → /fut-champs/:id/result|claim
  /ut/game/fut/store/pack/{id}/open        → /packs/open/:id
  /ut/game/fut/item/{id} DELETE            → /collection/:id (quick-sell)
  /ut/game/fut/trade/{id} DELETE           → /market/listings/:id (cancel)
  /ut/game/fut/sbc/set/{id}/submission     → /sbc/submit
- map_to_core_with_method() public helper preserves HTTP method for prefix routes
- 19 mapper unit tests (up from 6)

Replay (src/routes/admin.rs):
- POST /_bridge/captures/:id/replay — loads a capture from disk, re-runs it
  against Core with original headers+body, returns original vs new response
  plus a structured JSON diff for iterative shaper/handler development

Shaper (src/shaper.rs):
- 14 new shaper functions covering every mapped Core path:
  collection, cards, objectives, notifications, division, statistics,
  sbc, pack-open, draft, fut-champs, chemistry-styles, my-listings
- Prefix dispatch for /packs/open/, /draft/sessions/, /fut-champs/ paths
- All 25 unit tests pass, clippy clean

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 17:11:06 -07:00
2026-06-25 15:09:47 -07:00
2026-06-25 15:09:47 -07:00
2026-06-25 15:09:47 -07:00

OpenFUT Bridge

FIFA 23 integration layer and reverse-engineering proxy.

OpenFUT Bridge sits between the FIFA 23 client and the internet. It intercepts all FUT API traffic, logs every request, and routes known endpoints to OpenFUT Core. Unknown endpoints receive safe placeholder responses so the client keeps running.


What it does

  • Transparent HTTP proxy — point FIFA 23 here instead of EA's servers
  • Logs every request (method, path, headers, body, timestamp) to captures/
  • Maps known FUT endpoints to OpenFUT Core API calls
  • Returns placeholder JSON for unknown endpoints (prevents client crashes)
  • Admin API for reviewing captures and identifying unmapped routes
  • Foundation for building the full FIFA 23 integration

Architecture

FIFA 23 client
      │
      ▼
OpenFUT Bridge (port 8443)
      │
      ├── Known route → OpenFUT Core (port 8080)
      └── Unknown route → Placeholder JSON + saved to captures/

Quick Start

# Run Core first
cd ../openfut-core && cargo run

# Run Bridge
cargo run

# Or with config
CORE_URL=http://127.0.0.1:8080 BRIDGE_LISTEN_ADDR=127.0.0.1:8443 cargo run

Environment Variables

Variable Default Description
BRIDGE_LISTEN_ADDR 127.0.0.1:8443 Bridge listen address
CORE_URL http://127.0.0.1:8080 OpenFUT Core URL
CAPTURES_DIR captures Where to save captured requests
PLACEHOLDER_MODE true Return 200 for unknown endpoints

Admin API

Method Path Description
GET /_bridge/health Bridge status
GET /_bridge/captures All captured requests
GET /_bridge/unknown Unknown endpoints only

Reverse Engineering Workflow

  1. Point FIFA 23 at the Bridge (see docs/setup-notes.md for proxy setup)
  2. Start a game session
  3. Check captures/ or /_bridge/unknown for new endpoints
  4. Document the endpoint in docs/endpoint-map.md
  5. Add a mapping in src/mapper.rs
  6. Implement the Core handler

Proxy Setup (Research Notes)

See docs/setup-notes.md for notes on:

  • Windows hosts file redirection
  • RPCS3 network config (PS3)
  • Certificate bypass approaches
  • mitmproxy integration

Development

cargo fmt
cargo clippy -- -D warnings
cargo test

License

MIT

S
Description
FIFA 23 integration layer and reverse-engineering proxy
Readme 1.1 MiB
Languages
Rust 61.7%
HTML 38.3%