summaryrefslogtreecommitdiffstats
path: root/ProtoProxy/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ProtoProxy/Server.cpp')
-rw-r--r--ProtoProxy/Server.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ProtoProxy/Server.cpp b/ProtoProxy/Server.cpp
index e0abcb596..7eaa728ad 100644
--- a/ProtoProxy/Server.cpp
+++ b/ProtoProxy/Server.cpp
@@ -31,7 +31,9 @@ int cServer::Init(short a_ListenPort, short a_ConnectPort)
}
printf("Generating protocol encryption keypair...\n");
- AutoSeededRandomPool rng;
+ time_t CurTime = time(NULL);
+ RandomPool rng;
+ rng.Put((const byte *)&CurTime, sizeof(CurTime));
m_PrivateKey.GenerateRandomWithKeySize(rng, 1024);
RSA::PublicKey pk(m_PrivateKey);
m_PublicKey = pk;
@@ -40,7 +42,7 @@ int cServer::Init(short a_ListenPort, short a_ConnectPort)
sockaddr_in local;
memset(&local, 0, sizeof(local));
local.sin_family = AF_INET;
- local.sin_addr.s_addr = htonl(0x7f000001); // localhost
+ local.sin_addr.s_addr = 0; // All interfaces
local.sin_port = htons(a_ListenPort);
bind(m_ListenSocket, (sockaddr *)&local, sizeof(local));
listen(m_ListenSocket, 1);