Kinda working Windows version
Needs these DLLs: - libgcc_s_seh-1.dll - libstdc++-6.dll - libwinpthread-1.dll - wintun.dll
This commit is contained in:
@@ -27,11 +27,13 @@ void signalHandler(int signum) {
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
// Capture SIGINT and SIGTERM for graceful shutdown
|
||||
#if !defined(_WIN32)
|
||||
struct sigaction action;
|
||||
memset(&action, 0, sizeof(struct sigaction));
|
||||
action.sa_handler = signalHandler;
|
||||
sigaction(SIGINT, &action, nullptr);
|
||||
sigaction(SIGTERM, &action, nullptr);
|
||||
#endif
|
||||
|
||||
PanicHandler::init();
|
||||
|
||||
@@ -67,7 +69,7 @@ int main(int argc, char** argv) {
|
||||
log("This software is licensed under the GPLv2 only OR the GPLv3. See LICENSES/ for details.");
|
||||
|
||||
#if defined(__WIN32__)
|
||||
WintunInitialize();
|
||||
//WintunInitialize();
|
||||
#endif
|
||||
|
||||
std::shared_ptr<VirtualInterface> tun = std::make_shared<VirtualInterface>(optionsObj["interface"].as<std::string>());
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Distributed under the terms of the GNU General Public License, either version 2 only or version 3. See LICENSES/ for details.
|
||||
|
||||
#include <columnlynx/client/net/tcp/tcp_client.hpp>
|
||||
#include <arpa/inet.h>
|
||||
//#include <arpa/inet.h>
|
||||
|
||||
namespace ColumnLynx::Net::TCP {
|
||||
void TCPClient::start() {
|
||||
@@ -26,9 +26,13 @@ namespace ColumnLynx::Net::TCP {
|
||||
Utils::log("Sending handshake init to server.");
|
||||
|
||||
// Check if hostname or IPv4/IPv6
|
||||
sockaddr_in addr4{};
|
||||
sockaddr_in6 addr6{};
|
||||
self->mIsHostDomain = inet_pton(AF_INET, mHost.c_str(), (void*)(&addr4)) != 1 && inet_pton(AF_INET6, mHost.c_str(), (void*)(&addr6)) != 1; // Voodoo black magic
|
||||
try {
|
||||
asio::ip::make_address(mHost);
|
||||
self->mIsHostDomain = false; // IPv4 or IPv6 literal
|
||||
} catch (const asio::system_error&) {
|
||||
self->mIsHostDomain = true; // hostname / domain
|
||||
}
|
||||
|
||||
|
||||
std::vector<uint8_t> payload;
|
||||
payload.reserve(1 + crypto_box_PUBLICKEYBYTES);
|
||||
|
||||
Reference in New Issue
Block a user