Core/Network: Refactor local/remote ip address selection code and allow using hostnames in LoginREST bnetserver config options

This commit is contained in:
Shauren
2023-07-15 00:45:16 +02:00
parent cdfaecda52
commit 6be536a73b
13 changed files with 384 additions and 91 deletions

View File

@@ -32,6 +32,7 @@
#include "DeadlineTimer.h"
#include "GitRevision.h"
#include "IPLocation.h"
#include "IpNetwork.h"
#include "LoginRESTService.h"
#include "MySQLThreading.h"
#include "OpenSSLCrypto.h"
@@ -192,6 +193,8 @@ int main(int argc, char** argv)
std::shared_ptr<Trinity::Asio::IoContext> ioContext = std::make_shared<Trinity::Asio::IoContext>();
Trinity::Net::ScanLocalNetworks();
// Start the listening port (acceptor) for auth connections
int32 bnport = sConfigMgr->GetIntDefault("BattlenetPort", 1119);
if (bnport < 0 || bnport > 0xFFFF)