mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Add a limit of 10 unidentified connections per IP
Everything which isn't a CClient with a successful login counts as an unidentified connection in this context. Modules who don't want this kind of limit on their listening sockets can override CSocket::ConnectionFrom(), but their sockets will still count towards this limit. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1561 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -151,6 +151,9 @@ public:
|
||||
// This defaults to closing the socket, feel free to override
|
||||
virtual void ReachedMaxBuffer();
|
||||
virtual void SockError(int iErrno);
|
||||
// This limits the global connections from this IP to defeat DoS
|
||||
// attacks, feel free to override
|
||||
virtual bool ConnectionFrom(const CString& sHost, unsigned short uPort);
|
||||
|
||||
bool Connect(const CString& sHostname, unsigned short uPort, bool bSSL = false, unsigned int uTimeout = 60);
|
||||
bool Listen(unsigned short uPort, bool bSSL = false, unsigned int uTimeout = 0);
|
||||
|
||||
Reference in New Issue
Block a user