diff options
author | Robert Adam <dev@robert-adam.de> | 2020-04-21 10:59:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 10:59:47 +0300 |
commit | c84f0a5ebf337fa28ec37475537a584ad9dfaed3 (patch) | |
tree | 7789b1196f07b213b4952d7574cdde09a87f7933 /src/murmur/Meta.h | |
parent | 35c1d01b216f1d7e7fb9bd0cd8ecce09681f02c3 (diff) | |
parent | 6c6a5918264cc9d202f302c31c8f4959d6b4f563 (diff) |
Merge pull request #4087: Add autobanSuccessfulConnections flag.
The idea here is that sometimes you really do have a lot of folks connecting from a single IP,
and if those connections are successful you don't want to ban any of them.
However, in cases where the server needs to guard against malicious users attempting a DDOS
by reconnecting their valid user account over and over, we need to be able to configure the
server to still ban those successful attempts.
Diffstat (limited to 'src/murmur/Meta.h')
-rw-r--r-- | src/murmur/Meta.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/murmur/Meta.h b/src/murmur/Meta.h index 470ffbdc2..9720180fb 100644 --- a/src/murmur/Meta.h +++ b/src/murmur/Meta.h @@ -59,6 +59,7 @@ public: int iBanTries; int iBanTimeframe; int iBanTime; + bool bBanSuccessful; QString qsDatabase; int iSQLiteWAL; @@ -192,6 +193,10 @@ class Meta : public QObject { void bootAll(); bool boot(int); bool banCheck(const QHostAddress &); + + /// Called whenever we get a successful connection from a client. + /// Used to reset autoban tracking for the address. + void successfulConnectionFrom(const QHostAddress &); void kill(int); void killAll(); void getOSInfo(); |