feat(master): the server list names each server's port and machine

Master keeps the address and port auth, chat, the dashboard and the UGC
server report when they connect and sends them, with its own and every
world's, after the list's world states. A server's machine is the address
master sees its connection come from; loopback and master's external_ip are
master's machine. Servers can report another port than their RakNet one; the
UGC server reports its web port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-30 02:13:41 -05:00
parent 93aa88dd86
commit a93f5f810b
7 changed files with 108 additions and 2 deletions

View File

@@ -72,6 +72,10 @@ public:
using ConnectionIdentity = std::function<void(const SystemAddress& sysAddr, TrafficStats::Connection& connection)>;
void SetConnectionIdentity(ConnectionIdentity identity) { mConnectionIdentity = std::move(identity); }
// The port this server tells master it listens on (its ServerInfo, shown on the dashboard's Network page): its
// RakNet port unless set. The dashboard and the UGC server set their web port.
void SetAdvertisedPort(uint32_t port) { mAdvertisedPort = port; }
bool IsConnected(const SystemAddress& sysAddr);
const std::string& GetIP() const { return mIP; }
const int GetPort() const { return mPort; }
@@ -124,6 +128,7 @@ protected:
Logger* mLogger = nullptr;
dConfig* mConfig = nullptr;
RakPeerInterface* mPeer = nullptr;
uint32_t mAdvertisedPort = 0;
ReplicaManager* mReplicaManager = nullptr;
NetworkIDManager* mNetIDManager = nullptr;