Giter Site home page Giter Site logo

vddos-auto-switch's Introduction

vDDoS Auto Switch

vDDoS Auto Switch is a addon support for vDDoS Proxy Protection - Automatically identifies overloaded websites and changes their Security Mode.


1/ Install vDDoS Proxy Protection:

To install vDDoS Proxy Protection please visit this site: http://vddos.voduy.com


2/ Install vDDoS Auto Switch:

curl -L https://github.com/duy13/vDDoS-Auto-Switch/archive/master.zip -o vddos-auto-switch.zip ; unzip vddos-auto-switch.zip ; rm -f vddos-auto-switch.zip
mv vDDoS-Auto-Switch-master /vddos/auto-switch
chmod 700 /vddos/auto-switch/cron.sh; chmod 700 /vddos/auto-switch/vddos-switch.sh
ln -s /vddos/auto-switch/cron.sh /usr/bin/vddos-autoswitch
ln -s /vddos/auto-switch/vddos-switch.sh /usr/bin/vddos-switch


3/ Using vDDoS Auto Switch:

/usr/bin/vddos-autoswitch automatically identifies overloaded websites (if the website can not respond 200 HTTP Status after 2 seconds - it mean they are too slow or high load...) And after that vddos-autoswitch will changes their Security Mode in /vddos/conf.d/website.conf:

WARNING: Please remove [...] in all the below commands!

Auto check/switch for a domain:

Auto check/switch security mode for a domain (already in the website.conf file) to 5s mode (if it is being slow/high load):

/usr/bin/vddos-autoswitch [checkdomain] your-domain.com 5s

Auto check/switch for a list domains:

Auto check/switch security mode for each all domains (already in the website.conf file) to 5s mode (if it is being slow/high load):

/usr/bin/vddos-autoswitch [checkalldomain] 5s

Auto check/switch security mode for each domain in the list domains to 5s mode (if it is being slow/high load):

/usr/bin/vddos-autoswitch [checklist] /etc/listdomains.txt 5s

Flush all security mode for all domain (already in the website.conf file) if they are not slow/high load:

/usr/bin/vddos-autoswitch [flushalldomain] /etc/listdomains.txt no

4/ Crontab vDDoS Auto Switch:

If you want to automate the inspection and changes website's Security Mode. You can configure vDDoS Auto Switch to crontab as follows:

For example, check the status of every website every 3 minutes and automatically flush all security mode for them (if their security mode have been switch) every 30 minutes:

echo '*/3  *  *  *  * root /usr/bin/vddos-autoswitch checkalldomain high' >> /etc/crontab
echo '*/30  *  *  *  * root /usr/bin/vddos-autoswitch flushalldomain /vddos/conf.d/website.conf no' >> /etc/crontab

Or you have a list of special domains that need to check the status of every website every 3 minutes and automatically flush all security mode for them every 30 minutes:

echo '*/3  *  *  *  * root /usr/bin/vddos-autoswitch checklist /etc/listspecialdomains.txt captcha' >> /etc/crontab
echo '*/30  *  *  *  * root /usr/bin/vddos-autoswitch flushalldomain /etc/listspecialdomains.txt no' >> /etc/crontab

5/ More Config:

Document: http://vddos.voduy.com

Still in beta, use at your own risk! It is provided without any warranty!

vddos-auto-switch's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.