Closed tonisole closed 4 months ago
@tonisole This looks great to me! I say we go with this design.
Would you mind starting a new example instead? It will make it more discoverable I think
Sorry I took so long to address this in the first place , excited to get your contribution merged :)
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.15%. Comparing base (
45e16a0
) to head (7b2178d
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@Sean-Der Thanks for your feedback! I'm glad you like the design.
I agree that putting the Brute Force Detection examples in a separate folder will make it easier for others to find the specific examples they are looking for.
This way, we can keep the original examples intact and clearly differentiate between the two sets of examples. I’ll go ahead and create a new folder for the Brute Force Detection examples.
Merged! Great job @tonisole glad to see this land :)
I just fix some small lint issue and added a unit test! If you have anything else that could be better about this library would love to hear :)
Thank you @Sean-Der so much for merging my work and for your kind words! 😊
Description
I am propose a modification to the current Config structure to add a callback mechanism that includes the client's address as part of the validation process. This change is crucial for implementing a Brute Force Detection mechanism in our system.
Currently, the DTLS server validation process does not provide any information about the client attempting to connect. This lack of information makes it impossible to detect if a specific IP address is repeatedly trying to guess the correct authorization, a common sign of a brute force attack.
OnConnectionAttempt func(net.Addr) error
Whenever a connection attempt is made, the server or application can call this callback function. The callback function can then implement logic to handle the connection attempt, such as logging the attempt, checking against a list of blocked IPs, or counting the attempts to prevent brute force attacks. If the callback function returns an error, the connection attempt will be aborted.
Reference issue
No related issue