Fixed ProtoProxy.
This commit is contained in:
parent
79ec770d77
commit
e39f2a21d5
@ -37,6 +37,9 @@ set(SHARED_SRC
|
|||||||
../../src/Log.cpp
|
../../src/Log.cpp
|
||||||
../../src/MCLogger.cpp
|
../../src/MCLogger.cpp
|
||||||
../../src/Crypto.cpp
|
../../src/Crypto.cpp
|
||||||
|
../../src/PolarSSL++/CtrDrbgContext.cpp
|
||||||
|
../../src/PolarSSL++/EntropyContext.cpp
|
||||||
|
../../src/PolarSSL++/RsaPrivateKey.cpp
|
||||||
)
|
)
|
||||||
set(SHARED_HDR
|
set(SHARED_HDR
|
||||||
../../src/ByteBuffer.h
|
../../src/ByteBuffer.h
|
||||||
@ -44,6 +47,9 @@ set(SHARED_HDR
|
|||||||
../../src/Log.h
|
../../src/Log.h
|
||||||
../../src/MCLogger.h
|
../../src/MCLogger.h
|
||||||
../../src/Crypto.h
|
../../src/Crypto.h
|
||||||
|
../../src/PolarSSL++/CtrDrbgContext.h
|
||||||
|
../../src/PolarSSL++/EntropyContext.h
|
||||||
|
../../src/PolarSSL++/RsaPrivateKey.h
|
||||||
)
|
)
|
||||||
set(SHARED_OSS_SRC
|
set(SHARED_OSS_SRC
|
||||||
../../src/OSSupport/CriticalSection.cpp
|
../../src/OSSupport/CriticalSection.cpp
|
||||||
|
@ -216,6 +216,20 @@ typedef unsigned char Byte;
|
|||||||
// Pretty much the same as ASSERT() but stays in Release builds
|
// Pretty much the same as ASSERT() but stays in Release builds
|
||||||
#define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) )
|
#define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) )
|
||||||
|
|
||||||
|
// Allow both Older versions of MSVC and newer versions of everything use a shared_ptr:
|
||||||
|
// Note that we cannot typedef, because C++ doesn't allow (partial) templates to be typedeffed.
|
||||||
|
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
|
||||||
|
// MSVC before 2010 doesn't have std::shared_ptr, but has std::tr1::shared_ptr, defined in <memory> included earlier
|
||||||
|
#define SharedPtr std::tr1::shared_ptr
|
||||||
|
#elif (__cplusplus >= 201103L)
|
||||||
|
// C++11 has std::shared_ptr in <memory>, included earlier
|
||||||
|
#define SharedPtr std::shared_ptr
|
||||||
|
#else
|
||||||
|
// C++03 has std::tr1::shared_ptr in <tr1/memory>
|
||||||
|
#include <tr1/memory>
|
||||||
|
#define SharedPtr std::tr1::shared_ptr
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ You need to set the server *not* to verify usernames ("online-mode=false" in ser
|
|||||||
|
|
||||||
|
|
||||||
ProtoProxy is not much dependent on the protocol - it will work with unknown packets, it just won't parse them into human-readable format.
|
ProtoProxy is not much dependent on the protocol - it will work with unknown packets, it just won't parse them into human-readable format.
|
||||||
The latest protocol which has been tested is 1.6.1 (#73).
|
The latest protocol which has been tested is 1.7.9 (#5).
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "PolarSSL++/RsaPrivateKey.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +19,7 @@
|
|||||||
class cServer
|
class cServer
|
||||||
{
|
{
|
||||||
SOCKET m_ListenSocket;
|
SOCKET m_ListenSocket;
|
||||||
cRSAPrivateKey m_PrivateKey;
|
cRsaPrivateKey m_PrivateKey;
|
||||||
AString m_PublicKeyDER;
|
AString m_PublicKeyDER;
|
||||||
short m_ConnectPort;
|
short m_ConnectPort;
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ public:
|
|||||||
int Init(short a_ListenPort, short a_ConnectPort);
|
int Init(short a_ListenPort, short a_ConnectPort);
|
||||||
void Run(void);
|
void Run(void);
|
||||||
|
|
||||||
cRSAPrivateKey & GetPrivateKey(void) { return m_PrivateKey; }
|
cRsaPrivateKey & GetPrivateKey(void) { return m_PrivateKey; }
|
||||||
const AString & GetPublicKeyDER (void) { return m_PublicKeyDER; }
|
const AString & GetPublicKeyDER (void) { return m_PublicKeyDER; }
|
||||||
|
|
||||||
short GetConnectPort(void) const { return m_ConnectPort; }
|
short GetConnectPort(void) const { return m_ConnectPort; }
|
||||||
|
Loading…
Reference in New Issue
Block a user