mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-04 23:06:25 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d545bd7078 | ||
|
|
84111d36c1 | ||
|
|
b09c9f4c7a | ||
|
|
dd3d1494c6 | ||
|
|
56574bb483 | ||
|
|
2f2127121f | ||
|
|
5847375447 | ||
|
|
da9e32f15f | ||
|
|
5027bd9fa6 |
4
.github/workflows/cmake-windows.yml
vendored
4
.github/workflows/cmake-windows.yml
vendored
@@ -18,9 +18,9 @@ jobs:
|
|||||||
uses: lukka/run-vcpkg@v7
|
uses: lukka/run-vcpkg@v7
|
||||||
id: runvcpkg
|
id: runvcpkg
|
||||||
with:
|
with:
|
||||||
vcpkgArguments: 'zlib discord-rpc nlohmann-json openssl minhook'
|
vcpkgArguments: 'zlib discord-rpc nlohmann-json openssl minhook cpp-httplib tomlplusplus easyloggingpp[no-defaultfile]'
|
||||||
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
|
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
|
||||||
vcpkgGitCommitId: '06b5f4a769d848d1a20fa0acd556019728b56273'
|
vcpkgGitCommitId: '16ee2ecb31788c336ace8bb14c21801efb6836e4'
|
||||||
vcpkgTriplet: 'x64-windows-static'
|
vcpkgTriplet: 'x64-windows-static'
|
||||||
|
|
||||||
- name: Create Build Environment
|
- name: Create Build Environment
|
||||||
|
|||||||
72
.github/workflows/release-build.yml
vendored
72
.github/workflows/release-build.yml
vendored
@@ -1,72 +0,0 @@
|
|||||||
name: Release Create & Build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
# Sequence of patterns matched against refs/tags
|
|
||||||
tags:
|
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
create-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Create Release
|
|
||||||
outputs:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
steps:
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: Release ${{ github.ref }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
body: |
|
|
||||||
Files included in this release:
|
|
||||||
- `BeamMP-Launcher.exe` windows build
|
|
||||||
|
|
||||||
upload-release-files-windows:
|
|
||||||
name: Upload Windows Release Files
|
|
||||||
runs-on: windows-latest
|
|
||||||
needs: create-release
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
|
|
||||||
- name: Restore artifacts, or run vcpkg, build and cache artifacts
|
|
||||||
uses: lukka/run-vcpkg@main
|
|
||||||
id: runvcpkg
|
|
||||||
with:
|
|
||||||
vcpkgArguments: 'zlib discord-rpc nlohmann-json openssl minhook'
|
|
||||||
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
|
|
||||||
vcpkgGitCommitId: '06b5f4a769d848d1a20fa0acd556019728b56273'
|
|
||||||
vcpkgTriplet: 'x64-windows-static'
|
|
||||||
|
|
||||||
- name: Create Build Environment
|
|
||||||
run: cmake -E make_directory ${{github.workspace}}/build-windows
|
|
||||||
|
|
||||||
- name: Configure CMake
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{github.workspace}}/build-windows
|
|
||||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE='${{ runner.workspace }}/b/vcpkg/scripts/buildsystems/vcpkg.cmake' -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
working-directory: ${{github.workspace}}/build-windows
|
|
||||||
shell: bash
|
|
||||||
run: cmake --build . --config $BUILD_TYPE --target BeamMP-Launcher
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
|
||||||
id: upload-release-asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
|
||||||
asset_path: ${{github.workspace}}/build-windows/Release/BeamMP-Launcher.exe
|
|
||||||
asset_name: BeamMP-Launcher.exe
|
|
||||||
asset_content_type: application/vnd.microsoft.portable-executable
|
|
||||||
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -1,12 +0,0 @@
|
|||||||
[submodule "wxWidgets"]
|
|
||||||
path = include/wxWidgets
|
|
||||||
url = https://github.com/wxWidgets/wxWidgets.git
|
|
||||||
[submodule "include/cpp-httplib"]
|
|
||||||
path = include/cpp-httplib
|
|
||||||
url = https://github.com/yhirose/cpp-httplib.git
|
|
||||||
[submodule "include/tomlplusplus"]
|
|
||||||
path = include/tomlplusplus
|
|
||||||
url = https://github.com/marzer/tomlplusplus.git
|
|
||||||
[submodule "include/easyloggingpp"]
|
|
||||||
path = include/easyloggingpp
|
|
||||||
url = https://github.com/amrayn/easyloggingpp.git
|
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(BeamMP-Launcher)
|
project(BeamMP-Launcher)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
|
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
|
||||||
STRING(REPLACE "/MD" "/MT /MP" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
STRING(REPLACE "/MD" "/MT /MP" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
||||||
STRING(REPLACE "/MD" "/MT /MP" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
|
STRING(REPLACE "/MD" "/MT /MP" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
|
||||||
STRING(REPLACE "/MDd" "/MTd /MP" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
STRING(REPLACE "/MDd" "/MTd /MP" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
||||||
STRING(REPLACE "/MDd" "/MTd /MP" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
STRING(REPLACE "/MDd" "/MTd /MP" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
find_package(OpenSSL REQUIRED)
|
|
||||||
find_package(minhook CONFIG REQUIRED)
|
|
||||||
find_package(nlohmann_json CONFIG REQUIRED)
|
|
||||||
#-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
#-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||||
set(VcpkgRoot ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET})
|
set(VcpkgRoot ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET})
|
||||||
include_directories(${VcpkgRoot}/include)
|
include_directories(${VcpkgRoot}/include)
|
||||||
@@ -18,15 +16,17 @@ if (WIN32)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNICODE")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUNICODE")
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
add_subdirectory(include/cpp-httplib)
|
|
||||||
add_subdirectory(include/tomlplusplus)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||||
|
|
||||||
|
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
find_package(minhook CONFIG REQUIRED)
|
||||||
|
find_package(nlohmann_json CONFIG REQUIRED)
|
||||||
|
find_package(httplib CONFIG REQUIRED)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
src/main.cpp include/easyloggingpp/src/easylogging++.cc
|
src/main.cpp
|
||||||
src/Launcher.cpp include/Launcher.h include/Memory/Hook.h
|
src/Launcher.cpp include/Launcher.h include/Memory/Hook.h
|
||||||
src/Memory/Definitions.cpp include/Memory/Definitions.h
|
src/Memory/Definitions.cpp include/Memory/Definitions.h
|
||||||
src/Memory/Memory.cpp include/Memory/Memory.h include/Memory/Patterns.h
|
src/Memory/Memory.cpp include/Memory/Memory.h include/Memory/Patterns.h
|
||||||
@@ -46,17 +46,18 @@ add_executable(${PROJECT_NAME}
|
|||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE discord-rpc)
|
target_link_libraries(${PROJECT_NAME} PRIVATE discord-rpc easyloggingpp)
|
||||||
|
else ()
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${VcpkgRoot}/debug/lib/easyloggingpp.lib)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
ZLIB::ZLIB OpenSSL::SSL OpenSSL::Crypto ws2_32
|
ZLIB::ZLIB OpenSSL::SSL OpenSSL::Crypto ws2_32
|
||||||
Dbghelp comsuppw minhook::minhook nlohmann_json nlohmann_json::nlohmann_json)
|
Dbghelp comsuppw minhook::minhook nlohmann_json httplib::httplib)
|
||||||
else(WIN32) #MINGW
|
else(WIN32) #MINGW
|
||||||
add_definitions("-D_WIN32_WINNT=0x0600")
|
add_definitions("-D_WIN32_WINNT=0x0600")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -s --static")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -s --static")
|
||||||
target_link_libraries(${PROJECT_NAME} discord-rpc ssl crypto ws2_32 ssp crypt32 z
|
target_link_libraries(${PROJECT_NAME} discord-rpc ssl crypto ws2_32 ssp crypt32 z
|
||||||
Dbghelp comsuppw minhook::minhook nlohmann_json nlohmann_json::nlohmann_json)
|
Dbghelp comsuppw minhook::minhook nlohmann_json nlohmann_json::nlohmann_json)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
add_definitions(-DELPP_NO_DEFAULT_LOG_FILE)
|
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE "include")
|
target_include_directories(${PROJECT_NAME} PRIVATE "include")
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE "include/atomic_queue/include")
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
///
|
///
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#define CPPHTTPLIB_OPENSSL_SUPPORT
|
||||||
|
#include <httplib.h>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include "Memory/IPC.h"
|
#include "Memory/IPC.h"
|
||||||
@@ -37,6 +39,7 @@ class Launcher {
|
|||||||
void UpdateCheck();
|
void UpdateCheck();
|
||||||
void WaitForGame();
|
void WaitForGame();
|
||||||
void LaunchGame();
|
void LaunchGame();
|
||||||
|
void StartProxy();
|
||||||
void CheckKey();
|
void CheckKey();
|
||||||
void SetupMOD();
|
void SetupMOD();
|
||||||
|
|
||||||
@@ -52,6 +55,7 @@ class Launcher {
|
|||||||
const std::string& getPublicKey();
|
const std::string& getPublicKey();
|
||||||
const std::string& getUserRole();
|
const std::string& getUserRole();
|
||||||
const std::string& getVersion();
|
const std::string& getVersion();
|
||||||
|
const std::string& getProtocolVersion();
|
||||||
static bool getExit() noexcept;
|
static bool getExit() noexcept;
|
||||||
|
|
||||||
private: // functions
|
private: // functions
|
||||||
@@ -69,8 +73,9 @@ class Launcher {
|
|||||||
|
|
||||||
public: // variables
|
public: // variables
|
||||||
static inline std::thread EntryThread{};
|
static inline std::thread EntryThread{};
|
||||||
static inline std::string Version{"2.1"};
|
static inline std::string Version{"3.0"};
|
||||||
static inline std::string FullVersion{Version + ".1"};
|
static inline std::string FullVersion{Version + ".0"};
|
||||||
|
static inline std::string ProtocolVersion{"2.0"};
|
||||||
|
|
||||||
private: // variables
|
private: // variables
|
||||||
uint32_t GamePID{0};
|
uint32_t GamePID{0};
|
||||||
@@ -86,12 +91,15 @@ class Launcher {
|
|||||||
std::string UserRole{};
|
std::string UserRole{};
|
||||||
std::string PublicKey{};
|
std::string PublicKey{};
|
||||||
std::thread IPCSystem{};
|
std::thread IPCSystem{};
|
||||||
|
std::thread BackendProxy{};
|
||||||
std::thread DiscordRPC{};
|
std::thread DiscordRPC{};
|
||||||
std::string ConnectURI{};
|
std::string ConnectURI{};
|
||||||
std::string BeamVersion{};
|
std::string BeamVersion{};
|
||||||
std::string DiscordMessage{};
|
std::string DiscordMessage{};
|
||||||
Server ServerHandler{this};
|
Server ServerHandler{this};
|
||||||
std::string TargetBuild{"default"};
|
std::string TargetBuild{"default"};
|
||||||
|
httplib::Server HTTPProxy;
|
||||||
|
int ProxyPort{0};
|
||||||
|
|
||||||
static inline std::atomic<bool> Shutdown{false}, Exit{false};
|
static inline std::atomic<bool> Shutdown{false}, Exit{false};
|
||||||
std::unique_ptr<IPC> IPCToGame{};
|
std::unique_ptr<IPC> IPCToGame{};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
///
|
///
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <easyloggingpp/src/easylogging++.h>
|
#include <easylogging++.h>
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
class Log {
|
class Log {
|
||||||
|
|||||||
Submodule include/cpp-httplib deleted from fee8e97b4e
Submodule include/easyloggingpp deleted from 8489989bb2
Submodule include/tomlplusplus deleted from 27816dbbd1
Submodule include/wxWidgets deleted from 0e57ed1851
@@ -4,7 +4,7 @@
|
|||||||
///
|
///
|
||||||
|
|
||||||
|
|
||||||
#include <tomlplusplus/toml.hpp>
|
#include <toml++/toml.hpp>
|
||||||
#include "Launcher.h"
|
#include "Launcher.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
#include <shlguid.h>
|
#include <shlguid.h>
|
||||||
|
|||||||
@@ -24,40 +24,46 @@ LONG WINAPI CrashHandler(EXCEPTION_POINTERS* p) {
|
|||||||
Launcher::Launcher(int argc, char* argv[]) :
|
Launcher::Launcher(int argc, char* argv[]) :
|
||||||
CurrentPath(fs::current_path()),
|
CurrentPath(fs::current_path()),
|
||||||
DiscordMessage("Just launched") {
|
DiscordMessage("Just launched") {
|
||||||
Log::Init();
|
try {
|
||||||
Shutdown.store(false);
|
Log::Init();
|
||||||
Exit.store(false);
|
Shutdown.store(false);
|
||||||
Launcher::StaticAbort(this);
|
Exit.store(false);
|
||||||
DiscordTime = std::time(nullptr);
|
Launcher::StaticAbort(this);
|
||||||
WindowsInit();
|
DiscordTime = std::time(nullptr);
|
||||||
SetUnhandledExceptionFilter(CrashHandler);
|
WindowsInit();
|
||||||
LOG(INFO) << "Starting Launcher v" << FullVersion;
|
SetUnhandledExceptionFilter(CrashHandler);
|
||||||
|
LOG(INFO) << "Starting Launcher v" << FullVersion;
|
||||||
|
BackendProxy = std::thread(&Launcher::StartProxy, this);
|
||||||
|
|
||||||
fs::path config_path(CurrentPath / "Launcher.toml");
|
fs::path config_path(CurrentPath / "Launcher.toml");
|
||||||
|
|
||||||
std::string arg, arg2;
|
std::string arg, arg2;
|
||||||
if(argc > 2) {
|
if(argc > 2) {
|
||||||
arg = argv[1];
|
arg = argv[1];
|
||||||
arg2 = argv[2];
|
arg2 = argv[2];
|
||||||
} else if (argc > 1) {
|
} else if (argc > 1) {
|
||||||
arg = argv[1];
|
arg = argv[1];
|
||||||
}
|
}
|
||||||
if (arg.starts_with('0')) {
|
if (arg.starts_with('0')) {
|
||||||
LOG(INFO) << "Debug param in effect";
|
LOG(INFO) << "Debug param in effect";
|
||||||
DebugMode = true;
|
DebugMode = true;
|
||||||
Memory::DebugMode = true;
|
Memory::DebugMode = true;
|
||||||
} else if (arg2.starts_with("beammp://")) {
|
} else if (arg2.starts_with("beammp://")) {
|
||||||
CurrentPath = arg;
|
CurrentPath = arg;
|
||||||
config_path = CurrentPath / "Launcher.toml";
|
config_path = CurrentPath / "Launcher.toml";
|
||||||
if (arg2.starts_with("beammp://connect/")) {
|
if (arg2.starts_with("beammp://connect/")) {
|
||||||
ConnectURI = arg2.substr(17);
|
ConnectURI = arg2.substr(17);
|
||||||
}
|
}
|
||||||
} else if (!arg.empty()) {
|
} else if (!arg.empty()) {
|
||||||
config_path = CurrentPath / arg;
|
config_path = CurrentPath / arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadConfig(config_path);
|
LoadConfig(config_path);
|
||||||
LauncherCache = CurrentPath/"Resources";
|
LauncherCache = CurrentPath/"Resources";
|
||||||
|
} catch (const ShutdownException& e) {
|
||||||
|
Abort();
|
||||||
|
throw ShutdownException(e.what());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Launcher::Abort() {
|
void Launcher::Abort() {
|
||||||
@@ -69,6 +75,10 @@ void Launcher::Abort() {
|
|||||||
if (IPCSystem.joinable()) {
|
if (IPCSystem.joinable()) {
|
||||||
IPCSystem.join();
|
IPCSystem.join();
|
||||||
}
|
}
|
||||||
|
HTTPProxy.stop();
|
||||||
|
if (BackendProxy.joinable()) {
|
||||||
|
BackendProxy.join();
|
||||||
|
}
|
||||||
if (!MPUserPath.empty()) {
|
if (!MPUserPath.empty()) {
|
||||||
ResetMods();
|
ResetMods();
|
||||||
}
|
}
|
||||||
@@ -203,6 +213,30 @@ void Launcher::WaitForGame() {
|
|||||||
GamePID = 0;
|
GamePID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Launcher::StartProxy() {
|
||||||
|
HTTPProxy.Get("/:any", [](const httplib::Request& req, httplib::Response& res) {
|
||||||
|
httplib::Client cli("https://backend.beammp.com");
|
||||||
|
if (auto cli_res = cli.Get(req.path); cli_res) {
|
||||||
|
res.set_content(cli_res->body,cli_res->get_header_value("Content-Type"));
|
||||||
|
} else {
|
||||||
|
res.set_content(to_string(cli_res.error()), "text/plain");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
HTTPProxy.Post("/:any", [](const httplib::Request& req, httplib::Response& res) {
|
||||||
|
httplib::Client cli("https://backend.beammp.com");
|
||||||
|
if (auto cli_res = cli.Post(req.path, req.body, req.get_header_value("Content-Type")); cli_res) {
|
||||||
|
res.set_content(cli_res->body,cli_res->get_header_value("Content-Type"));
|
||||||
|
} else {
|
||||||
|
res.set_content(to_string(cli_res.error()), "text/plain");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ProxyPort = HTTPProxy.bind_to_any_port("0.0.0.0");
|
||||||
|
LOG(INFO) << "HTTP Proxy running on port " << ProxyPort;
|
||||||
|
HTTPProxy.listen_after_bind();
|
||||||
|
}
|
||||||
|
|
||||||
void Launcher::ListenIPC() {
|
void Launcher::ListenIPC() {
|
||||||
while (!Shutdown.load()) {
|
while (!Shutdown.load()) {
|
||||||
IPCFromGame->receive();
|
IPCFromGame->receive();
|
||||||
@@ -242,6 +276,10 @@ const std::string& Launcher::getFullVersion() {
|
|||||||
return FullVersion;
|
return FullVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string& Launcher::getProtocolVersion() {
|
||||||
|
return ProtocolVersion;
|
||||||
|
}
|
||||||
|
|
||||||
const std::string& Launcher::getVersion() {
|
const std::string& Launcher::getVersion() {
|
||||||
return Version;
|
return Version;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
/// Created by Anonymous275 on 1/17/22
|
/// Created by Anonymous275 on 1/17/22
|
||||||
/// Copyright (c) 2021-present Anonymous275 read the LICENSE file for more info.
|
/// Copyright (c) 2021-present Anonymous275 read the LICENSE file for more info.
|
||||||
///
|
///
|
||||||
#define CPPHTTPLIB_OPENSSL_SUPPORT
|
|
||||||
#include "HttpAPI.h"
|
#include "HttpAPI.h"
|
||||||
#include <cpp-httplib/httplib.h>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ void Server::Abort() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string Server::Auth() {
|
std::string Server::Auth() {
|
||||||
TCPSend("VC" + LauncherInstance->getVersion());
|
TCPSend("VC" + LauncherInstance->getProtocolVersion());
|
||||||
|
|
||||||
auto Res = TCPRcv();
|
auto Res = TCPRcv();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user