flood-protection | Flood protection for realtime applications | Socket library

 by   yatki JavaScript Version: Current License: MIT

kandi X-RAY | flood-protection Summary

kandi X-RAY | flood-protection Summary

flood-protection is a JavaScript library typically used in Networking, Socket, Nodejs, jQuery applications. flood-protection has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i flood-protection' or download it from GitHub, npm.

Flood protection for realtime applications
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              flood-protection has a low active ecosystem.
              It has 16 star(s) with 3 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of flood-protection is current.

            kandi-Quality Quality

              flood-protection has no bugs reported.

            kandi-Security Security

              flood-protection has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              flood-protection is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              flood-protection releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of flood-protection
            Get all kandi verified functions for this library.

            flood-protection Key Features

            No Key Features are available at this moment for flood-protection.

            flood-protection Examples and Code Snippets

            No Code Snippets are available at this moment for flood-protection.

            Community Discussions

            Trending Discussions on flood-protection

            QUESTION

            Socket.IO socket protection without authentication
            Asked 2019-Jan-01 at 17:49

            I've created a simple Node.js app using Express.js and socket.io (available here), where the user clicks a button, and it increments a number on the page. This number is also incremented live among all clients connected to the page. I am using web sockets and socket.io to get the client-server communication and live number updating system.

            I am using the flood-protection module to limit socket emits to 5 per second, but this really doesn't make the game very fun because of the low amount of clicks per second you can have, and hackers could just use a setInterval and still make considerable progress automatically, even at such a low rate.

            My issue:

            1. I don't want the user to have to authenticate themselves - anybody should be able to play!

            2. I want to keep the click rate around 15 clicks per second, if possible.

            3. I don't want people to be able to send socket messages and automatically click the button from the browser console.

            Here's the program:

            index.js

            ...

            ANSWER

            Answered 2019-Jan-01 at 17:49

            There's a lot of different ways for users to cheat, and just as many ways to prevent them. The general rule is that you can only "make things harder" (if you're lucky, hard enough that the potential cheater loses interest before succeeding).

            For a browser-based game, I would make sure that you are at least ensuring your game gets totally minified/tersed (so your javascript code is as unreadable as possible, and it's more difficult to just call a "click" function directly), and build in checksums in your messages (so the user can't just make socket calls directly to the server).

            Once you've done that, you still have to deal with users who generate click events on the element directly with code or a plugin, or users who use a program outside the browser to generate click events above the button repeatedly. Your best defense against this is not to prevent it, but instead to detect it -- probably on the server side, by watching for users that have a sustained click rate that is not humanly possible, and then blowing up their game / temporarily banning their IP / etc.

            See a related question Ways to prevent or reduce cheating for more related ideas (this question is about general client-server games, not browser games, but some of the discussion is still useful).

            Source https://stackoverflow.com/questions/53990781

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install flood-protection

            You can install using 'npm i flood-protection' or download it from GitHub, npm.

            Support

            As always, I'm open to any contribution and would like to hear your feedback.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/yatki/flood-protection.git

          • CLI

            gh repo clone yatki/flood-protection

          • sshUrl

            git@github.com:yatki/flood-protection.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Socket Libraries

            monolog

            by Seldaek

            libuv

            by libuv

            log.io

            by NarrativeScience

            Flask-SocketIO

            by miguelgrinberg

            Try Top Libraries by yatki

            vscode-surround

            by yatkiTypeScript

            read-env

            by yatkiTypeScript

            ordinalize-tr

            by yatkiTypeScript

            try-to-validate

            by yatkiJavaScript

            softether

            by yatkiShell