Server registry
dealers-choice-registry is an optional directory server. Game servers can
publish themselves to it, and clients can browse the list to find internet
games (the LAN-only equivalent is built into the game and needs no registry).
⚠️ Experimental, and in maintenance mode. No public registry is being run; the code is kept building and tested but is not being developed further for now.
The server and networking code was primarily written by an LLM and has not been fully reviewed by a human network security expert. Any instructions regarding running the server should take that into account. This project attempts to use rigorous testing methods and anticipate security issues but, like any project, cannot guarantee the programs here are free of potential vulnerabilities.
Run one on a LAN or another network whose members you know. Hosting on the public internet is at your own risk until the code has had an independent review.
What it does
- A game server sends a short “I’m here” message (its name, port, player count) to the registry, and repeats it as a heartbeat.
- Before listing a server, the registry connects back to the advertised address and checks it really is a Dealer’s Choice server. A listing you can’t actually connect to never appears.
- Listings expire if the server stops sending heartbeats.
- The registry writes the current list to a JSON file (
--json <path>) that a website can serve, and answers list requests from clients.
Building it
The registry is not built or installed by default — most people running the game never host a directory server. Turn it on at configure time:
meson setup _build -Dregistry=true
(The wire parsers it shares with the client and server are always built and
tested; only the dealers-choice-registry program is gated.)
Running it
dealers-choice-registry --json /path/to/servers.json --verbose
The port defaults to 22070; pass --port to change it. Open inbound TCP on
that port on the registry host.
Game servers need no extra firewall change — the verification connects back
to the game port players already use.
Configuring which registries to use
The list of registries lives in common.conf, read by both the game client
(to show internet servers on the connect screen) and the headless server (to
publish itself).
common.conf is not installed. Creating it is how you opt in: copy the
template from the source tree’s data/common.conf into the installed data
directory — the one holding server.conf, typically
/usr/share/dealers-choice/ — and uncomment a registry line. With no
common.conf the game is LAN-only, which is the default:
# common.conf
registry = registry.example.org
registry = 203.0.113.5, 22071
One registry per line (dnsmasq-style): the host is the value, with an optional port as a comma attribute (default 22070). Repeat the line for more registries. The headless server publishes to every registry listed here; with none listed it publishes nowhere.
The client browses whatever is listed here. To stop it contacting a registry for
one run (it will then show only LAN servers), start it with
--disable-registry-browser.
Privacy — what is and isn’t stored
The registry is deliberate about addresses:
- Players who browse the server list: their IP address is not stored.
It is used only to send the reply back, and is never written to the server
list or the JSON file. It may appear in the registry’s own log only when
--verboseis enabled, and even then it is not saved anywhere by the program. - Game servers that publish: the server’s address is stored and shown
publicly (in the list, the JSON file, and any webpage). This is necessary —
the whole purpose of a directory is to tell players where the servers are.
A server operator opts into this by publishing; publishing can be turned off
(the game server’s
--disable-publishoption), in which case nothing about that server is sent to any registry. - The registry never sees the connection between a player and a game server. Those connections do not pass through the registry, so it cannot and does not collect players’ addresses from gameplay.
In short: a publishing server’s address is public by listing (the operator’s choice); a browsing player’s address is not collected.