Test3
This commit is contained in:
@@ -134,9 +134,9 @@ namespace ColumnLynx::Net {
|
||||
std::unique_lock lock(mMutex);
|
||||
mSessionIPs[sessionID] = ip;
|
||||
|
||||
if (mIPSessions.find(sessionID) == mIPSessions.end()) {
|
||||
/*if (mIPSessions.find(sessionID) == mIPSessions.end()) {
|
||||
Utils::debug("yikes");
|
||||
}
|
||||
}*/
|
||||
mIPSessions[ip] = mSessions.find(sessionID)->second;
|
||||
}
|
||||
|
||||
|
||||
@@ -230,8 +230,6 @@ namespace ColumnLynx::Net::TCP {
|
||||
tunConfig.dns1 = htonl(0x08080808); // 8.8.8.8
|
||||
tunConfig.dns2 = 0;
|
||||
|
||||
SessionRegistry::getInstance().lockIP(mConnectionSessionID, clientIP);
|
||||
|
||||
uint64_t sessionIDNet = Utils::chtobe64(mConnectionSessionID);
|
||||
|
||||
std::vector<uint8_t> payload(sizeof(uint64_t) + sizeof(tunConfig));
|
||||
@@ -249,6 +247,7 @@ namespace ColumnLynx::Net::TCP {
|
||||
Utils::log("Handshake with " + reqAddr + " completed successfully. Session ID assigned (" + std::to_string(mConnectionSessionID) + ").");
|
||||
auto session = std::make_shared<SessionState>(mConnectionAESKey, std::chrono::hours(12), clientIP, htonl(0x0A0A0001), mConnectionSessionID);
|
||||
SessionRegistry::getInstance().put(mConnectionSessionID, std::move(session));
|
||||
SessionRegistry::getInstance().lockIP(mConnectionSessionID, clientIP);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
Utils::error("Failed to decrypt HANDSHAKE_EXCHANGE_KEY from " + reqAddr + ": " + e.what());
|
||||
|
||||
Reference in New Issue
Block a user