72 Commits

Author SHA1 Message Date
Shauren
585e170ad6 Core/Network: Refactor AsyncAcceptor to use async_accept overload producing sockets through argument instead of having to preallocate it
* Also improve main() cleanup to fully process all queued async operations (including their cancellations)
2026-01-12 20:59:19 +01:00
Shauren
c81183a660 Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer 2024-12-09 21:13:18 +01:00
Shauren
b13b5142f1 Core/Utilities: Extend make_unique_ptr_with_deleter functionality to allow it to create deleters with compile time constant functions (reduces its size to just sizeof(void*)) 2024-10-01 21:03:44 +02:00
Shauren
052f2d0a81 Core/Common: Compile ServiceWin32 as part of common project instead of directly adding its source files to both server executables 2024-09-15 12:40:54 +02:00
Shauren
fd0a7ba871 Core/CrashHandler: Compile WheatyExceptionReport only once and moved its global variable initializer to all projects using it 2024-09-15 12:13:54 +02:00
Shauren
fd4ffc81b2 Core/Misc: Fixed windows _UNICODE incompatibilities 2024-06-02 14:21:13 +02:00
Shauren
83f4763b25 Core/Misc: Minor change to make_unique_ptr_with_deleter to make it accept only pointers 2024-05-07 12:26:21 +02:00
Shauren
7df138ba2b Core/Misc: Replace shared_ptr with unique_ptr with deleter for cleanups in main() functions 2024-04-04 21:31:22 +02:00
Shauren
acb5fbd48b Core/Bnet: Rewrite LoginRESTService using boost::beast instead of gsoap as http backend and extract generic http code to be reusable elsewhere 2023-12-17 23:21:10 +01:00
Shauren
78bcc3f52a Core/Misc: Minor code modernization - kill std::bind 2023-12-08 20:27:41 +01:00
Shauren
333630b7de Core/Misc: Added windows version checks during startup to avoid confusion about crashes when running on unsupported OS 2023-12-01 19:53:13 +01:00
Shauren
b299902881 Core/Locales: Set active code page and locale used by c string functions to utf8
Closes #29455
2023-11-24 20:01:17 +01:00
Shauren
6be536a73b Core/Network: Refactor local/remote ip address selection code and allow using hostnames in LoginREST bnetserver config options 2023-07-15 00:45:16 +02:00
Shauren
cdfaecda52 Core/Network: Cleanup asio using directives 2023-07-15 00:43:19 +02:00
Смердокрыл
74a4dc46b4 Core/Config: Implement reading config overrides from subdirectory (#29068)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-06-09 20:36:03 +02:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
3fa46c6dc1 Core/Crypto: Fixed loading legacy openssl provider for RC4 on windows 2022-09-05 18:48:43 +02:00
Shauren
bc87f7b337 Core/Crypto: Switch away from most deprecated openssl functions and removed upper version limit 2022-05-03 17:03:57 +02:00
Anton Popovichenko
8447f627ba Core/Config: Implement config override with env vars (#26811)
* Core/Config: Implement config override with env vars

Implement overriding of configuration from the .conf file with environment variables.
Environment variables keys are autogenerated based on the keys defined in .conf file.
Usage example:
$ export TC_DATA_DIR=/usr
$ TC_WORLD_SERVER_PORT=8080 ./worldserver

* Core/Config Fix typo in logs

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>

* Core/Config Fix code style in EnvVarForIniKey

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Update tests/common/Config.cpp

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

Co-authored-by: Anton Popovichenko <anton.popovichenko@mendix.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
(cherry picked from commit 1ddd9dc19c)
2022-03-13 16:37:01 +01:00
Treeston
e0e3bae82c Core/Authserver: Removal of sha_pass_hash, compatibility fields, and everything that uses them (PR #25156)
(cherry picked from commit bcdbdd6f23)
2022-02-05 13:29:21 +01:00
Shauren
c776218cb5 Core/Misc: Properly close database connections when using --update-databases-only arg
(cherry picked from commit a9f9f737b2)
2022-01-06 23:35:09 +01:00
Shauren
c5244d4e66 Core/Bnetserver: Added --update-databases-only console argument to bnetserver 2021-12-18 20:26:44 +01:00
Treeston
0b61c3b7b1 [3.3.5] Core/Authserver: TOTP rewrite: (PR #23633)
- Proper management commands (.account 2fa)
- Secrets can now be encrypted (set TOTPTokenSecret in .conf)
- Secret now stored in binary
- Argon2 and AES primitives
- Base32/64 support

(cherry picked from commit 4211645834)
2021-12-18 20:24:50 +01:00
Shauren
3c08eb190f Core/Misc: Add another boost hack. Fixes bnetserver/worldserver -c command line parameter when path contains spaces 2021-05-24 00:08:03 +02:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Treeston
73922d2a85 Core/Authserver: Re-organize the accounts table (PR #25135)
- no longer use sha_pass_hash for anything else core-side (.account, SOAP, RA)
- salt/verifier/session_key are now binary
- old s/v/sha_pass_hash fields kept around for backwards compatibility
- sha_pass_hash is still updated (for now), s/v are not
- sha_pass_hash is only read if s/v have been manually changed
- SRP6 b now uses the full 32 bytes of randomness (instead of randomly only using 19)

(cherry picked from commit 3164b58c7d)
2020-08-03 22:37:47 +02:00
Treeston
e9392ad287 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above

(cherry picked from commit 210176fd91)
2020-08-03 19:39:00 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
bcda8dd742 Core/Dep: Boost 1.70 compatibility 2019-04-14 00:13:23 +02:00
Gooyeth
163c487be7 Common: Replace ip2nation by ip2location. (#21957)
Replace ip2nation by ip2location.

Download: https://lite.ip2location.com/database/ip-country
(cherry picked from commit 2fe4ab94c5)
2019-01-09 17:35:13 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
dfd2660a85 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173
2018-01-06 01:21:59 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
274c45e548 Core/Bnet: Changed login REST service to use async db queries instead of spawning a thread for each request 2017-07-14 19:18:42 +02:00
Shauren
beb3316089 Core/Shared: Include cleanup 2017-05-13 11:49:09 +02:00
Shauren
7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
Shauren
3a418a0bbc Core/Common: Include cleanup 2017-05-11 22:29:51 +02:00
Shauren
6c92a481a3 Core/Misc: Cleanup worldserver/bnetserver main() functions to run destructors in predictable order
* world/bnet servers will now fail to startup if listen ports are in use
* Restored "Network.OutUBuff" config option lost during boost transition
2017-05-04 20:41:22 +02:00
Shauren
b8db320bf1 Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib) 2017-03-04 18:46:18 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
9633c8c2b7 Core/Debugging: Partially revert e0fb4445cd, the cmake hack to build wheaty directly into executable is still needed as it is impossible to have it initialize before every other static variable when it resides in dll (dynamic linking only) 2016-11-28 20:21:21 +01:00
Shauren
e0fb4445cd Core/Debugging: Added wheaty everywhere and modified it to always reliably report issues during static initialization 2016-11-28 18:37:51 +01:00
tkrokli
3cd28ee6c0 Core/Bnet: correct a typo in enum (#17991)
The enum LOGIN_DEL_BNET_EXPERIED_ACCOUNT_BANNED
should be LOGIN_DEL_BNET_EXPIRED_ACCOUNT_BANNED
to avoid confusion and not need any interpretation.
2016-09-24 17:02:22 +01:00
Kevin Plestan
30d006f98b Core/Bnetserver: Re-enable ban on wrong password
Closes #17937
Closes #17969
2016-09-24 15:02:34 +02:00
Shauren
a8c412a063 Tools: Added universal TrinityCore banner with git version info to all tools 2016-07-17 17:24:53 +02:00
Naios
51ec8d3b8c Core/Scripting: Use the path of the worldserver executable to search for the scripts dir
* Fixes issues when starting the worldserver not in the bin directory
  or the CMAKE_INSTALL_PREFIX directory using the -c option.

(cherry picked from commit 86b0fcf67a)
2016-04-18 23:03:24 +02:00
Shauren
dde620c402 Core: Updated to 6.2.4
* Rewrite bnetserver for new authentication protocol
2016-03-28 17:12:57 +02:00
Shauren
92e247b226 Core/Dep: Removed ZMQ dependency in preparation for future changes 2016-03-20 18:50:25 +01:00
Naios
a8fe7f6eb7 Core/Database: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)
* Also instantiate the database worker pools in DatabaseEnv.cpp now.
2016-03-11 18:25:55 +01:00
MitchesD
ce5def332f Core/Misc: fix build 2016-03-03 19:58:28 +01:00