Reply 500 of 526, by superfury
Just added a new little thing to the packet server (not released yet, but in the current commits).
It now supports IP blacklisting based on invalid login attempts.
So it will simply keep a counter that starts at 0. Then, for every invalid PPP or text-based login it will increase the counter.
When the setting for max login attempts is reached (in other words: the IP address has invalidly tried to login the set amount of times), it will consider the IP address blacklisted.
Of course, performing a valid login will clear the counter.
The counter for an IP address can also be set to a value less than 0 to whitelist the IP address instead (it won't increase or modify it if that's the case). All attempts in that case will always succeed the checks.
The checks are made during both text-based authentication (username/password if required) and during PPP PAP/CHAP failed/succeeded attempts to login.
Edit: Just fixed a few little bugs with the counter increasing too much when a PAP/CHAP response for a failed login is kept pending (it would increase the counter until hitting the limit for each attempt to send the failed login packet while the client's receiver buffer isn't ready to send the packet back yet). It now instead only increments the counters when the packet is successfully sent to the user as it should (only one increase for each failed attempt).
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io