From a04393f5542cc02b1af0e4259d98cc40080972d1 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 10 Oct 2014 23:19:40 +0200 Subject: [PATCH] Core/Auth: Moved battle.net handling to separate project --- src/server/CMakeLists.txt | 1 + src/server/authserver/CMakeLists.txt | 1 - src/server/authserver/Main.cpp | 13 - .../authserver/PrecompiledHeaders/authPCH.h | 3 - src/server/authserver/Realms/RealmList.cpp | 14 - src/server/authserver/Realms/RealmList.h | 6 - .../bnetserver/Authentication/AuthCodes.cpp | 55 +++ .../bnetserver/Authentication/AuthCodes.h | 128 +++++++ .../Authentication}/BattlenetPacketCrypt.cpp | 0 .../Authentication}/BattlenetPacketCrypt.h | 6 +- src/server/bnetserver/CMakeLists.txt | 115 +++++++ src/server/bnetserver/Main.cpp | 238 +++++++++++++ .../Packets}/AchievementPackets.h | 2 +- .../Packets/AuthenticationPackets.cpp | 319 ++++++++++++++++++ .../Packets}/AuthenticationPackets.h | 2 +- .../Packets/BitStream.cpp} | 2 +- .../Packets/BitStream.h} | 6 +- .../Packets}/CachePackets.h | 2 +- .../Packets}/ChatPackets.h | 2 +- .../Packets}/ConnectionPackets.cpp | 2 +- .../Packets}/ConnectionPackets.h | 2 +- .../Packets}/FriendsPackets.cpp | 7 +- .../Packets}/FriendsPackets.h | 2 +- .../Packets/PacketFactory.h} | 18 +- .../Packets/Packets.h} | 6 +- .../Packets/PacketsBase.cpp} | 2 +- .../Packets/PacketsBase.h} | 9 +- .../Packets}/PresencePackets.cpp | 8 +- .../Packets}/PresencePackets.h | 2 +- .../Packets}/ProfilePackets.h | 2 +- .../Packets}/SupportPackets.h | 2 +- .../Packets}/WoWRealmPackets.cpp | 2 +- .../Packets}/WoWRealmPackets.h | 3 +- .../bnetserver/PrecompiledHeaders/bnetPCH.cpp | 1 + .../bnetserver/PrecompiledHeaders/bnetPCH.h | 10 + src/server/bnetserver/Realms/RealmList.cpp | 207 ++++++++++++ src/server/bnetserver/Realms/RealmList.h | 113 +++++++ .../bnetserver/Server/ComponentManager.cpp | 55 +++ .../bnetserver/Server/ComponentManager.h | 61 ++++ .../Server/ModuleManager.cpp} | 53 +-- .../Server/ModuleManager.h} | 68 ++-- .../Server/Session.cpp} | 70 ++-- .../Server/Session.h} | 8 +- .../Server/SessionManager.cpp} | 4 +- .../Server/SessionManager.h} | 10 +- src/server/bnetserver/bnetserver.conf.dist | 257 ++++++++++++++ src/server/bnetserver/bnetserver.ico | Bin 0 -> 136606 bytes src/server/bnetserver/bnetserver.rc | 94 ++++++ src/server/bnetserver/resource.h | 15 + 49 files changed, 1786 insertions(+), 222 deletions(-) create mode 100644 src/server/bnetserver/Authentication/AuthCodes.cpp create mode 100644 src/server/bnetserver/Authentication/AuthCodes.h rename src/server/{authserver/Server => bnetserver/Authentication}/BattlenetPacketCrypt.cpp (100%) rename src/server/{authserver/Server => bnetserver/Authentication}/BattlenetPacketCrypt.h (89%) create mode 100644 src/server/bnetserver/CMakeLists.txt create mode 100644 src/server/bnetserver/Main.cpp rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/AchievementPackets.h (97%) create mode 100644 src/server/bnetserver/Packets/AuthenticationPackets.cpp rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/AuthenticationPackets.h (99%) rename src/server/{authserver/Server/BattlenetBitStream.cpp => bnetserver/Packets/BitStream.cpp} (96%) rename src/server/{authserver/Server/BattlenetBitStream.h => bnetserver/Packets/BitStream.h} (98%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/CachePackets.h (97%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/ChatPackets.h (98%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/ConnectionPackets.cpp (98%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/ConnectionPackets.h (98%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/FriendsPackets.cpp (97%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/FriendsPackets.h (99%) rename src/server/{authserver/Server/BattlenetPacketFactory.h => bnetserver/Packets/PacketFactory.h} (80%) rename src/server/{authserver/Server/BattlenetPackets/BattlenetPackets.h => bnetserver/Packets/Packets.h} (91%) rename src/server/{authserver/Server/BattlenetPackets/BattlenetPacketsBase.cpp => bnetserver/Packets/PacketsBase.cpp} (97%) rename src/server/{authserver/Server/BattlenetPackets/BattlenetPacketsBase.h => bnetserver/Packets/PacketsBase.h} (95%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/PresencePackets.cpp (92%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/PresencePackets.h (98%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/ProfilePackets.h (98%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/SupportPackets.h (96%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/WoWRealmPackets.cpp (99%) rename src/server/{authserver/Server/BattlenetPackets => bnetserver/Packets}/WoWRealmPackets.h (99%) create mode 100644 src/server/bnetserver/PrecompiledHeaders/bnetPCH.cpp create mode 100644 src/server/bnetserver/PrecompiledHeaders/bnetPCH.h create mode 100644 src/server/bnetserver/Realms/RealmList.cpp create mode 100644 src/server/bnetserver/Realms/RealmList.h create mode 100644 src/server/bnetserver/Server/ComponentManager.cpp create mode 100644 src/server/bnetserver/Server/ComponentManager.h rename src/server/{authserver/Server/BattlenetManager.cpp => bnetserver/Server/ModuleManager.cpp} (51%) rename src/server/{authserver/Server/BattlenetManager.h => bnetserver/Server/ModuleManager.h} (60%) rename src/server/{authserver/Server/BattlenetSession.cpp => bnetserver/Server/Session.cpp} (92%) rename src/server/{authserver/Server/BattlenetSession.h => bnetserver/Server/Session.h} (97%) rename src/server/{authserver/Server/BattlenetSessionManager.cpp => bnetserver/Server/SessionManager.cpp} (91%) rename src/server/{authserver/Server/BattlenetSessionManager.h => bnetserver/Server/SessionManager.h} (89%) create mode 100644 src/server/bnetserver/bnetserver.conf.dist create mode 100644 src/server/bnetserver/bnetserver.ico create mode 100644 src/server/bnetserver/bnetserver.rc create mode 100644 src/server/bnetserver/resource.h diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 05cbe51b15d..ea2ad3abac7 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -25,6 +25,7 @@ if( SERVERS ) add_subdirectory(game) add_subdirectory(collision) add_subdirectory(authserver) + add_subdirectory(bnetserver) add_subdirectory(scripts) add_subdirectory(worldserver) else() diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt index ae706973ff7..b40b8c906f4 100644 --- a/src/server/authserver/CMakeLists.txt +++ b/src/server/authserver/CMakeLists.txt @@ -58,7 +58,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/Authentication ${CMAKE_CURRENT_SOURCE_DIR}/Realms ${CMAKE_CURRENT_SOURCE_DIR}/Server - ${CMAKE_CURRENT_SOURCE_DIR}/Server/BattlenetPackets ${MYSQL_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${VALGRIND_INCLUDE_DIR} diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index e614b2b79fa..5f08ebe3127 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -25,8 +25,6 @@ */ #include "AuthSocketMgr.h" -#include "BattlenetManager.h" -#include "BattlenetSessionManager.h" #include "Common.h" #include "Config.h" #include "DatabaseEnv.h" @@ -117,18 +115,9 @@ int main(int argc, char** argv) return 1; } - int32 bnport = sConfigMgr->GetIntDefault("BattlenetPort", 1119); - if (bnport < 0 || bnport > 0xFFFF) - { - TC_LOG_ERROR("server.authserver", "Specified battle.net port (%d) out of allowed range (1-65535)", bnport); - StopDB(); - return 1; - } - std::string bindIp = sConfigMgr->GetStringDefault("BindIP", "0.0.0.0"); sAuthSocketMgr.StartNetwork(_ioService, bindIp, port); - sBattlenetSessionMgr.StartNetwork(_ioService, bindIp, bnport); // Set signal handlers boost::asio::signal_set signals(_ioService, SIGINT, SIGTERM); @@ -145,8 +134,6 @@ int main(int argc, char** argv) _dbPingTimer.expires_from_now(boost::posix_time::minutes(_dbPingInterval)); _dbPingTimer.async_wait(KeepDatabaseAliveHandler); - sBattlenetMgr->Load(); - // Start the io service worker loop _ioService.run(); diff --git a/src/server/authserver/PrecompiledHeaders/authPCH.h b/src/server/authserver/PrecompiledHeaders/authPCH.h index b509f8caaa0..90424161344 100644 --- a/src/server/authserver/PrecompiledHeaders/authPCH.h +++ b/src/server/authserver/PrecompiledHeaders/authPCH.h @@ -2,9 +2,6 @@ #include "Configuration/Config.h" #include "Database/DatabaseEnv.h" #include "Log.h" -#include "BattlenetManager.h" #include "RealmList.h" #include "ByteBuffer.h" -#include "BattlenetPackets.h" #include "AuthSession.h" -#include "BattlenetSession.h" diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp index 2110dc1fecc..662a015dc65 100644 --- a/src/server/authserver/Realms/RealmList.cpp +++ b/src/server/authserver/Realms/RealmList.cpp @@ -19,7 +19,6 @@ #include #include "Common.h" #include "RealmList.h" -#include "BattlenetManager.h" #include "Database/DatabaseEnv.h" #include "Util.h" @@ -193,16 +192,3 @@ void RealmList::UpdateRealms(bool init) while (result->NextRow()); } } - -Realm const* RealmList::GetRealm(Battlenet::RealmId const& id) const -{ - auto itr = std::find_if(m_realms.begin(), m_realms.end(), [id](RealmMap::value_type const& pair) - { - return pair.second.Region == id.Region && pair.second.Battlegroup == id.Battlegroup && pair.second.m_ID == id.Index; - }); - - if (itr != m_realms.end()) - return &itr->second; - - return NULL; -} diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h index 0063b1a60c8..f7a98cda686 100644 --- a/src/server/authserver/Realms/RealmList.h +++ b/src/server/authserver/Realms/RealmList.h @@ -60,11 +60,6 @@ struct Realm ip::tcp::endpoint GetAddressForClient(ip::address const& clientAddr) const; }; -namespace Battlenet -{ - struct RealmId; -} - /// Storage object for the list of realms on the server class RealmList { @@ -88,7 +83,6 @@ public: RealmMap::const_iterator begin() const { return m_realms.begin(); } RealmMap::const_iterator end() const { return m_realms.end(); } uint32 size() const { return m_realms.size(); } - Realm const* GetRealm(Battlenet::RealmId const& id) const; private: RealmList(); diff --git a/src/server/bnetserver/Authentication/AuthCodes.cpp b/src/server/bnetserver/Authentication/AuthCodes.cpp new file mode 100644 index 00000000000..908bc30b719 --- /dev/null +++ b/src/server/bnetserver/Authentication/AuthCodes.cpp @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "AuthCodes.h" +#include + +namespace AuthHelper +{ + static RealmBuildInfo const PostBcAcceptedClientBuilds[] = + { + {15595, 4, 3, 4, ' '}, + {14545, 4, 2, 2, ' '}, + {13623, 4, 0, 6, 'a'}, + {13930, 3, 3, 5, 'a'}, // 3.3.5a China Mainland build + {12340, 3, 3, 5, 'a'}, + {11723, 3, 3, 3, 'a'}, + {11403, 3, 3, 2, ' '}, + {11159, 3, 3, 0, 'a'}, + {10505, 3, 2, 2, 'a'}, + {9947, 3, 1, 3, ' '}, + {8606, 2, 4, 3, ' '}, + {6141, 1, 12, 3, ' '}, + {6005, 1, 12, 2, ' '}, + {5875, 1, 12, 1, ' '}, + {0, 0, 0, 0, ' '} // terminator + }; + + RealmBuildInfo const* GetBuildInfo(int build) + { + for (int i = 0; PostBcAcceptedClientBuilds[i].Build; ++i) + if (PostBcAcceptedClientBuilds[i].Build == build) + return &PostBcAcceptedClientBuilds[i]; + + return nullptr; + } + + bool IsBuildSupportingBattlenet(int build) + { + return build >= 15595; + } +} diff --git a/src/server/bnetserver/Authentication/AuthCodes.h b/src/server/bnetserver/Authentication/AuthCodes.h new file mode 100644 index 00000000000..3c3b002551c --- /dev/null +++ b/src/server/bnetserver/Authentication/AuthCodes.h @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * Copyright (C) 2005-2009 MaNGOS + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef _AUTHCODES_H +#define _AUTHCODES_H + +enum GameAccountFlags +{ + GAMEACCOUNT_FLAG_GM = 0x00000001, + GAMEACCOUNT_FLAG_NOKICK = 0x00000002, + GAMEACCOUNT_FLAG_COLLECTOR = 0x00000004, + GAMEACCOUNT_FLAG_WOW_TRIAL = 0x00000008, + GAMEACCOUNT_FLAG_CANCELLED = 0x00000010, + GAMEACCOUNT_FLAG_IGR = 0x00000020, + GAMEACCOUNT_FLAG_WHOLESALER = 0x00000040, + GAMEACCOUNT_FLAG_PRIVILEGED = 0x00000080, + GAMEACCOUNT_FLAG_EU_FORBID_ELV = 0x00000100, + GAMEACCOUNT_FLAG_EU_FORBID_BILLING = 0x00000200, + GAMEACCOUNT_FLAG_WOW_RESTRICTED = 0x00000400, + GAMEACCOUNT_FLAG_REFERRAL = 0x00000800, + GAMEACCOUNT_FLAG_BLIZZARD = 0x00001000, + GAMEACCOUNT_FLAG_RECURRING_BILLING = 0x00002000, + GAMEACCOUNT_FLAG_NOELECTUP = 0x00004000, + GAMEACCOUNT_FLAG_KR_CERTIFICATE = 0x00008000, + GAMEACCOUNT_FLAG_EXPANSION_COLLECTOR = 0x00010000, + GAMEACCOUNT_FLAG_DISABLE_VOICE = 0x00020000, + GAMEACCOUNT_FLAG_DISABLE_VOICE_SPEAK = 0x00040000, + GAMEACCOUNT_FLAG_REFERRAL_RESURRECT = 0x00080000, + GAMEACCOUNT_FLAG_EU_FORBID_CC = 0x00100000, + GAMEACCOUNT_FLAG_OPENBETA_DELL = 0x00200000, + GAMEACCOUNT_FLAG_PROPASS = 0x00400000, + GAMEACCOUNT_FLAG_PROPASS_LOCK = 0x00800000, + GAMEACCOUNT_FLAG_PENDING_UPGRADE = 0x01000000, + GAMEACCOUNT_FLAG_RETAIL_FROM_TRIAL = 0x02000000, + GAMEACCOUNT_FLAG_EXPANSION2_COLLECTOR = 0x04000000, + GAMEACCOUNT_FLAG_OVERMIND_LINKED = 0x08000000, + GAMEACCOUNT_FLAG_DEMOS = 0x10000000, + GAMEACCOUNT_FLAG_DEATH_KNIGHT_OK = 0x20000000, +}; + +namespace Battlenet +{ + enum AuthResult + { + AUTH_OK = 0, + AUTH_INTERNAL_ERROR = 100, + AUTH_CORRUPTED_MODULE = 101, + AUTH_NO_BATTLETAGS = 102, + AUTH_BAD_SERVER_PROOF = 103, + AUTH_UNKNOWN_ACCOUNT = 104, + AUTH_CLOSED = 105, + AUTH_LOGIN_TIMEOUT = 106, + AUTH_NO_GAME_ACCOUNTS = 107, + AUTH_INVALID_TOKEN = 108, + AUTH_INVALID_PROGRAM = 109, + AUTH_INVALID_OS = 110, + AUTH_UNSUPPORTED_LANGUAGE = 111, + AUTH_REGION_BAD_VERSION = 112, + AUTH_TEMP_OUTAGE = 113, + AUTH_CANT_DOWNLOAD_MODULE = 114, + AUTH_DUPLICATE_LOGON = 115, + AUTH_BAD_CREDENTIALS_2 = 116, + AUTH_VERSION_CHECK_SUCCEEDED = 117, + AUTH_BAD_VERSION_HASH = 118, + AUTH_CANT_RETRIEVE_PORTAL_LIST = 119, + AUTH_DARK_PORTAL_DOES_NOT_EXIST = 120, + AUTH_DARK_PORTAL_FILE_CORRUPTED = 121, + AUTH_BATTLENET_MAINTENANCE = 122, + AUTH_LOGON_TOO_FAST = 123, + AUTH_USE_GRUNT_LOGON = 124, + AUTH_NO_GAME_ACCOUNTS_IN_REGION = 140, + AUTH_ACCOUNT_LOCKED = 141, + + LOGIN_SERVER_BUSY = 200, + LOGIN_NO_GAME_ACCOUNT = 201, + LOGIN_BANNED = 202, + LOGIN_SUSPENDED = 203, + LOGIN_GAME_ACCOUNT_LOCKED = 204, + LOGIN_ALREADY_ONLINE = 205, + LOGIN_NOTIME = 206, + LOGIN_EXPIRED = 207, + LOGIN_EXPIRED_2 = 208, + LOGIN_PARENTALCONTROL = 209, + LOGIN_TRIAL_EXPIRED = 210, + LOGIN_ANTI_INDULGENCE = 211, + LOGIN_INCORRECT_REGION = 212, + LOGIN_LOCKED_ENFORCED = 213, + LOGIN_CHARGEBACK = 214, + LOGIN_IGR_WITHOUT_BNET = 215, + LOGIN_UNLOCKABLE_LOCK = 216, + LOGIN_IGR_REQUIRED = 217, + LOGIN_PAYMENT_CHANGED = 218, + LOGIN_INVALID_PAYMENT = 219, + LOGIN_INVALID_ACCOUNT_STATE = 220 + }; +} + +struct RealmBuildInfo +{ + int Build; + int MajorVersion; + int MinorVersion; + int BugfixVersion; + int HotfixVersion; +}; + +namespace AuthHelper +{ + RealmBuildInfo const* GetBuildInfo(int build); + bool IsBuildSupportingBattlenet(int build); +} + +#endif diff --git a/src/server/authserver/Server/BattlenetPacketCrypt.cpp b/src/server/bnetserver/Authentication/BattlenetPacketCrypt.cpp similarity index 100% rename from src/server/authserver/Server/BattlenetPacketCrypt.cpp rename to src/server/bnetserver/Authentication/BattlenetPacketCrypt.cpp diff --git a/src/server/authserver/Server/BattlenetPacketCrypt.h b/src/server/bnetserver/Authentication/BattlenetPacketCrypt.h similarity index 89% rename from src/server/authserver/Server/BattlenetPacketCrypt.h rename to src/server/bnetserver/Authentication/BattlenetPacketCrypt.h index dde687651d3..a09d3417dfe 100644 --- a/src/server/authserver/Server/BattlenetPacketCrypt.h +++ b/src/server/bnetserver/Authentication/BattlenetPacketCrypt.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef __BATTLENETPACKETCRYPT_H__ -#define __BATTLENETPACKETCRYPT_H__ +#ifndef BattlenetPacketCrypt_h__ +#define BattlenetPacketCrypt_h__ #include "PacketCrypt.h" @@ -32,5 +32,5 @@ namespace Battlenet void Init(BigNumber* K) override; }; } +#endif // BattlenetPacketCrypt_h__ -#endif // __BATTLENETPACKETCRYPT_H__ diff --git a/src/server/bnetserver/CMakeLists.txt b/src/server/bnetserver/CMakeLists.txt new file mode 100644 index 00000000000..3fa4abf034a --- /dev/null +++ b/src/server/bnetserver/CMakeLists.txt @@ -0,0 +1,115 @@ +# Copyright (C) 2008-2014 TrinityCore +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +########### authserver ############### + +file(GLOB_RECURSE sources_authentication Authentication/*.cpp Authentication/*.h) +file(GLOB_RECURSE sources_realms Realms/*.cpp Realms/*.h) +file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h) +file(GLOB_RECURSE sources_packets Packets/*.cpp Packets/*.h) +file(GLOB sources_localdir *.cpp *.h) + +if (USE_COREPCH) + set(bnetserver_PCH_HDR PrecompiledHeaders/bnetPCH.h) + set(bnetserver_PCH_SRC PrecompiledHeaders/bnetPCH.cpp) +endif() + +set(bnetserver_SRCS + ${bnetserver_SRCS} + ${sources_authentication} + ${sources_realms} + ${sources_server} + ${sources_packets} + ${sources_localdir} +) + +if( WIN32 ) + set(bnetserver_SRCS + ${bnetserver_SRCS} + ${sources_windows_Debugging} + ) + if ( MSVC ) + set(bnetserver_SRCS + ${bnetserver_SRCS} + bnetserver.rc + ) + endif () +endif() + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src/server/shared + ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration + ${CMAKE_SOURCE_DIR}/src/server/shared/Database + ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging + ${CMAKE_SOURCE_DIR}/src/server/shared/Packets + ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography + ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography/Authentication + ${CMAKE_SOURCE_DIR}/src/server/shared/Logging + ${CMAKE_SOURCE_DIR}/src/server/shared/Networking + ${CMAKE_SOURCE_DIR}/src/server/shared/Threading + ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/Authentication + ${CMAKE_CURRENT_SOURCE_DIR}/Realms + ${CMAKE_CURRENT_SOURCE_DIR}/Server + ${CMAKE_CURRENT_SOURCE_DIR}/Packets + ${MYSQL_INCLUDE_DIR} + ${OPENSSL_INCLUDE_DIR} + ${VALGRIND_INCLUDE_DIR} +) + +add_executable(bnetserver + ${bnetserver_SRCS} + ${bnetserver_PCH_SRC} +) + +add_dependencies(bnetserver revision.h) + +if( NOT WIN32 ) + set_target_properties(bnetserver PROPERTIES + COMPILE_DEFINITIONS _TRINITY_BNET_CONFIG="${CONF_DIR}/bnetserver.conf" + ) +endif() + +target_link_libraries(bnetserver + shared + ${MYSQL_LIBRARY} + ${OPENSSL_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ${Boost_LIBRARIES} +) + +if( WIN32 ) + if ( MSVC ) + add_custom_command(TARGET bnetserver + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/ + ) + elseif ( MINGW ) + add_custom_command(TARGET bnetserver + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.conf.dist ${CMAKE_BINARY_DIR}/bin/ + ) + endif() +endif() + +if( UNIX ) + install(TARGETS bnetserver DESTINATION bin) + install(FILES bnetserver.conf.dist DESTINATION ${CONF_DIR}) +elseif( WIN32 ) + install(TARGETS bnetserver DESTINATION "${CMAKE_INSTALL_PREFIX}") + install(FILES bnetserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}") +endif() + +# Generate precompiled header +if (USE_COREPCH) + add_cxx_pch(bnetserver ${bnetserver_PCH_HDR} ${bnetserver_PCH_SRC}) +endif() diff --git a/src/server/bnetserver/Main.cpp b/src/server/bnetserver/Main.cpp new file mode 100644 index 00000000000..cb9bab97841 --- /dev/null +++ b/src/server/bnetserver/Main.cpp @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * Copyright (C) 2005-2009 MaNGOS + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/** +* @file main.cpp +* @brief Authentication Server main program +* +* This file contains the main program for the +* authentication server +*/ + +#include "ComponentManager.h" +#include "ModuleManager.h" +#include "SessionManager.h" +#include "Common.h" +#include "Config.h" +#include "DatabaseEnv.h" +#include "Log.h" +#include "ProcessPriority.h" +#include "RealmList.h" +#include "SystemConfig.h" +#include "Util.h" +#include +#include +#include +#include +#include +#include + +using boost::asio::ip::tcp; +using namespace boost::program_options; + +#ifndef _TRINITY_BNET_CONFIG +# define _TRINITY_BNET_CONFIG "authserver.conf" +#endif + +bool StartDB(); +void StopDB(); +void SignalHandler(const boost::system::error_code& error, int signalNumber); +void KeepDatabaseAliveHandler(const boost::system::error_code& error); +variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile); + +boost::asio::io_service _ioService; +boost::asio::deadline_timer _dbPingTimer(_ioService); +uint32 _dbPingInterval; +LoginDatabaseWorkerPool LoginDatabase; + +int main(int argc, char** argv) +{ + std::string configFile = _TRINITY_BNET_CONFIG; + auto vm = GetConsoleArguments(argc, argv, configFile); + // exit if help is enabled + if (vm.count("help")) + return 0; + + std::string configError; + if (!sConfigMgr->LoadInitial(configFile, configError)) + { + printf("Error in config file: %s\n", configError.c_str()); + return 1; + } + + TC_LOG_INFO("server.bnetserver", "%s (bnetserver)", _FULLVERSION); + TC_LOG_INFO("server.bnetserver", " to stop.\n"); + TC_LOG_INFO("server.bnetserver", "Using configuration file %s.", configFile.c_str()); + TC_LOG_INFO("server.bnetserver", "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); + TC_LOG_INFO("server.bnetserver", "Using Boost version: %i.%i.%i", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100); + + // authserver PID file creation + std::string pidFile = sConfigMgr->GetStringDefault("PidFile", ""); + if (!pidFile.empty()) + { + if (uint32 pid = CreatePIDFile(pidFile)) + TC_LOG_INFO("server.bnetserver", "Daemon PID: %u\n", pid); + else + { + TC_LOG_ERROR("server.bnetserver", "Cannot create PID file %s.\n", pidFile.c_str()); + return 1; + } + } + + // Initialize the database connection + if (!StartDB()) + return 1; + + // Get the list of realms for the server + sRealmList->Initialize(_ioService, sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 20)); + + if (sRealmList->size() == 0) + { + TC_LOG_ERROR("server.bnetserver", "No valid realms specified."); + StopDB(); + return 1; + } + + // Start the listening port (acceptor) for auth connections + int32 bnport = sConfigMgr->GetIntDefault("BattlenetPort", 1119); + if (bnport < 0 || bnport > 0xFFFF) + { + TC_LOG_ERROR("server.bnetserver", "Specified battle.net port (%d) out of allowed range (1-65535)", bnport); + StopDB(); + return 1; + } + + std::string bindIp = sConfigMgr->GetStringDefault("BindIP", "0.0.0.0"); + + sSessionMgr.StartNetwork(_ioService, bindIp, bnport); + + // Set signal handlers + boost::asio::signal_set signals(_ioService, SIGINT, SIGTERM); +#if PLATFORM == PLATFORM_WINDOWS + signals.add(SIGBREAK); +#endif + signals.async_wait(SignalHandler); + + // Set process priority according to configuration settings + SetProcessPriority("server.bnetserver"); + + // Enabled a timed callback for handling the database keep alive ping + _dbPingInterval = sConfigMgr->GetIntDefault("MaxPingTime", 30); + _dbPingTimer.expires_from_now(boost::posix_time::minutes(_dbPingInterval)); + _dbPingTimer.async_wait(KeepDatabaseAliveHandler); + + sComponentMgr->Load(); + sModuleMgr->Load(); + + // Start the io service worker loop + _ioService.run(); + + // Close the Database Pool and library + StopDB(); + + TC_LOG_INFO("server.bnetserver", "Halting process..."); + return 0; +} + + +/// Initialize connection to the database +bool StartDB() +{ + MySQL::Library_Init(); + + std::string dbstring = sConfigMgr->GetStringDefault("LoginDatabaseInfo", ""); + if (dbstring.empty()) + { + TC_LOG_ERROR("server.authserver", "Database not specified"); + return false; + } + + int32 worker_threads = sConfigMgr->GetIntDefault("LoginDatabase.WorkerThreads", 1); + if (worker_threads < 1 || worker_threads > 32) + { + TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1."); + worker_threads = 1; + } + + int32 synch_threads = sConfigMgr->GetIntDefault("LoginDatabase.SynchThreads", 1); + if (synch_threads < 1 || synch_threads > 32) + { + TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1."); + synch_threads = 1; + } + + // NOTE: While authserver is singlethreaded you should keep synch_threads == 1. Increasing it is just silly since only 1 will be used ever. + if (!LoginDatabase.Open(dbstring, uint8(worker_threads), uint8(synch_threads))) + { + TC_LOG_ERROR("server.authserver", "Cannot connect to database"); + return false; + } + + TC_LOG_INFO("server.authserver", "Started auth database connection pool."); + sLog->SetRealmId(0); // Enables DB appenders when realm is set. + return true; +} + +/// Close the connection to the database +void StopDB() +{ + LoginDatabase.Close(); + MySQL::Library_End(); +} + +void SignalHandler(const boost::system::error_code& error, int /*signalNumber*/) +{ + if (!error) + _ioService.stop(); +} + +void KeepDatabaseAliveHandler(const boost::system::error_code& error) +{ + if (!error) + { + TC_LOG_INFO("server.authserver", "Ping MySQL to keep connection alive"); + LoginDatabase.KeepAlive(); + + _dbPingTimer.expires_from_now(boost::posix_time::minutes(_dbPingInterval)); + _dbPingTimer.async_wait(KeepDatabaseAliveHandler); + } +} + +variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile) +{ + options_description all("Allowed options"); + all.add_options() + ("help,h", "print usage message") + ("config,c", value(&configFile)->default_value(_TRINITY_BNET_CONFIG), "use as configuration file") + ; + variables_map variablesMap; + try + { + store(command_line_parser(argc, argv).options(all).allow_unregistered().run(), variablesMap); + notify(variablesMap); + } + catch (std::exception& e) { + std::cerr << e.what() << "\n"; + } + + if (variablesMap.count("help")) { + std::cout << all << "\n"; + } + + return variablesMap; +} diff --git a/src/server/authserver/Server/BattlenetPackets/AchievementPackets.h b/src/server/bnetserver/Packets/AchievementPackets.h similarity index 97% rename from src/server/authserver/Server/BattlenetPackets/AchievementPackets.h rename to src/server/bnetserver/Packets/AchievementPackets.h index 69a03c7e16d..99a0f19d0a2 100644 --- a/src/server/authserver/Server/BattlenetPackets/AchievementPackets.h +++ b/src/server/bnetserver/Packets/AchievementPackets.h @@ -18,7 +18,7 @@ #ifndef AchievementPackets_h__ #define AchievementPackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/bnetserver/Packets/AuthenticationPackets.cpp b/src/server/bnetserver/Packets/AuthenticationPackets.cpp new file mode 100644 index 00000000000..ae2db016972 --- /dev/null +++ b/src/server/bnetserver/Packets/AuthenticationPackets.cpp @@ -0,0 +1,319 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "AuthenticationPackets.h" +#include "Util.h" + +void Battlenet::Authentication::LogonRequest::Read() +{ + Program = _stream.ReadFourCC(); + Platform = _stream.ReadFourCC(); + Locale = _stream.ReadFourCC(); + + Components.resize(_stream.Read(6)); + for (size_t i = 0; i < Components.size(); ++i) + { + Component& component = Components[i]; + component.Program = _stream.ReadFourCC(); + component.Platform = _stream.ReadFourCC(); + component.Build = _stream.Read(32); + } + + if (_stream.Read(1)) + Login = _stream.ReadString(9, 3); +} + +std::string Battlenet::Authentication::LogonRequest::ToString() const +{ + std::ostringstream stream; + stream << "Battlenet::Authentication::LogonRequest Program: " << Program << ", Platform: " << Platform << ", Locale: " << Locale; + for (Component const& component : Components) + stream << std::endl << "Battlenet::Component Program: " << component.Program << ", Platform: " << component.Platform << ", Build: " << component.Build; + + if (!Login.empty()) + stream << std::endl << "Battlenet::Authentication::LogonRequest Login: " << Login; + + return stream.str(); +} + +void Battlenet::Authentication::LogonRequest::CallHandler(Session* session) const +{ + session->HandleLogonRequest(*this); +} + +void Battlenet::Authentication::ResumeRequest::Read() +{ + Program = _stream.ReadFourCC(); + Platform = _stream.ReadFourCC(); + Locale = _stream.ReadFourCC(); + + Components.resize(_stream.Read(6)); + for (size_t i = 0; i < Components.size(); ++i) + { + Component& component = Components[i]; + component.Program = _stream.ReadFourCC(); + component.Platform = _stream.ReadFourCC(); + component.Build = _stream.Read(32); + } + + Login = _stream.ReadString(9, 3); + Region = _stream.Read(8); + GameAccountName = _stream.ReadString(5, 1); +} + +std::string Battlenet::Authentication::ResumeRequest::ToString() const +{ + std::ostringstream stream; + stream << "Battlenet::Authentication::ResumeRequest Program: " << Program << ", Platform: " << Platform << ", Locale: " << Locale; + for (Component const& component : Components) + stream << std::endl << "Battlenet::Component Program: " << component.Program << ", Platform: " << component.Platform << ", Build: " << component.Build; + + stream << std::endl << "Login: " << Login; + stream << std::endl << "Region: " << uint32(Region); + stream << std::endl << "GameAccountName: " << GameAccountName; + + return stream.str(); +} + +void Battlenet::Authentication::ResumeRequest::CallHandler(Session* session) const +{ + session->HandleResumeRequest(*this); +} + +Battlenet::Authentication::ProofRequest::~ProofRequest() +{ + for (size_t i = 0; i < Modules.size(); ++i) + delete Modules[i]; +} + +void Battlenet::Authentication::ProofRequest::Write() +{ + _stream.Write(Modules.size(), 3); + for (ModuleInfo const* info : Modules) + { + _stream.WriteBytes(info->Type.c_str(), 4); + _stream.WriteFourCC(info->Region); + _stream.WriteBytes(info->ModuleId, 32); + _stream.Write(info->DataSize, 10); + _stream.WriteBytes(info->Data, info->DataSize); + } +} + +std::string Battlenet::Authentication::ProofRequest::ToString() const +{ + std::ostringstream stream; + stream << "Battlenet::Authentication::ProofRequest modules " << Modules.size(); + for (ModuleInfo const* module : Modules) + stream << std::endl << "Battlenet::ModuleInfo Locale " << module->Region.c_str() << ", ModuleId " << ByteArrayToHexStr(module->ModuleId, 32) << ", DataSize " << module->DataSize << ", Data " << ByteArrayToHexStr(module->Data, module->DataSize); + + return stream.str(); +} + +Battlenet::Authentication::ProofResponse::~ProofResponse() +{ + for (size_t i = 0; i < Modules.size(); ++i) + delete Modules[i]; +} + +void Battlenet::Authentication::ProofResponse::Read() +{ + Modules.resize(_stream.Read(3)); + for (size_t i = 0; i < Modules.size(); ++i) + { + BitStream*& dataStream = Modules[i]; + dataStream = new BitStream(_stream.Read(10)); + memcpy(dataStream->GetBuffer(), _stream.ReadBytes(dataStream->GetSize()).get(), dataStream->GetSize()); + } +} + +std::string Battlenet::Authentication::ProofResponse::ToString() const +{ + std::ostringstream stream; + stream << "Battlenet::Authentication::ProofResponse Modules " << Modules.size(); + for (BitStream* module : Modules) + { + std::string hexStr = ByteArrayToHexStr(module->GetBuffer(), module->GetSize()); + stream << std::endl << "Battlenet::Authentication::ProofResponse::ModuleData Size: " << module->GetSize() << ", Data: " << hexStr; + } + + return stream.str(); +} + +void Battlenet::Authentication::ProofResponse::CallHandler(Session* session) const +{ + session->HandleProofResponse(*this); +} + +Battlenet::Authentication::LogonResponse::~LogonResponse() +{ + for (ModuleInfo* m : Modules) + delete m; +} + +void Battlenet::Authentication::LogonResponse::Write() +{ + _stream.Write(Result.ResultValue != ResponseFailure::UPDATE, 1); + if (Result.ResultValue == ResponseFailure::UPDATE) + { + _stream.Write(Modules.size(), 3); + for (size_t i = 0; i < Modules.size(); ++i) + { + ModuleInfo* info = Modules[i]; + _stream.WriteBytes(info->Type.c_str(), 4); + _stream.WriteFourCC(info->Region); + _stream.WriteBytes(info->ModuleId, 32); + _stream.Write(info->DataSize, 10); + _stream.WriteBytes(info->Data, info->DataSize); + } + + _stream.Write(PingTimeout + std::numeric_limits::min(), 32); + _stream.Write(1, 1); // RegulatorRules != NULL (not a pointer for us, always write) + // if written == 1 + { + _stream.Write(RegulatorRules.Type == Regulator::LEAKY_BUCKET, 1); + if (RegulatorRules.Type == Regulator::LEAKY_BUCKET) + { + _stream.Write(RegulatorRules.Threshold, 32); + _stream.Write(RegulatorRules.Rate, 32); + } + } + + _stream.WriteString(FirstName, 8); // First name + _stream.WriteString(LastName, 8); // Last name - not set for WoW + + _stream.Write(AccountId, 32); + _stream.Write(Region, 8); + _stream.Write(Flags, 64); + + _stream.Write(GameAccountRegion, 8); + _stream.WriteString(GameAccountName, 5, -1); + _stream.Write(GameAccountFlags, 64); + + _stream.Write(FailedLogins, 32); + } + else + { + _stream.Write(!Modules.empty(), 1); + if (!Modules.empty()) + { + ModuleInfo* info = Modules[0]; + _stream.WriteBytes(info->Type.c_str(), 4); + _stream.WriteFourCC(info->Region); + _stream.WriteBytes(info->ModuleId, 32); + } + + _stream.Write(Result.ResultValue, 2); + if (Result.ResultValue == ResponseFailure::FAILURE) + { + _stream.Write(Result.Error, 16); + _stream.Write(Result.Wait + std::numeric_limits::min(), 32); + } + } +} + +std::string Battlenet::Authentication::LogonResponse::ToString() const +{ + std::ostringstream stream; + stream << "Battlenet::Authentication::LogonResponse AuthResult " << Result.Error << " PingTimeout " << PingTimeout + << " RegulatorRules.Threshold " << RegulatorRules.Threshold << " RegulatorRules.Rate " << RegulatorRules.Rate + << " FirstName " << FirstName << " LastName " << LastName << " AccountId " << AccountId << " Region " << uint32(Region) << " GameAccountName " << GameAccountName + << " GameAccountFlags " << GameAccountFlags << " FailedLogins " << FailedLogins << " Modules " << Modules.size(); + + for (ModuleInfo const* module : Modules) + stream << std::endl << "Battlenet::ModuleInfo Locale " << module->Region.c_str() << ", ModuleId " << ByteArrayToHexStr(module->ModuleId, 32) << ", DataSize " << module->DataSize << ", Data " << ByteArrayToHexStr(module->Data, module->DataSize); + + return stream.str(); +} + +void Battlenet::Authentication::LogonResponse::SetAuthResult(AuthResult result) +{ + Result.ResultValue = result != AUTH_OK ? ResponseFailure::FAILURE : ResponseFailure::UPDATE; + Result.Error = result; +} + +Battlenet::Authentication::ResumeResponse::~ResumeResponse() +{ + for (ModuleInfo* m : Modules) + delete m; +} + +void Battlenet::Authentication::ResumeResponse::Write() +{ + _stream.Write(Result.ResultValue != ResponseFailure::UPDATE, 1); + if (Result.ResultValue == ResponseFailure::UPDATE) + { + _stream.Write(Modules.size(), 3); + for (size_t i = 0; i < Modules.size(); ++i) + { + ModuleInfo* info = Modules[i]; + _stream.WriteBytes(info->Type.c_str(), 4); + _stream.WriteFourCC(info->Region); + _stream.WriteBytes(info->ModuleId, 32); + _stream.Write(info->DataSize, 10); + _stream.WriteBytes(info->Data, info->DataSize); + } + + _stream.Write(PingTimeout + std::numeric_limits::min(), 32); + _stream.Write(1, 1); // RegulatorRules != NULL (not a pointer for us, always write) + // if written == 1 + { + _stream.Write(RegulatorRules.Type == Regulator::LEAKY_BUCKET, 1); + if (RegulatorRules.Type == Regulator::LEAKY_BUCKET) + { + _stream.Write(RegulatorRules.Threshold, 32); + _stream.Write(RegulatorRules.Rate, 32); + } + } + } + else + { + _stream.Write(!Modules.empty(), 1); + if (!Modules.empty()) + { + ModuleInfo* info = Modules[0]; + _stream.WriteBytes(info->Type.c_str(), 4); + _stream.WriteFourCC(info->Region); + _stream.WriteBytes(info->ModuleId, 32); + } + + _stream.Write(Result.ResultValue, 2); + if (Result.ResultValue == ResponseFailure::FAILURE) + { + _stream.Write(Result.Error, 16); + _stream.Write(Result.Wait + std::numeric_limits::min(), 32); + } + } +} + +std::string Battlenet::Authentication::ResumeResponse::ToString() const +{ + std::ostringstream stream; + stream << "Battlenet::Authentication::ResumeResponse AuthResult " << Result.Error << " PingTimeout " << PingTimeout + << " RegulatorRules.Threshold " << RegulatorRules.Threshold << " RegulatorRules.Rate " << RegulatorRules.Rate + << " Modules " << Modules.size(); + + for (ModuleInfo const* module : Modules) + stream << std::endl << "Battlenet::ModuleInfo Locale " << module->Region.c_str() << ", ModuleId " << ByteArrayToHexStr(module->ModuleId, 32) << ", DataSize " << module->DataSize << ", Data " << ByteArrayToHexStr(module->Data, module->DataSize); + + return stream.str(); +} + +void Battlenet::Authentication::ResumeResponse::SetAuthResult(AuthResult result) +{ + Result.ResultValue = result != AUTH_OK ? ResponseFailure::FAILURE : ResponseFailure::UPDATE; + Result.Error = result; +} diff --git a/src/server/authserver/Server/BattlenetPackets/AuthenticationPackets.h b/src/server/bnetserver/Packets/AuthenticationPackets.h similarity index 99% rename from src/server/authserver/Server/BattlenetPackets/AuthenticationPackets.h rename to src/server/bnetserver/Packets/AuthenticationPackets.h index 90dd4a35b1c..8003e13db24 100644 --- a/src/server/authserver/Server/BattlenetPackets/AuthenticationPackets.h +++ b/src/server/bnetserver/Packets/AuthenticationPackets.h @@ -18,7 +18,7 @@ #ifndef AuthenticationPackets_h__ #define AuthenticationPackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetBitStream.cpp b/src/server/bnetserver/Packets/BitStream.cpp similarity index 96% rename from src/server/authserver/Server/BattlenetBitStream.cpp rename to src/server/bnetserver/Packets/BitStream.cpp index 712c9e58f08..5f002f6b1d9 100644 --- a/src/server/authserver/Server/BattlenetBitStream.cpp +++ b/src/server/bnetserver/Packets/BitStream.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "BattlenetBitStream.h" +#include "BitStream.h" template<> bool Battlenet::BitStream::Read(uint32 /*bitCount*/) diff --git a/src/server/authserver/Server/BattlenetBitStream.h b/src/server/bnetserver/Packets/BitStream.h similarity index 98% rename from src/server/authserver/Server/BattlenetBitStream.h rename to src/server/bnetserver/Packets/BitStream.h index 3601c3b0b0c..952ec5a39e2 100644 --- a/src/server/authserver/Server/BattlenetBitStream.h +++ b/src/server/bnetserver/Packets/BitStream.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef __BATTLENETBITSTREAM_H__ -#define __BATTLENETBITSTREAM_H__ +#ifndef BitStream_h__ +#define BitStream_h__ #include "Common.h" #include "ByteConverter.h" @@ -240,4 +240,4 @@ namespace Battlenet void BitStream::Write(bool value, uint32 bitCount); } -#endif // __BATTLENETBITSTREAM_H__ +#endif // BitStream_h__ diff --git a/src/server/authserver/Server/BattlenetPackets/CachePackets.h b/src/server/bnetserver/Packets/CachePackets.h similarity index 97% rename from src/server/authserver/Server/BattlenetPackets/CachePackets.h rename to src/server/bnetserver/Packets/CachePackets.h index 6354201dc4c..2e473df4e72 100644 --- a/src/server/authserver/Server/BattlenetPackets/CachePackets.h +++ b/src/server/bnetserver/Packets/CachePackets.h @@ -18,7 +18,7 @@ #ifndef CachePackets_h__ #define CachePackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetPackets/ChatPackets.h b/src/server/bnetserver/Packets/ChatPackets.h similarity index 98% rename from src/server/authserver/Server/BattlenetPackets/ChatPackets.h rename to src/server/bnetserver/Packets/ChatPackets.h index ee11a1b732e..fc4b638754c 100644 --- a/src/server/authserver/Server/BattlenetPackets/ChatPackets.h +++ b/src/server/bnetserver/Packets/ChatPackets.h @@ -18,7 +18,7 @@ #ifndef ChatPackets_h__ #define ChatPackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetPackets/ConnectionPackets.cpp b/src/server/bnetserver/Packets/ConnectionPackets.cpp similarity index 98% rename from src/server/authserver/Server/BattlenetPackets/ConnectionPackets.cpp rename to src/server/bnetserver/Packets/ConnectionPackets.cpp index f0c3f3ea5e6..0449ecbb756 100644 --- a/src/server/authserver/Server/BattlenetPackets/ConnectionPackets.cpp +++ b/src/server/bnetserver/Packets/ConnectionPackets.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "BattlenetSession.h" +#include "Session.h" #include "ConnectionPackets.h" std::string Battlenet::Connection::Ping::ToString() const diff --git a/src/server/authserver/Server/BattlenetPackets/ConnectionPackets.h b/src/server/bnetserver/Packets/ConnectionPackets.h similarity index 98% rename from src/server/authserver/Server/BattlenetPackets/ConnectionPackets.h rename to src/server/bnetserver/Packets/ConnectionPackets.h index cc25f73f810..f3fa4852d07 100644 --- a/src/server/authserver/Server/BattlenetPackets/ConnectionPackets.h +++ b/src/server/bnetserver/Packets/ConnectionPackets.h @@ -18,7 +18,7 @@ #ifndef ConnectionPackets_h__ #define ConnectionPackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetPackets/FriendsPackets.cpp b/src/server/bnetserver/Packets/FriendsPackets.cpp similarity index 97% rename from src/server/authserver/Server/BattlenetPackets/FriendsPackets.cpp rename to src/server/bnetserver/Packets/FriendsPackets.cpp index 336755acd4c..784d6980777 100644 --- a/src/server/authserver/Server/BattlenetPackets/FriendsPackets.cpp +++ b/src/server/bnetserver/Packets/FriendsPackets.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "BattlenetSession.h" +#include "Session.h" #include "FriendsPackets.h" void Battlenet::Friends::SocialnetworkCheckConnected::Read() @@ -50,7 +50,7 @@ std::string Battlenet::Friends::SocialnetworkConnect::ToString() const void Battlenet::Friends::SocialnetworkConnect::CallHandler(Session* session) const { - + session->LogUnhandledPacket(*this); } std::string Battlenet::Friends::SocialNetworkConnectResult::ToString() const @@ -60,7 +60,6 @@ std::string Battlenet::Friends::SocialNetworkConnectResult::ToString() const void Battlenet::Friends::SocialNetworkConnectResult::Write() { - } std::string Battlenet::Friends::SocialNetworkCheckConnectedResult::ToString() const @@ -89,7 +88,7 @@ std::string Battlenet::Friends::GetFriendsOfFriend::ToString() const void Battlenet::Friends::GetFriendsOfFriend::CallHandler(Session* session) const { - + session->LogUnhandledPacket(*this); } void Battlenet::Friends::RealIdFriendInvite::Read() diff --git a/src/server/authserver/Server/BattlenetPackets/FriendsPackets.h b/src/server/bnetserver/Packets/FriendsPackets.h similarity index 99% rename from src/server/authserver/Server/BattlenetPackets/FriendsPackets.h rename to src/server/bnetserver/Packets/FriendsPackets.h index e58fbdff180..a0ef6f4a63f 100644 --- a/src/server/authserver/Server/BattlenetPackets/FriendsPackets.h +++ b/src/server/bnetserver/Packets/FriendsPackets.h @@ -18,7 +18,7 @@ #ifndef FriendsPackets_h__ #define FriendsPackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetPacketFactory.h b/src/server/bnetserver/Packets/PacketFactory.h similarity index 80% rename from src/server/authserver/Server/BattlenetPacketFactory.h rename to src/server/bnetserver/Packets/PacketFactory.h index a0cbd8f5913..4ae6338cfd7 100644 --- a/src/server/authserver/Server/BattlenetPacketFactory.h +++ b/src/server/bnetserver/Packets/PacketFactory.h @@ -15,10 +15,10 @@ * with this program. If not, see . */ -#ifndef BattlenetPacketFactory_h__ -#define BattlenetPacketFactory_h__ +#ifndef PacketFactory_h__ +#define PacketFactory_h__ -#include "BattlenetPackets.h" +#include "Packets.h" #include namespace Battlenet @@ -60,12 +60,12 @@ namespace Battlenet _creators[PacketHeader(WoWRealm::CMSG_JOIN_REQUEST_V2, WOWREALM)] = &New; _creators[PacketHeader(Friends::CMSG_SOCIAL_NETWORK_CHECK_CONNECTED, FRIENDS)] = &New; - // _creators[PacketHeader(Friends::CMSG_SOCIAL_NETWORK_CONNECT, FRIENDS)] = &New; - // _creators[PacketHeader(Friends::CMSG_GET_FRIENDS_OF_FRIEND, FRIENDS)] = &New; + _creators[PacketHeader(Friends::CMSG_SOCIAL_NETWORK_CONNECT, FRIENDS)] = &New; + _creators[PacketHeader(Friends::CMSG_GET_FRIENDS_OF_FRIEND, FRIENDS)] = &New; _creators[PacketHeader(Friends::CMSG_REALID_FRIEND_INVITE, FRIENDS)] = &New; - // _creators[PacketHeader(Presence::CMSG_UPDATE_REQUEST, PRESENCE)] = &New; - // _creators[PacketHeader(Presence::CMSG_STATISTIC_SUBSCRIBE, PRESENCE)] = &New; + _creators[PacketHeader(Presence::CMSG_UPDATE_REQUEST, PRESENCE)] = &New; + _creators[PacketHeader(Presence::CMSG_STATISTIC_SUBSCRIBE, PRESENCE)] = &New; } template @@ -78,6 +78,6 @@ namespace Battlenet }; } -#define sBattlenetPacketFactory Battlenet::PacketFactory::Instance() +#define sPacketFactory Battlenet::PacketFactory::Instance() -#endif // BattlenetPacketFactory_h__ +#endif // PacketFactory_h__ diff --git a/src/server/authserver/Server/BattlenetPackets/BattlenetPackets.h b/src/server/bnetserver/Packets/Packets.h similarity index 91% rename from src/server/authserver/Server/BattlenetPackets/BattlenetPackets.h rename to src/server/bnetserver/Packets/Packets.h index d4cd8600266..f62ba6f65cd 100644 --- a/src/server/authserver/Server/BattlenetPackets/BattlenetPackets.h +++ b/src/server/bnetserver/Packets/Packets.h @@ -15,8 +15,8 @@ * with this program. If not, see . */ -#ifndef BattlenetPackets_h__ -#define BattlenetPackets_h__ +#ifndef Packets_h__ +#define Packets_h__ #include "AuthenticationPackets.h" #include "ConnectionPackets.h" @@ -29,4 +29,4 @@ #include "CachePackets.h" #include "ProfilePackets.h" -#endif // BattlenetPackets_h__ +#endif // Packets_h__ diff --git a/src/server/authserver/Server/BattlenetPackets/BattlenetPacketsBase.cpp b/src/server/bnetserver/Packets/PacketsBase.cpp similarity index 97% rename from src/server/authserver/Server/BattlenetPackets/BattlenetPacketsBase.cpp rename to src/server/bnetserver/Packets/PacketsBase.cpp index 034bb8ba0a4..6471337060c 100644 --- a/src/server/authserver/Server/BattlenetPackets/BattlenetPacketsBase.cpp +++ b/src/server/bnetserver/Packets/PacketsBase.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "BattlenetPackets.h" +#include "Packets.h" #include std::string Battlenet::PacketHeader::ToString() const diff --git a/src/server/authserver/Server/BattlenetPackets/BattlenetPacketsBase.h b/src/server/bnetserver/Packets/PacketsBase.h similarity index 95% rename from src/server/authserver/Server/BattlenetPackets/BattlenetPacketsBase.h rename to src/server/bnetserver/Packets/PacketsBase.h index 2aa07314771..839a10548e9 100644 --- a/src/server/authserver/Server/BattlenetPackets/BattlenetPacketsBase.h +++ b/src/server/bnetserver/Packets/PacketsBase.h @@ -15,12 +15,11 @@ * with this program. If not, see . */ -#ifndef BattlenetPacketsBase_h__ -#define BattlenetPacketsBase_h__ +#ifndef PacketsBase_h__ +#define PacketsBase_h__ #include "AuthCodes.h" -#include "BattlenetBitStream.h" -#include "BattlenetManager.h" +#include "BitStream.h" #include "Define.h" #include "Errors.h" #include @@ -118,4 +117,4 @@ namespace Battlenet }; } -#endif // BattlenetPacketsBase_h__ +#endif // PacketsBase_h__ diff --git a/src/server/authserver/Server/BattlenetPackets/PresencePackets.cpp b/src/server/bnetserver/Packets/PresencePackets.cpp similarity index 92% rename from src/server/authserver/Server/BattlenetPackets/PresencePackets.cpp rename to src/server/bnetserver/Packets/PresencePackets.cpp index 46ce7fa1b36..da49f41af76 100644 --- a/src/server/authserver/Server/BattlenetPackets/PresencePackets.cpp +++ b/src/server/bnetserver/Packets/PresencePackets.cpp @@ -15,10 +15,9 @@ * with this program. If not, see . */ -#include "BattlenetSession.h" +#include "Session.h" #include "PresencePackets.h" - void Battlenet::Presence::UpdateRequest::Read() { @@ -31,12 +30,11 @@ std::string Battlenet::Presence::UpdateRequest::ToString() const void Battlenet::Presence::UpdateRequest::CallHandler(Session* session) const { - + session->LogUnhandledPacket(*this); } void Battlenet::Presence::StatisticSubscribe::Read() { - } std::string Battlenet::Presence::StatisticSubscribe::ToString() const @@ -46,5 +44,5 @@ std::string Battlenet::Presence::StatisticSubscribe::ToString() const void Battlenet::Presence::StatisticSubscribe::CallHandler(Session* session) const { - + session->LogUnhandledPacket(*this); } diff --git a/src/server/authserver/Server/BattlenetPackets/PresencePackets.h b/src/server/bnetserver/Packets/PresencePackets.h similarity index 98% rename from src/server/authserver/Server/BattlenetPackets/PresencePackets.h rename to src/server/bnetserver/Packets/PresencePackets.h index 0a934f2c2ca..c934228a3cb 100644 --- a/src/server/authserver/Server/BattlenetPackets/PresencePackets.h +++ b/src/server/bnetserver/Packets/PresencePackets.h @@ -18,7 +18,7 @@ #ifndef PresencePackets_h__ #define PresencePackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetPackets/ProfilePackets.h b/src/server/bnetserver/Packets/ProfilePackets.h similarity index 98% rename from src/server/authserver/Server/BattlenetPackets/ProfilePackets.h rename to src/server/bnetserver/Packets/ProfilePackets.h index d08fa4883c5..bf413471f62 100644 --- a/src/server/authserver/Server/BattlenetPackets/ProfilePackets.h +++ b/src/server/bnetserver/Packets/ProfilePackets.h @@ -18,7 +18,7 @@ #ifndef ProfilePackets_h__ #define ProfilePackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetPackets/SupportPackets.h b/src/server/bnetserver/Packets/SupportPackets.h similarity index 96% rename from src/server/authserver/Server/BattlenetPackets/SupportPackets.h rename to src/server/bnetserver/Packets/SupportPackets.h index 4821ce7caa0..43f51bd564e 100644 --- a/src/server/authserver/Server/BattlenetPackets/SupportPackets.h +++ b/src/server/bnetserver/Packets/SupportPackets.h @@ -18,7 +18,7 @@ #ifndef SupportPackets_h__ #define SupportPackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" namespace Battlenet { diff --git a/src/server/authserver/Server/BattlenetPackets/WoWRealmPackets.cpp b/src/server/bnetserver/Packets/WoWRealmPackets.cpp similarity index 99% rename from src/server/authserver/Server/BattlenetPackets/WoWRealmPackets.cpp rename to src/server/bnetserver/Packets/WoWRealmPackets.cpp index 1b20a3a7f85..6845fc914b1 100644 --- a/src/server/authserver/Server/BattlenetPackets/WoWRealmPackets.cpp +++ b/src/server/bnetserver/Packets/WoWRealmPackets.cpp @@ -16,7 +16,7 @@ */ #include "WoWRealmPackets.h" -#include "BattlenetSession.h" +#include "Session.h" #include #include diff --git a/src/server/authserver/Server/BattlenetPackets/WoWRealmPackets.h b/src/server/bnetserver/Packets/WoWRealmPackets.h similarity index 99% rename from src/server/authserver/Server/BattlenetPackets/WoWRealmPackets.h rename to src/server/bnetserver/Packets/WoWRealmPackets.h index 1e4228cb26a..4ce5ea68835 100644 --- a/src/server/authserver/Server/BattlenetPackets/WoWRealmPackets.h +++ b/src/server/bnetserver/Packets/WoWRealmPackets.h @@ -18,7 +18,8 @@ #ifndef WoWRealmPackets_h__ #define WoWRealmPackets_h__ -#include "BattlenetPacketsBase.h" +#include "PacketsBase.h" +#include "RealmList.h" namespace Battlenet { diff --git a/src/server/bnetserver/PrecompiledHeaders/bnetPCH.cpp b/src/server/bnetserver/PrecompiledHeaders/bnetPCH.cpp new file mode 100644 index 00000000000..60b1d41a1a8 --- /dev/null +++ b/src/server/bnetserver/PrecompiledHeaders/bnetPCH.cpp @@ -0,0 +1 @@ +#include "bnetPCH.h" diff --git a/src/server/bnetserver/PrecompiledHeaders/bnetPCH.h b/src/server/bnetserver/PrecompiledHeaders/bnetPCH.h new file mode 100644 index 00000000000..82cd5393489 --- /dev/null +++ b/src/server/bnetserver/PrecompiledHeaders/bnetPCH.h @@ -0,0 +1,10 @@ +#include "Common.h" +#include "Configuration/Config.h" +#include "Database/DatabaseEnv.h" +#include "Log.h" +#include "ComponentManager.h" +#include "ModuleManager.h" +#include "RealmList.h" +#include "ByteBuffer.h" +#include "Packets.h" +#include "Session.h" diff --git a/src/server/bnetserver/Realms/RealmList.cpp b/src/server/bnetserver/Realms/RealmList.cpp new file mode 100644 index 00000000000..60d40f98edf --- /dev/null +++ b/src/server/bnetserver/Realms/RealmList.cpp @@ -0,0 +1,207 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * Copyright (C) 2005-2009 MaNGOS + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include +#include "Common.h" +#include "RealmList.h" +#include "Database/DatabaseEnv.h" +#include "Util.h" + +ip::tcp::endpoint Realm::GetAddressForClient(ip::address const& clientAddr) const +{ + ip::address realmIp; + + // Attempt to send best address for client + if (clientAddr.is_loopback()) + { + // Try guessing if realm is also connected locally + if (LocalAddress.is_loopback() || ExternalAddress.is_loopback()) + realmIp = clientAddr; + else + { + // Assume that user connecting from the machine that authserver is located on + // has all realms available in his local network + realmIp = LocalAddress; + } + } + else + { + if (clientAddr.is_v4() && + (clientAddr.to_v4().to_ulong() & LocalSubnetMask.to_v4().to_ulong()) == + (LocalAddress.to_v4().to_ulong() & LocalSubnetMask.to_v4().to_ulong())) + { + realmIp = LocalAddress; + } + else + realmIp = ExternalAddress; + } + + ip::tcp::endpoint endpoint(realmIp, port); + + // Return external IP + return endpoint; +} + +RealmList::RealmList() : m_UpdateInterval(0), m_NextUpdateTime(time(NULL)), _resolver(nullptr) +{ +} + +RealmList::~RealmList() +{ + delete _resolver; +} + +// Load the realm list from the database +void RealmList::Initialize(boost::asio::io_service& ioService, uint32 updateInterval) +{ + _resolver = new boost::asio::ip::tcp::resolver(ioService); + m_UpdateInterval = updateInterval; + + // Get the content of the realmlist table in the database + UpdateRealms(true); +} + +void RealmList::UpdateRealm(uint32 id, const std::string& name, ip::address const& address, ip::address const& localAddr, + ip::address const& localSubmask, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population, uint32 build, uint8 region, uint8 battlegroup) +{ + // Create new if not exist or update existed + Realm& realm = m_realms[name]; + + realm.m_ID = id; + realm.name = name; + realm.icon = icon; + realm.flag = flag; + realm.timezone = timezone; + realm.allowedSecurityLevel = allowedSecurityLevel; + realm.populationLevel = population; + + // Append port to IP address. + + realm.ExternalAddress = address; + realm.LocalAddress = localAddr; + realm.LocalSubnetMask = localSubmask; + realm.port = port; + realm.gamebuild = build; + realm.Region = region; + realm.Battlegroup = battlegroup; +} + +void RealmList::UpdateIfNeed() +{ + // maybe disabled or updated recently + if (!m_UpdateInterval || m_NextUpdateTime > time(NULL)) + return; + + m_NextUpdateTime = time(NULL) + m_UpdateInterval; + + // Clears Realm list + m_realms.clear(); + + // Get the content of the realmlist table in the database + UpdateRealms(); +} + +void RealmList::UpdateRealms(bool init) +{ + TC_LOG_INFO("server.authserver", "Updating Realm List..."); + + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST); + PreparedQueryResult result = LoginDatabase.Query(stmt); + + // Circle through results and add them to the realm map + if (result) + { + do + { + try + { + boost::asio::ip::tcp::resolver::iterator end; + + Field* fields = result->Fetch(); + uint32 realmId = fields[0].GetUInt32(); + std::string name = fields[1].GetString(); + boost::asio::ip::tcp::resolver::query externalAddressQuery(ip::tcp::v4(), fields[2].GetString(), ""); + + boost::system::error_code ec; + boost::asio::ip::tcp::resolver::iterator endPoint = _resolver->resolve(externalAddressQuery, ec); + if (endPoint == end || ec) + { + TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[2].GetString().c_str()); + return; + } + + ip::address externalAddress = (*endPoint).endpoint().address(); + + boost::asio::ip::tcp::resolver::query localAddressQuery(ip::tcp::v4(), fields[3].GetString(), ""); + endPoint = _resolver->resolve(localAddressQuery, ec); + if (endPoint == end || ec) + { + TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[3].GetString().c_str()); + return; + } + + ip::address localAddress = (*endPoint).endpoint().address(); + + boost::asio::ip::tcp::resolver::query localSubmaskQuery(ip::tcp::v4(), fields[4].GetString(), ""); + endPoint = _resolver->resolve(localSubmaskQuery, ec); + if (endPoint == end || ec) + { + TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[4].GetString().c_str()); + return; + } + + ip::address localSubmask = (*endPoint).endpoint().address(); + + uint16 port = fields[5].GetUInt16(); + uint8 icon = fields[6].GetUInt8(); + RealmFlags flag = RealmFlags(fields[7].GetUInt8()); + uint8 timezone = fields[8].GetUInt8(); + uint8 allowedSecurityLevel = fields[9].GetUInt8(); + float pop = fields[10].GetFloat(); + uint32 build = fields[11].GetUInt32(); + uint8 region = fields[12].GetUInt8(); + uint8 battlegroup = fields[13].GetUInt8(); + + UpdateRealm(realmId, name, externalAddress, localAddress, localSubmask, port, icon, flag, timezone, + (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build, region, battlegroup); + + if (init) + TC_LOG_INFO("server.authserver", "Added realm \"%s\" at %s:%u.", name.c_str(), m_realms[name].ExternalAddress.to_string().c_str(), port); + } + catch (std::exception& ex) + { + TC_LOG_ERROR("server.authserver", "Realmlist::UpdateRealms has thrown an exception: %s", ex.what()); + ASSERT(false); + } + } + while (result->NextRow()); + } +} + +Realm const* RealmList::GetRealm(Battlenet::RealmId const& id) const +{ + auto itr = std::find_if(m_realms.begin(), m_realms.end(), [id](RealmMap::value_type const& pair) + { + return pair.second.Region == id.Region && pair.second.Battlegroup == id.Battlegroup && pair.second.m_ID == id.Index; + }); + + if (itr != m_realms.end()) + return &itr->second; + + return NULL; +} diff --git a/src/server/bnetserver/Realms/RealmList.h b/src/server/bnetserver/Realms/RealmList.h new file mode 100644 index 00000000000..502fef80ee7 --- /dev/null +++ b/src/server/bnetserver/Realms/RealmList.h @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * Copyright (C) 2005-2009 MaNGOS + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef _REALMLIST_H +#define _REALMLIST_H + +#include +#include +#include +#include "Common.h" + +using namespace boost::asio; + +enum RealmFlags +{ + REALM_FLAG_NONE = 0x00, + REALM_FLAG_INVALID = 0x01, + REALM_FLAG_OFFLINE = 0x02, + REALM_FLAG_SPECIFYBUILD = 0x04, + REALM_FLAG_UNK1 = 0x08, + REALM_FLAG_UNK2 = 0x10, + REALM_FLAG_RECOMMENDED = 0x20, + REALM_FLAG_NEW = 0x40, + REALM_FLAG_FULL = 0x80 +}; + +// Storage object for a realm +struct Realm +{ + ip::address ExternalAddress; + ip::address LocalAddress; + ip::address LocalSubnetMask; + uint16 port; + std::string name; + uint8 icon; + RealmFlags flag; + uint8 timezone; + uint32 m_ID; + AccountTypes allowedSecurityLevel; + float populationLevel; + uint32 gamebuild; + uint8 Region; + uint8 Battlegroup; + + ip::tcp::endpoint GetAddressForClient(ip::address const& clientAddr) const; +}; + +namespace Battlenet +{ + struct RealmId + { + uint8 Region; + uint8 Battlegroup; + uint32 Index; + uint32 Build; + }; +} + +/// Storage object for the list of realms on the server +class RealmList +{ +public: + typedef std::map RealmMap; + + static RealmList* instance() + { + static RealmList instance; + return &instance; + } + + ~RealmList(); + + void Initialize(boost::asio::io_service& ioService, uint32 updateInterval); + + void UpdateIfNeed(); + + void AddRealm(const Realm& NewRealm) { m_realms[NewRealm.name] = NewRealm; } + + RealmMap::const_iterator begin() const { return m_realms.begin(); } + RealmMap::const_iterator end() const { return m_realms.end(); } + uint32 size() const { return m_realms.size(); } + Realm const* GetRealm(Battlenet::RealmId const& id) const; + +private: + RealmList(); + + void UpdateRealms(bool init = false); + void UpdateRealm(uint32 id, const std::string& name, ip::address const& address, ip::address const& localAddr, + ip::address const& localSubmask, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population, uint32 build, uint8 region, uint8 battlegroup); + + RealmMap m_realms; + uint32 m_UpdateInterval; + time_t m_NextUpdateTime; + boost::asio::ip::tcp::resolver* _resolver; +}; + +#define sRealmList RealmList::instance() +#endif diff --git a/src/server/bnetserver/Server/ComponentManager.cpp b/src/server/bnetserver/Server/ComponentManager.cpp new file mode 100644 index 00000000000..be1f22022f4 --- /dev/null +++ b/src/server/bnetserver/Server/ComponentManager.cpp @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "ComponentManager.h" +#include "DatabaseEnv.h" + +Battlenet::ComponentMgr::~ComponentMgr() +{ + for (Component* component : _components) + delete component; +} + +void Battlenet::ComponentMgr::Load() +{ + QueryResult result = LoginDatabase.Query("SELECT Program, Platform, Build FROM battlenet_components"); + if (result) + { + do + { + Field* fields = result->Fetch(); + Component* component = new Component(); + component->Program = fields[0].GetString(); + component->Platform = fields[1].GetString(); + component->Build = fields[2].GetUInt32(); + + _components.insert(component); + _programs.insert(component->Program); + _platforms.insert(component->Platform); + + } while (result->NextRow()); + } +} + +bool Battlenet::ComponentMgr::HasComponent(Battlenet::Component const* component) const +{ + for (Component const* c : _components) + if (component->Program == c->Program && component->Platform == c->Platform && component->Build == c->Build) + return true; + + return false; +} diff --git a/src/server/bnetserver/Server/ComponentManager.h b/src/server/bnetserver/Server/ComponentManager.h new file mode 100644 index 00000000000..865cfca7f62 --- /dev/null +++ b/src/server/bnetserver/Server/ComponentManager.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef ComponentManager_h__ +#define ComponentManager_h__ + +#include "Define.h" +#include +#include +#include + +namespace Battlenet +{ + struct Component + { + std::string Program; + std::string Platform; + uint32 Build; + }; + + class ComponentMgr + { + ComponentMgr() { } + ~ComponentMgr(); + + public: + void Load(); + bool HasComponent(Component const* component) const; + bool HasProgram(std::string const& program) const { return _programs.count(program) != 0; } + bool HasPlatform(std::string const& platform) const { return _platforms.count(platform) != 0; } + + static ComponentMgr* instance() + { + static ComponentMgr instance; + return &instance; + } + + private: + std::set _components; + std::set _programs; + std::set _platforms; + }; +} + +#define sComponentMgr Battlenet::ComponentMgr::instance() + +#endif // ComponentManager_h__ diff --git a/src/server/authserver/Server/BattlenetManager.cpp b/src/server/bnetserver/Server/ModuleManager.cpp similarity index 51% rename from src/server/authserver/Server/BattlenetManager.cpp rename to src/server/bnetserver/Server/ModuleManager.cpp index f470c365b56..8dc43136739 100644 --- a/src/server/authserver/Server/BattlenetManager.cpp +++ b/src/server/bnetserver/Server/ModuleManager.cpp @@ -15,46 +15,16 @@ * with this program. If not, see . */ -#include "BattlenetManager.h" +#include "ModuleManager.h" #include "DatabaseEnv.h" -BattlenetMgr::~BattlenetMgr() +Battlenet::ModuleManager::~ModuleManager() { - for (Battlenet::Component* component : _components) - delete component; - for (auto const& m : _modules) delete m.second; } -void BattlenetMgr::Load() -{ - LoadComponents(); - LoadModules(); -} - -void BattlenetMgr::LoadComponents() -{ - QueryResult result = LoginDatabase.Query("SELECT Program, Platform, Build FROM battlenet_components"); - if (result) - { - do - { - Field* fields = result->Fetch(); - Battlenet::Component* component = new Battlenet::Component(); - component->Program = fields[0].GetString(); - component->Platform = fields[1].GetString(); - component->Build = fields[2].GetUInt32(); - - _components.insert(component); - _programs.insert(component->Program); - _platforms.insert(component->Platform); - - } while (result->NextRow()); - } -} - -void BattlenetMgr::LoadModules() +void Battlenet::ModuleManager::Load() { QueryResult result = LoginDatabase.Query("SELECT `Hash`, `Name`, `Type`, `System`, `Data` FROM battlenet_modules"); if (result) @@ -62,7 +32,7 @@ void BattlenetMgr::LoadModules() do { Field* fields = result->Fetch(); - Battlenet::ModuleInfo* module = new Battlenet::ModuleInfo(); + ModuleInfo* module = new ModuleInfo(); module->Type = fields[2].GetString(); HexStrToByteArray(fields[0].GetString(), module->ModuleId); std::string data = fields[4].GetString(); @@ -78,19 +48,10 @@ void BattlenetMgr::LoadModules() } } -bool BattlenetMgr::HasComponent(Battlenet::Component const* component) const +Battlenet::ModuleInfo* Battlenet::ModuleManager::CreateModule(std::string const& os, std::string const& name) const { - for (Battlenet::Component const* c : _components) - if (component->Program == c->Program && component->Platform == c->Platform && component->Build == c->Build) - return true; - - return false; -} - -Battlenet::ModuleInfo* BattlenetMgr::CreateModule(std::string const& os, std::string const& name) const -{ - Battlenet::ModuleKey key { os, name }; + ModuleKey key { os, name }; ASSERT(_modules.count(key)); - return new Battlenet::ModuleInfo(*_modules.at(key)); + return new ModuleInfo(*_modules.at(key)); } diff --git a/src/server/authserver/Server/BattlenetManager.h b/src/server/bnetserver/Server/ModuleManager.h similarity index 60% rename from src/server/authserver/Server/BattlenetManager.h rename to src/server/bnetserver/Server/ModuleManager.h index bd01619ef06..36ffb2fec3f 100644 --- a/src/server/authserver/Server/BattlenetManager.h +++ b/src/server/bnetserver/Server/ModuleManager.h @@ -15,24 +15,16 @@ * with this program. If not, see . */ -#ifndef __BATTLENETMANAGER_H__ -#define __BATTLENETMANAGER_H__ +#ifndef ModuleManager_h__ +#define ModuleManager_h__ #include "Define.h" #include #include -#include #include namespace Battlenet { - struct Component - { - std::string Program; - std::string Platform; - uint32 Build; - }; - struct ModuleKey { std::string Platform; @@ -74,43 +66,29 @@ namespace Battlenet uint8* Data; }; - struct RealmId + class ModuleManager { - uint8 Region; - uint8 Battlegroup; - uint32 Index; - uint32 Build; + ModuleManager() { } + ~ModuleManager(); + + public: + void Load(); + ModuleInfo* CreateModule(std::string const& os, std::string const& name) const; + + static ModuleManager* instance() + { + static ModuleManager instance; + return &instance; + } + + private: + void LoadComponents(); + void LoadModules(); + + std::map _modules; }; } -class BattlenetMgr -{ - BattlenetMgr() { } - ~BattlenetMgr(); +#define sModuleMgr Battlenet::ModuleManager::instance() -public: - void Load(); - bool HasComponent(Battlenet::Component const* component) const; - bool HasProgram(std::string const& program) const { return _programs.count(program) != 0; } - bool HasPlatform(std::string const& platform) const { return _platforms.count(platform) != 0; } - Battlenet::ModuleInfo* CreateModule(std::string const& os, std::string const& name) const; - - static BattlenetMgr* instance() - { - static BattlenetMgr instance; - return &instance; - } - -private: - void LoadComponents(); - void LoadModules(); - - std::set _components; - std::set _programs; - std::set _platforms; - std::map _modules; -}; - -#define sBattlenetMgr BattlenetMgr::instance() - -#endif // __BATTLENETMANAGER_H__ +#endif // ModuleManager_h__ diff --git a/src/server/authserver/Server/BattlenetSession.cpp b/src/server/bnetserver/Server/Session.cpp similarity index 92% rename from src/server/authserver/Server/BattlenetSession.cpp rename to src/server/bnetserver/Server/Session.cpp index 865e51c1a07..8935d520c40 100644 --- a/src/server/authserver/Server/BattlenetSession.cpp +++ b/src/server/bnetserver/Server/Session.cpp @@ -16,9 +16,9 @@ */ #include "AuthCodes.h" -#include "BattlenetBitStream.h" -#include "BattlenetPacketFactory.h" -#include "BattlenetSessionManager.h" +#include "BitStream.h" +#include "PacketFactory.h" +#include "SessionManager.h" #include "Database/DatabaseEnv.h" #include "HmacHash.h" #include "Log.h" @@ -63,7 +63,7 @@ Battlenet::Session::Session(tcp::socket&& socket) : Socket(std::move(socket)), _ Battlenet::Session::~Session() { - sBattlenetSessionMgr.RemoveSession(this); + sSessionMgr.RemoveSession(this); TC_LOG_TRACE("server.battlenet", "Battlenet::Session::OnClose"); } @@ -107,7 +107,7 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& Authentication::LogonResponse* complete = new Authentication::LogonResponse(); complete->SetAuthResult(LOGIN_BANNED); AsyncWrite(complete); - TC_LOG_DEBUG("server.battlenet", "[Battlenet::AuthChallenge] Banned ip '%s:%d' tries to login!", ip_address.c_str(), GetRemotePort()); + TC_LOG_DEBUG("server.battlenet", "[Battlenet::LogonRequest] Banned ip '%s:%d' tries to login!", ip_address.c_str(), GetRemotePort()); return; } @@ -119,7 +119,7 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& return; } - if (!sBattlenetMgr->HasPlatform(info.Platform)) + if (!sComponentMgr->HasPlatform(info.Platform)) { Authentication::LogonResponse* complete = new Authentication::LogonResponse(); complete->SetAuthResult(AUTH_INVALID_OS); @@ -127,7 +127,7 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& return; } - if (!sBattlenetMgr->HasPlatform(info.Locale)) + if (!sComponentMgr->HasPlatform(info.Locale)) { Authentication::LogonResponse* complete = new Authentication::LogonResponse(); complete->SetAuthResult(AUTH_UNSUPPORTED_LANGUAGE); @@ -137,12 +137,12 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& for (Component const& component : info.Components) { - if (!sBattlenetMgr->HasComponent(&component)) + if (!sComponentMgr->HasComponent(&component)) { Authentication::LogonResponse* complete = new Authentication::LogonResponse(); - if (!sBattlenetMgr->HasProgram(component.Program)) + if (!sComponentMgr->HasProgram(component.Program)) complete->SetAuthResult(AUTH_INVALID_PROGRAM); - else if (!sBattlenetMgr->HasPlatform(component.Platform)) + else if (!sComponentMgr->HasPlatform(component.Platform)) complete->SetAuthResult(AUTH_INVALID_OS); else { @@ -184,7 +184,7 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& // If the IP is 'locked', check that the player comes indeed from the correct IP address if (fields[2].GetUInt8() == 1) // if ip is locked { - TC_LOG_DEBUG("server.battlenet", "[Battlenet::AuthChallenge] Account '%s' is locked to IP - '%s' is logging in from '%s'", _accountName.c_str(), fields[4].GetCString(), ip_address.c_str()); + TC_LOG_DEBUG("server.battlenet", "[Battlenet::LogonRequest] Account '%s' is locked to IP - '%s' is logging in from '%s'", _accountName.c_str(), fields[4].GetCString(), ip_address.c_str()); if (strcmp(fields[4].GetCString(), ip_address.c_str()) != 0) { @@ -196,10 +196,10 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& } else { - TC_LOG_DEBUG("server.battlenet", "[Battlenet::AuthChallenge] Account '%s' is not locked to ip", _accountName.c_str()); + TC_LOG_DEBUG("server.battlenet", "[Battlenet::LogonRequest] Account '%s' is not locked to ip", _accountName.c_str()); std::string accountCountry = fields[3].GetString(); if (accountCountry.empty() || accountCountry == "00") - TC_LOG_DEBUG("server.battlenet", "[Battlenet::AuthChallenge] Account '%s' is not locked to country", _accountName.c_str()); + TC_LOG_DEBUG("server.battlenet", "[Battlenet::LogonRequest] Account '%s' is not locked to country", _accountName.c_str()); else if (!accountCountry.empty()) { uint32 ip = inet_addr(ip_address.c_str()); @@ -237,7 +237,7 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& Authentication::LogonResponse* complete = new Authentication::LogonResponse(); complete->SetAuthResult(LOGIN_BANNED); AsyncWrite(complete); - TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::AuthChallenge] Banned account %s tried to login!", ip_address.c_str(), GetRemotePort(), _accountName.c_str()); + TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::LogonRequest] Banned account %s tried to login!", ip_address.c_str(), GetRemotePort(), _accountName.c_str()); return; } else @@ -245,7 +245,7 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& Authentication::LogonResponse* complete = new Authentication::LogonResponse(); complete->SetAuthResult(LOGIN_SUSPENDED); AsyncWrite(complete); - TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::AuthChallenge] Temporarily banned account %s tried to login!", ip_address.c_str(), GetRemotePort(), _accountName.c_str()); + TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::LogonRequest] Temporarily banned account %s tried to login!", ip_address.c_str(), GetRemotePort(), _accountName.c_str()); return; } } @@ -256,8 +256,8 @@ void Battlenet::Session::HandleLogonRequest(Authentication::LogonRequest const& I.SetBinary(sha.GetDigest(), sha.GetLength()); - ModuleInfo* password = sBattlenetMgr->CreateModule(_os, "Password"); - ModuleInfo* thumbprint = sBattlenetMgr->CreateModule(_os, "Thumbprint"); + ModuleInfo* password = sModuleMgr->CreateModule(_os, "Password"); + ModuleInfo* thumbprint = sModuleMgr->CreateModule(_os, "Thumbprint"); std::string pStr = fields[0].GetString(); @@ -327,8 +327,8 @@ void Battlenet::Session::HandleResumeRequest(Authentication::ResumeRequest const _gameAccountId = fields[2].GetUInt32(); _gameAccountName = reconnect.GameAccountName; - ModuleInfo* thumbprint = sBattlenetMgr->CreateModule(_os, "Thumbprint"); - ModuleInfo* resume = sBattlenetMgr->CreateModule(_os, "Resume"); + ModuleInfo* thumbprint = sModuleMgr->CreateModule(_os, "Thumbprint"); + ModuleInfo* resume = sModuleMgr->CreateModule(_os, "Resume"); BitStream resumeData; uint8 state = 0; _reconnectProof.SetRand(16 * 8); @@ -419,19 +419,15 @@ void Battlenet::Session::HandleListSubscribeRequest(WoWRealm::ListSubscribeReque { Realm const& realm = i->second; - uint32 flag = realm.flag; + uint32 flag = realm.flag & ~REALM_FLAG_SPECIFYBUILD; RealmBuildInfo const* buildInfo = AuthHelper::GetBuildInfo(realm.gamebuild); if (realm.gamebuild != _build) { - if (!buildInfo) - continue; - - flag |= REALM_FLAG_OFFLINE | REALM_FLAG_SPECIFYBUILD; // tell the client what build the realm is for + flag |= REALM_FLAG_INVALID; + if (buildInfo) + flag |= REALM_FLAG_SPECIFYBUILD; // tell the client what build the realm is for } - if (!buildInfo) - flag &= ~REALM_FLAG_SPECIFYBUILD; - WoWRealm::ListUpdate* update = new WoWRealm::ListUpdate(); update->Timezone = realm.timezone; update->Population = realm.populationLevel; @@ -523,7 +519,7 @@ void Battlenet::Session::ReadHandler() return; } - if (ClientPacket* packet = sBattlenetPacketFactory.Create(header, stream)) + if (ClientPacket* packet = sPacketFactory.Create(header, stream)) { TC_LOG_TRACE("server.battlenet", "Battlenet::Session::ReadDataHandler %s", packet->ToString().c_str()); packet->CallHandler(this); @@ -724,7 +720,7 @@ bool Battlenet::Session::HandlePasswordModule(BitStream* dataStream, ServerPacke serverProof.SetRand(128 * 8); // just send garbage, server signature check is patched out in client BitStream stream; - ModuleInfo* password = sBattlenetMgr->CreateModule(_os, "Password"); + ModuleInfo* password = sModuleMgr->CreateModule(_os, "Password"); uint8 state = 3; stream.WriteBytes(&state, 1); @@ -757,7 +753,7 @@ bool Battlenet::Session::HandlePasswordModule(BitStream* dataStream, ServerPacke accounts.WriteString(name.str(), 8); } while (result->NextRow()); - ModuleInfo* selectGameAccount = sBattlenetMgr->CreateModule(_os, "SelectGameAccount"); + ModuleInfo* selectGameAccount = sModuleMgr->CreateModule(_os, "SelectGameAccount"); selectGameAccount->DataSize = accounts.GetSize(); selectGameAccount->Data = new uint8[selectGameAccount->DataSize]; memcpy(selectGameAccount->Data, accounts.GetBuffer(), selectGameAccount->DataSize); @@ -774,12 +770,12 @@ bool Battlenet::Session::HandlePasswordModule(BitStream* dataStream, ServerPacke if (fields[2].GetUInt32() == fields[3].GetUInt32()) { complete->SetAuthResult(LOGIN_BANNED); - TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::AuthChallenge] Banned account %s tried to login!", GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _accountName.c_str()); + TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::Password] Banned account %s tried to login!", GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _accountName.c_str()); } else { complete->SetAuthResult(LOGIN_SUSPENDED); - TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::AuthChallenge] Temporarily banned account %s tried to login!", GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _accountName.c_str()); + TC_LOG_DEBUG("server.battlenet", "'%s:%d' [Battlenet::Password] Temporarily banned account %s tried to login!", GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _accountName.c_str()); } ReplaceResponse(response, complete); @@ -789,7 +785,7 @@ bool Battlenet::Session::HandlePasswordModule(BitStream* dataStream, ServerPacke _gameAccountId = fields[0].GetUInt32(); _gameAccountName = fields[1].GetString(); - request->Modules.push_back(sBattlenetMgr->CreateModule(_os, "RiskFingerprint")); + request->Modules.push_back(sModuleMgr->CreateModule(_os, "RiskFingerprint")); _modulesWaitingForData.push(MODULE_RISK_FINGERPRINT); } @@ -862,7 +858,7 @@ bool Battlenet::Session::HandleSelectGameAccountModule(BitStream* dataStream, Se _gameAccountName = fields[1].GetString(); Authentication::ProofRequest* request = new Authentication::ProofRequest(); - request->Modules.push_back(sBattlenetMgr->CreateModule(_os, "RiskFingerprint")); + request->Modules.push_back(sModuleMgr->CreateModule(_os, "RiskFingerprint")); ReplaceResponse(response, request); _modulesWaitingForData.push(MODULE_RISK_FINGERPRINT); @@ -900,7 +896,7 @@ bool Battlenet::Session::HandleRiskFingerprintModule(BitStream* dataStream, Serv LoginDatabase.CommitTransaction(trans); _authed = true; - sBattlenetSessionMgr.AddSession(this); + sSessionMgr.AddSession(this); } else complete->SetAuthResult(AUTH_BAD_VERSION_HASH); @@ -976,7 +972,7 @@ bool Battlenet::Session::HandleResumeModule(BitStream* dataStream, ServerPacket* serverProof.UpdateData(clientChallenge.get(), 16); serverProof.Finalize(); - ModuleInfo* resume = sBattlenetMgr->CreateModule(_os, "Resume"); + ModuleInfo* resume = sModuleMgr->CreateModule(_os, "Resume"); BitStream resumeData; uint8 state = 2; @@ -991,7 +987,7 @@ bool Battlenet::Session::HandleResumeModule(BitStream* dataStream, ServerPacket* result->Modules.push_back(resume); ReplaceResponse(response, result); _authed = true; - sBattlenetSessionMgr.AddSession(this); + sSessionMgr.AddSession(this); return true; } diff --git a/src/server/authserver/Server/BattlenetSession.h b/src/server/bnetserver/Server/Session.h similarity index 97% rename from src/server/authserver/Server/BattlenetSession.h rename to src/server/bnetserver/Server/Session.h index 2798949de1c..41caadbab3f 100644 --- a/src/server/authserver/Server/BattlenetSession.h +++ b/src/server/bnetserver/Server/Session.h @@ -15,10 +15,10 @@ * with this program. If not, see . */ -#ifndef _BATTLENETSOCKET_H -#define _BATTLENETSOCKET_H +#ifndef Session_h__ +#define Session_h__ -#include "BattlenetPackets.h" +#include "Packets.h" #include "BattlenetPacketCrypt.h" #include "Socket.h" #include "BigNumber.h" @@ -125,4 +125,4 @@ namespace Battlenet } -#endif // _BATTLENETSOCKET_H +#endif // Session_h__ diff --git a/src/server/authserver/Server/BattlenetSessionManager.cpp b/src/server/bnetserver/Server/SessionManager.cpp similarity index 91% rename from src/server/authserver/Server/BattlenetSessionManager.cpp rename to src/server/bnetserver/Server/SessionManager.cpp index 91ba2b65094..d8b6bfca8d1 100644 --- a/src/server/authserver/Server/BattlenetSessionManager.cpp +++ b/src/server/bnetserver/Server/SessionManager.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ -#include "BattlenetSessionManager.h" +#include "SessionManager.h" bool Battlenet::SessionManager::StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port) { @@ -33,5 +33,5 @@ NetworkThread* Battlenet::SessionManager::CreateThreads() co void Battlenet::SessionManager::OnSocketAccept(tcp::socket&& sock) { - sBattlenetSessionMgr.OnSocketOpen(std::forward(sock)); + sSessionMgr.OnSocketOpen(std::forward(sock)); } diff --git a/src/server/authserver/Server/BattlenetSessionManager.h b/src/server/bnetserver/Server/SessionManager.h similarity index 89% rename from src/server/authserver/Server/BattlenetSessionManager.h rename to src/server/bnetserver/Server/SessionManager.h index b5a54438ef1..10e7196e4d8 100644 --- a/src/server/authserver/Server/BattlenetSessionManager.h +++ b/src/server/bnetserver/Server/SessionManager.h @@ -15,10 +15,10 @@ * with this program. If not, see . */ -#ifndef BattlenetSessionManager_h__ -#define BattlenetSessionManager_h__ +#ifndef SessionManager_h__ +#define SessionManager_h__ -#include "BattlenetSession.h" +#include "Session.h" #include "SocketMgr.h" namespace Battlenet @@ -66,6 +66,6 @@ namespace Battlenet }; } -#define sBattlenetSessionMgr Battlenet::SessionManager::Instance() +#define sSessionMgr Battlenet::SessionManager::Instance() -#endif // BattlenetSessionManager_h__ +#endif // SessionManager_h__ diff --git a/src/server/bnetserver/bnetserver.conf.dist b/src/server/bnetserver/bnetserver.conf.dist new file mode 100644 index 00000000000..e0ef6982353 --- /dev/null +++ b/src/server/bnetserver/bnetserver.conf.dist @@ -0,0 +1,257 @@ +############################################### +# Trinity Core Auth Server configuration file # +############################################### +[authserver] + +################################################################################################### +# SECTION INDEX +# +# EXAMPLE CONFIG +# AUTH SERVER SETTINGS +# MYSQL SETTINGS +# LOGGING SYSTEM SETTINGS +# +################################################################################################### + +################################################################################################### +# EXAMPLE CONFIG +# +# Variable +# Description: Brief description what the variable is doing. +# Important: Annotation for important things about this variable. +# Example: "Example, i.e. if the value is a string" +# Default: 10 - (Enabled|Comment|Variable name in case of grouped config options) +# 0 - (Disabled|Comment|Variable name in case of grouped config options) +# +# Note to developers: +# - Copy this example to keep the formatting. +# - Line breaks should be at column 100. +################################################################################################### + +################################################################################################### +# AUTH SERVER SETTINGS +# +# LogsDir +# Description: Logs directory setting. +# Important: LogsDir needs to be quoted, as the string might contain space characters. +# Logs directory must exists, or log file creation will be disabled. +# Default: "" - (Log files will be stored in the current path) + +LogsDir = "" + +# +# MaxPingTime +# Description: Time (in minutes) between database pings. +# Default: 30 + +MaxPingTime = 30 + +# +# RealmServerPort +# Description: TCP port to reach the auth server. +# Default: 3724 + +RealmServerPort = 3724 + +# +# BattlenetPort +# Description: TCP port to reach the auth server for battle.net connections. +# Default: 1119 + +BattlenetPort = 1119 + +# +# +# BindIP +# Description: Bind auth server to IP/hostname +# Default: "0.0.0.0" - (Bind to all IPs on the system) + +BindIP = "0.0.0.0" + +# +# PidFile +# Description: Auth server PID file. +# Example: "./authserver.pid" - (Enabled) +# Default: "" - (Disabled) + +PidFile = "" + +# +# UseProcessors +# Description: Processors mask for Windows and Linux based multi-processor systems. +# Example: A computer with 2 CPUs: +# 1 - 1st CPU only, 2 - 2nd CPU only, 3 - 1st and 2nd CPU, because 1 | 2 is 3 +# Default: 0 - (Selected by OS) +# 1+ - (Bit mask value of selected processors) + +UseProcessors = 0 + +# +# ProcessPriority +# Description: Process priority setting for Windows and Linux based systems. +# Details: On Linux, a nice value of -15 is used. (requires superuser). On Windows, process is set to HIGH class. +# Default: 0 - (Normal) +# 1 - (High) + +ProcessPriority = 0 + +# +# RealmsStateUpdateDelay +# Description: Time (in seconds) between realm list updates. +# Default: 20 - (Enabled) +# 0 - (Disabled) + +RealmsStateUpdateDelay = 20 + +# +# WrongPass.MaxCount +# Description: Number of login attemps with wrong password before the account or IP will be +# banned. +# Default: 0 - (Disabled) +# 1+ - (Enabled) + +WrongPass.MaxCount = 0 + +# +# WrongPass.BanTime +# Description: Time (in seconds) for banning account or IP for invalid login attempts. +# Default: 600 - (10 minutes) +# 0 - (Permanent ban) + +WrongPass.BanTime = 600 + +# +# WrongPass.BanType +# Description: Ban type for invalid login attempts. +# Default: 0 - (Ban IP) +# 1 - (Ban Account) + +WrongPass.BanType = 0 + +# +################################################################################################### + +################################################################################################### +# MYSQL SETTINGS +# +# LoginDatabaseInfo +# Description: Database connection settings for the realm server. +# Example: "hostname;port;username;password;database" +# ".;somenumber;username;password;database" - (Use named pipes on Windows +# "enable-named-pipe" to [mysqld] +# section my.ini) +# ".;/path/to/unix_socket;username;password;database" - (use Unix sockets on +# Unix/Linux) +# Default: "127.0.0.1;3306;trinity;trinity;auth" + +LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth" + +# +# LoginDatabase.WorkerThreads +# Description: The amount of worker threads spawned to handle asynchronous (delayed) MySQL +# statements. Each worker thread is mirrored with its own connection to the +# Default: 1 + +LoginDatabase.WorkerThreads = 1 + +# +# Wrong.Password.Login.Logging +# Description: Additionally log attempted wrong password logging +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Wrong.Password.Login.Logging = 0 +# +################################################################################################### + +################################################################################################### +# +# LOGGING SYSTEM SETTINGS +# +# Appender config values: Given a appender "name" +# Appender.name +# Description: Defines 'where to log' +# Format: Type,LogLevel,Flags,optional1,optional2,optional3 +# +# Type +# 0 - (None) +# 1 - (Console) +# 2 - (File) +# 3 - (DB) +# +# LogLevel +# 0 - (Disabled) +# 1 - (Trace) +# 2 - (Debug) +# 3 - (Info) +# 4 - (Warn) +# 5 - (Error) +# 6 - (Fatal) +# +# Flags: +# 0 - None +# 1 - Prefix Timestamp to the text +# 2 - Prefix Log Level to the text +# 4 - Prefix Log Filter type to the text +# 8 - Append timestamp to the log file name. Format: YYYY-MM-DD_HH-MM-SS (Only used with Type = 2) +# 16 - Make a backup of existing file before overwrite (Only used with Mode = w) +# +# Colors (read as optional1 if Type = Console) +# Format: "fatal error warn info debug trace" +# 0 - BLACK +# 1 - RED +# 2 - GREEN +# 3 - BROWN +# 4 - BLUE +# 5 - MAGENTA +# 6 - CYAN +# 7 - GREY +# 8 - YELLOW +# 9 - LRED +# 10 - LGREEN +# 11 - LBLUE +# 12 - LMAGENTA +# 13 - LCYAN +# 14 - WHITE +# Example: "13 11 9 5 3 1" +# +# File: Name of the file (read as optional1 if Type = File) +# Allows to use one "%s" to create dynamic files +# +# Mode: Mode to open the file (read as optional2 if Type = File) +# a - (Append) +# w - (Overwrite) +# +# MaxFileSize: Maximum file size of the log file before creating a new log file +# (read as optional3 if Type = File) +# Size is measured in bytes expressed in a 64-bit unsigned integer. +# Maximum value is 4294967295 (4 gb). Leave blank for no limit. +# NOTE: Does not work with dynamic filenames. +# Example: 536870912 (512 mb) +# + +Appender.Console=1,2,0 +Appender.Auth=2,2,0,Auth.log,w + +# Logger config values: Given a logger "name" +# Logger.name +# Description: Defines 'What to log' +# Format: LogLevel,AppenderList +# +# LogLevel +# 0 - (Disabled) +# 1 - (Trace) +# 2 - (Debug) +# 3 - (Info) +# 4 - (Warn) +# 5 - (Error) +# 6 - (Fatal) +# +# AppenderList: List of appenders linked to logger +# (Using spaces as separator). +# + +Logger.root=3,Console Auth + +# +################################################################################################### diff --git a/src/server/bnetserver/bnetserver.ico b/src/server/bnetserver/bnetserver.ico new file mode 100644 index 0000000000000000000000000000000000000000..da318f48a8c2f4dc94507596ec88d0cc4409b32f GIT binary patch literal 136606 zcmeEP1zc3?(_S#JJFrC&TM<+cQ4qyeKt-@Iu?ssFyF0GkaqaHF?(XimiiMre_srQn zxUR(FRqy@&clY-jPIC6_%)C?YyfYe&g(i+htJQFuRg){8g{G!PqX`Jm9WS1s(e&Xt zcX$1D4~@odhK0u7UVlA@MpN|$|1+!pIGINCCbp#}7oVXe@S)0cWmh@S?L_z2oi}LB z@IQkCp=V4!THXvZ{LkP(=xNHwoi}L-Ap|r1|95a8^wbjE2~mBtylAHT|1J)Mz7c)g zc~VOVA%xREe_{=4r_-Q%S`8|v)}U-E4ct>`P&~N?PDwQ=lthEPi8RQWP=o9VG_Z-U zK^8q^<<<;87YBmhYy`ozfUO>6KbwBvj8!reQcqW*ua@9WF#KqF5Keb> zUue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wC?1*2du9He5_gYXjm-dOZ zMQkmNuVpv?caBA1NW}uCZ1`={b2n(Pr=jb5Bqo%?gCd{m_Hlk<9y`xXM)mLLJTtKz zKW&-7F*0Kq5x0n#MJ_Z5J?%mRViGCL7Tq@b=+1L7yrVnL3=Axw3#AN972*mxj zk24P9xDdnT+L0e!Fj6uk#u_%ClcEpg1BJ_i@jB_wIRLNeLfjQ%u7n=_$ytc8LVT6W z)eT$~XZyg}P&RJjP0-)kgdIY>5QPf zE?xU#^mp`u!YjuJS6T%`{B!a9SA)J*{a8mm}EV6u6u{=^`*ui(;lX5s91Y< zhShhrPa7BpJ?mu++;rbX``66ISyU=#+tdrGSD1eDvM;S{InQOo2~<{xm)l*oA)BFJ T(nN6@5vdF literal 0 HcmV?d00001 diff --git a/src/server/bnetserver/bnetserver.rc b/src/server/bnetserver/bnetserver.rc new file mode 100644 index 00000000000..f030203fdcd --- /dev/null +++ b/src/server/bnetserver/bnetserver.rc @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2008-2014 TrinityCore + * Copyright (C) 2005-2009 MaNGOS + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "resource.h" +#include "revision.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "windows.h" //"afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APPICON ICON "bnetserver.ico" + +///////////////////////////////////////////////////////////////////////////// +// Neutre (Par défaut système) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_FILEVERSION +PRODUCTVERSION VER_PRODUCTVERSION + +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + +#ifndef _DEBUG + FILEFLAGS 0 +#else + #define VER_PRERELEASE VS_FF_PRERELEASE + #define VER_PRIVATEBUILD VS_FF_PRIVATEBUILD + #define VER_DEBUG 0 + FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG) +#endif + +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_APP + +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080004b0" + BEGIN + VALUE "CompanyName", VER_COMPANYNAME_STR + VALUE "FileDescription", "TrinityCore Battle.net Server Daemon" + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "InternalName", "bnetserver" + VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR + VALUE "OriginalFilename", "bnetserver.exe" + VALUE "ProductName", "TrinityCore Battle.net Server" + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x800, 1200 + END +END +#endif diff --git a/src/server/bnetserver/resource.h b/src/server/bnetserver/resource.h new file mode 100644 index 00000000000..7dc5cb9ef7b --- /dev/null +++ b/src/server/bnetserver/resource.h @@ -0,0 +1,15 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by TrinityCore.rc +// + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif