No description
Find a file
WiseDev 972c61dae7 replace command enum with a dyn trait + registry
new logic-derive Command macro submits each command to inventory, manager decodes by vint type. titan-derive loses tagged enums since nothing uses them now. rest of the diff is rustfmt.
2026-08-23 08:05:58 +03:00
assets initial import, client gets to the lobby 2026-08-23 07:50:31 +03:00
config initial import, client gets to the lobby 2026-08-23 07:50:31 +03:00
logic replace command enum with a dyn trait + registry 2026-08-23 08:05:58 +03:00
services replace command enum with a dyn trait + registry 2026-08-23 08:05:58 +03:00
titan replace command enum with a dyn trait + registry 2026-08-23 08:05:58 +03:00
.gitignore nuke the tests and the dead code 2026-08-23 07:51:04 +03:00
Cargo.lock replace command enum with a dyn trait + registry 2026-08-23 08:05:58 +03:00
Cargo.toml replace command enum with a dyn trait + registry 2026-08-23 08:05:58 +03:00
README.md initial import, client gets to the lobby 2026-08-23 07:50:31 +03:00

scroll-server

A server for the scroll client (Clash Royale 2.0.1306, iOS). Takes a real client from TCP connect to the lobby: login, own home data, chests, card upgrades, the shop.

Requirements

  • Rust 1.75+
  • PostgreSQL 16

Running

createdb scroll
cargo run --release -p scroll-server

Listens on 0.0.0.0:9339, the port the client hardcodes. The schema is created on first boot. DATABASE_URL defaults to postgres:///scroll.

On macOS a Homebrew cluster may need LC_ALL=C to start at all.

Services can also run separately:

cargo run --release -p auth-service
cargo run --release -p game-service
cargo run --release -p gateway

Checking it without a phone

scroll-probe speaks the same protocol and prints the decoded lobby:

cargo run --release -p gateway --bin scroll-probe -- 127.0.0.1:9339

Flags: --claim-free-chest, --buy-chest <name>, --desync. Pass an account and pass token to reconnect as an existing player: scroll-probe 127.0.0.1:9339 0 1 <passtoken>.

Pointing a client at it

The client hardcodes game.clashroyaleapp.com. Patch that string in the binary inside the ipa to your machine's address, keeping the 23 byte slot NUL padded so nothing around it moves.

Configuration

variable default
DATABASE_URL postgres:///scroll
SCROLL_GATEWAY_LISTEN 0.0.0.0:9339
SCROLL_CSV_ROOT assets
SCROLL_SHOP config/shop.json
SCROLL_STARTER_PROFILE built in
RUST_LOG info

Shop

config/shop.json lists what the server sells, as Name#count:

{
  "offers": [
    { "id": 1, "give": "Gold#1000" },
    { "id": 5, "give": "chest:Gold#1" },
    { "id": 7, "give": "Diamonds#500", "cost": "Gold#20000" }
  ]
}

Names resolve against the csv tables. cost is optional; without it the server charges the same price the client computes from the game data.