removed ponintless ENABLE_PORT_SECURITY define & reorganized config loading

This commit is contained in:
d1str4ught
2025-08-22 17:36:28 +02:00
parent b63c35bd53
commit 5c9ae80bcd
13 changed files with 441 additions and 457 deletions

View File

@@ -44,15 +44,6 @@ bool DESC_P2P::Setup(LPFDWATCH fdw, socket_t fd, const char * host, WORD wPort)
m_iMinInputBufferLen = 1024 * 1024;
#ifdef ENABLE_PORT_SECURITY
if (strcmp(host, g_szPublicIP)) // refuse if remote host != public ip (only the same machine must be able to connect in here)
{
sys_log(0, "PORT_SECURITY: new p2p connection from [%s] to [%s] fd: %d BLOCKED", host, g_szPublicIP, m_sock);
SetPhase(PHASE_CLOSE);
return true;
}
#endif
SetPhase(PHASE_P2P);
sys_log(0, "SYSTEM: new p2p connection from [%s] fd: %d", host, m_sock);