Initial commit: OpenFUT Core + Bridge scaffold
Two-repo monorepo for an offline FUT backend inspired by SPT. openfut-core: game-independent REST API backend (Axum, SQLite, SQLx) - 19 API endpoints: auth, profiles, clubs, cards, packs, squads, objectives, SBCs, match rewards, NPC market, statistics - JSON-driven card/pack/objective/SBC data (fully moddable) - SQLx migrations, weighted pack generator, SBC validation engine - 5 integration tests passing openfut-bridge: FIFA 23 traffic proxy + reverse-engineering scaffold - Catch-all HTTP proxy with request capture to captures/ - Known-route mapper (FUT paths → Core API calls) - Placeholder responses for unknown endpoints - Admin endpoints: captures, unknown endpoint list - 4 unit tests passing cargo fmt ✓ cargo clippy -D warnings ✓ cargo test ✓ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
```bash
|
||||
cargo fmt
|
||||
cargo clippy -- -D warnings
|
||||
cargo test
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user