当前位置:网站首页>Easynvr user login is modified to share the modification process of ip+ user name restriction

Easynvr user login is modified to share the modification process of ip+ user name restriction

2022-06-24 12:16:00 Tsingsee green rhino video

at present EasyNVR There is a limit on the number of logins , That is, when users and passwords are entered too many times , Prohibit all users from logging in , In order to keep the original users' use unaffected , We decided to optimize the mechanism , Change to single IP Single user limit for , It does not affect other users and others IP Log in to this user .

The implementation method of this function is as follows : The background maintains a IP+UserName by Key Login error message Map, Received the same again IP+Name Add one to the counter after the login failure message of , After reaching the maximum number of failures , Background limit this Key Login request for , Release the after the limit time Key.

Maintain login failure information Map The structure is as follows :

Determine the number of failures and whether the has been locked :

Release after locking time Key:

The user is forbidden to log in after multiple login failures , Other users can still log in , This function realizes .

For the development of video streaming media platform , We have accumulated many years of experience , Strive to optimize the user experience , The existing video platforms support the actual deployment experience of users , Welcome to know and test .

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/06/20210604113032137Z.html