diff --git a/README.md b/README.md index 00958db..e16b3c0 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ You can change the default behavior of the hook by creating JSON config named `c | patches.DNS | Patch game DNS resolution (redirects all game requests to localhost) | Boolean (true/false) | true | | patches.SSL | Patch game SSL certificate verification (required for hook proxy to work) | Boolean (true/false) | true | | proxy.enable | Enable/Disable hook proxy | Boolean (true/false) | true | -| proxy.address | IP Address or Domain Name of custom server implementation | Any string | bfbc2.grzyb.app | +| proxy.host | IP Address or Domain Name of custom server implementation | Any string | bfbc2.grzyb.app | | proxy.port | Port of custom server implementation | Unsigned short (Range 0-65535) | 443 | | proxy.path | Endpoint path | Any string | /ws | | proxy.secure | Use secure connection (wss) or not encrypted connection (ws) | Boolean (true/false) | true | diff --git a/dinput8/Config.cpp b/dinput8/Config.cpp index a199de5..271bfd6 100644 --- a/dinput8/Config.cpp +++ b/dinput8/Config.cpp @@ -80,7 +80,7 @@ Config::Config() // Section - Proxy hook->proxyEnable = pt.get("proxy.enable", true); - hook->proxyAddress = pt.get("proxy.address", "bfbc2.grzyb.app"); + hook->proxyHost = pt.get("proxy.host", "bfbc2.grzyb.app"); hook->proxyPort = pt.get("proxy.port", HTTPS_PORT); hook->proxyPath = pt.get("proxy.path", "/ws"); hook->proxySSL = pt.get("proxy.secure", true); diff --git a/dinput8/Config.hpp b/dinput8/Config.hpp index f8f5ce7..a2fc582 100644 --- a/dinput8/Config.hpp +++ b/dinput8/Config.hpp @@ -48,7 +48,7 @@ class Config /* Proxy */ bool proxyEnable; - std::string proxyAddress; + std::string proxyHost; USHORT proxyPort; std::string proxyPath; bool proxySSL; diff --git a/dinput8/ConnectionPlasma.cpp b/dinput8/ConnectionPlasma.cpp index a11b8b2..0d67852 100644 --- a/dinput8/ConnectionPlasma.cpp +++ b/dinput8/ConnectionPlasma.cpp @@ -41,7 +41,7 @@ void ConnectionPlasma::HandleHandshake(const boost::system::error_code& error) BOOST_LOG_TRIVIAL(debug) << "New connection, initializing..."; const auto config = &Config::GetInstance(); - ws_->Connect(config->hook->proxyAddress, config->hook->proxyPort, config->hook->proxyPath); + ws_->Connect(config->hook->proxyHost, config->hook->proxyPort, config->hook->proxyPath); gameSocket_.async_read_some(buffer(buffer_, PACKET_MAX_LENGTH), boost::bind(&ConnectionPlasma::HandleRead, shared_from_this(), diff --git a/dinput8/HttpHandler.cpp b/dinput8/HttpHandler.cpp index 4e6906f..e5d1c3b 100644 --- a/dinput8/HttpHandler.cpp +++ b/dinput8/HttpHandler.cpp @@ -31,11 +31,11 @@ void HttpHandler::ProcessRequest(const system::error_code& error, size_t bytesTr const auto config = &Config::GetInstance(); // Set up an HTTP GET request message - request_.set(http::field::host, config->hook->proxyAddress); + request_.set(http::field::host, config->hook->proxyHost); try { - response_ = http_->Execute(config->hook->proxyAddress, config->hook->proxyPort, request_); + response_ = http_->Execute(config->hook->proxyHost, config->hook->proxyPort, request_); http::async_write(game_socket_, response_, bind(&HttpHandler::HandleWrite, shared_from_this(), asio::placeholders::error,