diff --git a/contrib/fractured-dev-extras/BUILD-NATIVE.md b/contrib/fractured-dev-extras/BUILD-NATIVE.md index e537b9e..a00fb29 100644 --- a/contrib/fractured-dev-extras/BUILD-NATIVE.md +++ b/contrib/fractured-dev-extras/BUILD-NATIVE.md @@ -17,17 +17,53 @@ prerequisites; everything here is just the deltas you need on top of it. ## Fractured client + network defaults -Production Fractured uses a non-default **auth** port so the client realmlist can be: +Stock-friendly defaults for fresh local installs. A `git clone` -> +`docker compose up` (or native install) lets a single developer log in +from the same machine without any post-install config tweaks. + +- **`authserver.conf` -> `RealmServerPort`** = **3724** (stock WoW). A + patched `Wow.exe` with `set realmlist 127.0.0.1` (no port) reaches + the auth handshake. +- **`realmlist` table -> `port`** is the **world** port (default + **8085**, matches `WorldServerPort` in `worldserver.conf.dist`). + Auth tells the client to handshake to this port for the world hand-off. +- **`realmlist` table -> `address`** defaults to **`127.0.0.1`** in the + base SQL. The auth server hands this address to clients after login, + so 127.0.0.1 means "talk to the world server on the same machine + auth is running on" -- correct for solo dev. **Override on production + deploys**, see *Production deployment overrides* below. + +### Production deployment overrides + +Production Fractured runs on a remote VPS at `hsrwow.net` with auth +bound to a non-stock port (47497 -- 3724 was unavailable on that host). +Apply the overrides **once per fresh dbimport** on the production box. + +```sql +-- Run against acore_auth on the production database after first dbimport: +UPDATE realmlist + SET address = 'hsrwow.net', + port = 8085 -- world port; leave at 8085 unless changed + WHERE id = 1; +``` + +Edit the production `authserver.conf` (NOT `authserver.conf.dist`) +to bind the auth listener to the production port: + +```ini +RealmServerPort = 47497 +``` + +Restart the auth server. Production clients connect with: ```text set realmlist hsrwow.net:47497 ``` -(Patched 3.3.5 clients that support `host:port`; otherwise use port forwarding to **3724**.) - -- **`authserver.conf` → `RealmServerPort`** must be **`47497`** (matches `authserver.conf.dist` in this repo). -- **`realmlist` table → `port`** is the **world** port (default **8085**, same as `WorldServerPort` in `worldserver.conf.dist`), **not** 47497. -- **`realmlist` → `address`** defaults to **`hsrwow.net`** in base SQL; change if your public hostname differs. +The Fractured-patched 3.3.5 client supports the `host:port` syntax; +stock 3.3.5 clients do not, so any contributor distributing the +client bundle for production must include the patched `Wow.exe` from +the GitHub release. --- diff --git a/contrib/fractured-dev-extras/CLIENT-PATCHES.md b/contrib/fractured-dev-extras/CLIENT-PATCHES.md index 5dfeeee..a371ca8 100644 --- a/contrib/fractured-dev-extras/CLIENT-PATCHES.md +++ b/contrib/fractured-dev-extras/CLIENT-PATCHES.md @@ -61,6 +61,25 @@ Fractured server builds ship the Paragon DBC overlay as a SQL migration (see **Server-side Paragon DBC overlay** below); fresh checkouts do **not** need the patched DBCs copied into `data/dbc/`. +If the client **logs in** successfully but **disconnects immediately** +when entering the realm: the auth server is handing your client the +wrong world-server address. On a fresh local install the seed defaults +to `127.0.0.1` (commit landing this paragraph). If your DB was +imported from an older Fractured checkout, the seed may still point at +`hsrwow.net`, which sends the client to our production world server +instead of yours. Fix: + +```bash +# Docker: +docker exec ac-database mysql -uroot -ppassword \ + -e "UPDATE acore_auth.realmlist SET address='127.0.0.1' WHERE id=1;" +docker compose restart ac-authserver +``` + +Substitute your public hostname/IP for `127.0.0.1` if remote players +will be connecting. See `BUILD-NATIVE.md` -> *Production deployment +overrides* for the full list of values to set on a production box. + --- ## Server-side Paragon DBC overlay (automatic) diff --git a/data/sql/base/db_auth/realmlist.sql b/data/sql/base/db_auth/realmlist.sql index 17943a4..0d030af 100644 --- a/data/sql/base/db_auth/realmlist.sql +++ b/data/sql/base/db_auth/realmlist.sql @@ -42,15 +42,26 @@ CREATE TABLE `realmlist` ( -- -- Dumping data for table `realmlist` -- --- Fractured defaults: `address` / `port` are the WORLD server (must match --- WorldServerPort in worldserver.conf). Client auth uses RealmServerPort from --- authserver.conf (Fractured dist: 47497), e.g. set realmlist hsrwow.net:47497 --- Adjust `localAddress` if your LAN/internal routing differs. +-- Defaults are tuned for fresh local installs: `address` is what the auth +-- server hands clients after login as the WORLD server endpoint. Stock +-- 127.0.0.1 means "the same box auth is running on", so a fresh +-- `git clone` -> `docker compose up` works without any post-install +-- tweaks for a developer hosting on their own machine. +-- +-- Production deployments must override `address` after first dbimport, +-- e.g.: +-- UPDATE realmlist SET address = 'your.public.host', port = 8085 WHERE id = 1; +-- See contrib/fractured-dev-extras/BUILD-NATIVE.md for the full deploy +-- checklist (auth/world ports, firewall, public hostnames). +-- +-- `port` is the WORLD server port (must match WorldServerPort in +-- worldserver.conf). The auth-server LISTEN port is separately configured +-- via RealmServerPort in authserver.conf (stock default 3724). LOCK TABLES `realmlist` WRITE; /*!40000 ALTER TABLE `realmlist` DISABLE KEYS */; INSERT INTO `realmlist` VALUES -(1,'Fractured WoW','hsrwow.net','127.0.0.1','255.255.255.0',8085,0,0,1,0,0,12340); +(1,'Fractured WoW','127.0.0.1','127.0.0.1','255.255.255.0',8085,0,0,1,0,0,12340); /*!40000 ALTER TABLE `realmlist` ENABLE KEYS */; UNLOCK TABLES; diff --git a/src/server/apps/authserver/authserver.conf.dist b/src/server/apps/authserver/authserver.conf.dist index 3595970..1dadff1 100644 --- a/src/server/apps/authserver/authserver.conf.dist +++ b/src/server/apps/authserver/authserver.conf.dist @@ -53,12 +53,14 @@ MaxPingTime = 30 # # RealmServerPort # Description: TCP port the auth server listens on (login handshake). -# Fractured production: match your client realmlist host:port, e.g. -# set realmlist hsrwow.net:47497 -# requires RealmServerPort = 47497 and firewall/NAT to this process. -# Default: 3724 (stock WoW); Fractured dist default: 47497 +# 3724 is the stock WoW default; clients with `set realmlist ` +# (no port) connect here. Production deployments that cannot bind +# 3724 (NAT, conflicting service, etc.) can set this to e.g. 47497 +# and have clients use `set realmlist :47497` -- the +# Fractured-patched Wow.exe supports the host:port syntax. +# Default: 3724 -RealmServerPort = 47497 +RealmServerPort = 3724 # #