mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-02-16 08:20:40 +00:00
Add UseSSL option to server config
This commit is contained in:
@@ -52,6 +52,7 @@ public:
|
||||
bool SendErrors { true };
|
||||
bool SendErrorsMessageEnabled { true };
|
||||
int HTTPServerPort { 8080 };
|
||||
bool HTTPServerUseSSL { true };
|
||||
[[nodiscard]] bool HasCustomIP() const { return !CustomIP.empty(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#define TOML11_PRESERVE_COMMENTS_BY_DEFAULT
|
||||
#include <toml11/toml.hpp> // header-only version of TOML++
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
class TConfig {
|
||||
@@ -18,10 +21,12 @@ private:
|
||||
void CreateConfigFile(std::string_view name);
|
||||
void ParseFromFile(std::string_view name);
|
||||
void PrintDebug();
|
||||
void TryReadValue(toml::value& Table, const std::string& Category, const std::string_view& Key, std::string& OutValue);
|
||||
void TryReadValue(toml::value& Table, const std::string& Category, const std::string_view& Key, bool& OutValue);
|
||||
void TryReadValue(toml::value& Table, const std::string& Category, const std::string_view& Key, int& OutValue);
|
||||
|
||||
void ParseOldFormat();
|
||||
bool IsDefault();
|
||||
bool mFailed { false };
|
||||
std::string mConfigFileName;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user