General fixes

Fixed most compiler warnings. Changed used interface from utun0/utun1 to lynx0
This commit is contained in:
2025-11-27 18:43:09 +01:00
parent d2242ebbc7
commit 2a2deae022
10 changed files with 63 additions and 28 deletions

View File

@@ -66,7 +66,7 @@ int main(int argc, char** argv) {
WintunInitialize();
#endif
std::shared_ptr<VirtualInterface> tun = std::make_shared<VirtualInterface>("utun1");
std::shared_ptr<VirtualInterface> tun = std::make_shared<VirtualInterface>("lynx0");
log("Using virtual interface: " + tun->getName());
LibSodiumWrapper sodiumWrapper = LibSodiumWrapper();

View File

@@ -196,7 +196,12 @@ namespace ColumnLynx::Net::TCP {
// Convert the server's public key to Curve25519 for encryption
AsymPublicKey serverXPubKey{};
crypto_sign_ed25519_pk_to_curve25519(serverXPubKey.data(), mServerPublicKey);
int r = crypto_sign_ed25519_pk_to_curve25519(serverXPubKey.data(), mServerPublicKey);
if (r != 0) {
Utils::error("Failed to convert server signing key to encryption key! Killing connection.");
disconnect();
return;
}
// Generate AES key and send confirmation
mConnectionAESKey = Utils::LibSodiumWrapper::generateRandom256Bit();