mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
RCON lacked encryption, added AES-CTR encryption on RCON frames. Slightly adjusted protocol to take this into account (sending nonces, encrypted data itself, etc).
37 lines
892 B
C++
37 lines
892 B
C++
#pragma once
|
|
#include "tier1/NetAdr.h"
|
|
#include "tier2/socketcreator.h"
|
|
#include "protoc/netcon.pb.h"
|
|
#include "engine/shared/base_rcon.h"
|
|
|
|
class CRConClient : public CNetConBase
|
|
{
|
|
public:
|
|
CRConClient(void);
|
|
~CRConClient(void);
|
|
|
|
void Init(const char* pNetKey = nullptr);
|
|
void Shutdown(void);
|
|
void RunFrame(void);
|
|
|
|
virtual void Disconnect(const char* szReason = nullptr) override;
|
|
virtual bool ProcessMessage(const char* pMsgBuf, const int nMsgLen) override;
|
|
|
|
bool Serialize(vector<char>& vecBuf, const char* szReqBuf,
|
|
const char* szReqVal, const netcon::request_e requestType) const;
|
|
|
|
void RequestConsoleLog(const bool bWantLog);
|
|
bool ShouldReceive(void);
|
|
|
|
bool IsRemoteLocal(void);
|
|
bool IsInitialized(void) const;
|
|
bool IsConnected(void);
|
|
|
|
CConnectedNetConsoleData* GetData(void);
|
|
SocketHandle_t GetSocket(void);
|
|
|
|
private:
|
|
bool m_bInitialized;
|
|
};
|
|
|
|
CRConClient* RCONClient(); |