feat: implement rest of endpoints
This commit is contained in:
@@ -9,9 +9,13 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <glaze/glaze.hpp>
|
||||
|
||||
#define WS_ADDR "0.0.0.0"
|
||||
#define WS_PORT 4444
|
||||
|
||||
#define PLACEHOLDER_ITEM_ID "Anniversary2025Offering"
|
||||
|
||||
class TinyMITMProxy;
|
||||
|
||||
namespace ix
|
||||
@@ -97,6 +101,27 @@ class Spoofer
|
||||
|
||||
void wsMessageCallback(std::shared_ptr<ix::ConnectionState> connectionState, ix::WebSocket& webSocket,
|
||||
const std::unique_ptr<ix::WebSocketMessage>& msg);
|
||||
|
||||
/*
|
||||
helpers
|
||||
*/
|
||||
void modifyCharacterInventory(glz::generic& js);
|
||||
void modifyCharacterData(glz::generic& js);
|
||||
void generateBloodweb(glz::generic& js);
|
||||
|
||||
/*
|
||||
api handlers
|
||||
*/
|
||||
void onServerGetAll(std::string& body);
|
||||
void onServerInventoryAll(std::string& body);
|
||||
void onServerMessageList(std::string& body);
|
||||
void onServerBloodweb(std::string& body, std::string& respHeaders);
|
||||
void onServerUpdateEntitlements(const std::string& url, std::string& body);
|
||||
|
||||
void onClientGetAll(std::string& body);
|
||||
void onClientBloodweb(std::string& body);
|
||||
void onClientUpdateEntitlements(const std::string& url, std::string& body);
|
||||
|
||||
/*
|
||||
proxy handlers
|
||||
*/
|
||||
@@ -111,6 +136,7 @@ class Spoofer
|
||||
bool _spoofPerks = false;
|
||||
bool _spoofCatalog = false;
|
||||
bool _spoofDLCs = false;
|
||||
bool _spoofCharacters = false;
|
||||
|
||||
std::unordered_map<std::string, int> _camperItems;
|
||||
std::unordered_map<std::string, int> _camperAddons;
|
||||
@@ -136,4 +162,5 @@ class Spoofer
|
||||
ix::WebSocketServer* _wsServer = nullptr;
|
||||
seallib::Logger* _log = nullptr;
|
||||
std::mutex _mutex;
|
||||
std::string _lastBwCharacter;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user