test2
This commit is contained in:
@@ -28,7 +28,7 @@ namespace ColumnLynx::Net::TCP {
|
||||
std::array<uint8_t, 32>* aesKey,
|
||||
uint64_t* sessionIDRef,
|
||||
bool* insecureMode,
|
||||
VirtualInterface* tun = nullptr)
|
||||
std::shared_ptr<VirtualInterface> tun = nullptr)
|
||||
:
|
||||
mResolver(ioContext),
|
||||
mSocket(ioContext),
|
||||
@@ -74,6 +74,6 @@ namespace ColumnLynx::Net::TCP {
|
||||
int mMissedHeartbeats = 0;
|
||||
bool mIsHostDomain;
|
||||
Protocol::TunConfig mTunConfig;
|
||||
VirtualInterface* mTun = nullptr;
|
||||
std::shared_ptr<VirtualInterface> mTun = nullptr;
|
||||
};
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace ColumnLynx::Net::UDP {
|
||||
const std::string& port,
|
||||
std::array<uint8_t, 32>* aesKeyRef,
|
||||
uint64_t* sessionIDRef,
|
||||
VirtualInterface* tunRef = nullptr)
|
||||
std::shared_ptr<VirtualInterface> tunRef = nullptr)
|
||||
: mSocket(ioContext), mResolver(ioContext), mHost(host), mPort(port), mAesKeyRef(aesKeyRef), mSessionIDRef(sessionIDRef), mTunRef(tunRef) { mStartReceive(); }
|
||||
|
||||
void start();
|
||||
@@ -37,7 +37,7 @@ namespace ColumnLynx::Net::UDP {
|
||||
std::string mPort;
|
||||
std::array<uint8_t, 32>* mAesKeyRef;
|
||||
uint64_t* mSessionIDRef;
|
||||
VirtualInterface* mTunRef;
|
||||
std::shared_ptr<VirtualInterface> mTunRef = nullptr;
|
||||
std::array<uint8_t, 2048> mRecvBuffer; // Adjust size as needed
|
||||
};
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace ColumnLynx::Net::UDP {
|
||||
class UDPServer {
|
||||
public:
|
||||
UDPServer(asio::io_context& ioContext, uint16_t port, bool* hostRunning, bool ipv4Only = false, VirtualInterface* tun = nullptr)
|
||||
UDPServer(asio::io_context& ioContext, uint16_t port, bool* hostRunning, bool ipv4Only = false, std::shared_ptr<VirtualInterface> tun = nullptr)
|
||||
: mSocket(ioContext), mHostRunning(hostRunning), mTun(tun)
|
||||
{
|
||||
asio::error_code ec;
|
||||
@@ -53,6 +53,6 @@ namespace ColumnLynx::Net::UDP {
|
||||
asio::ip::udp::endpoint mRemoteEndpoint;
|
||||
std::array<uint8_t, 2048> mRecvBuffer; // Adjust size as needed
|
||||
bool* mHostRunning;
|
||||
VirtualInterface* mTun;
|
||||
std::shared_ptr<VirtualInterface> mTun;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user