limit the number of users who can simultaneously connect to the server for each port
ATTENTION 1 : as i tested in some android clients like v2rayng , sagernet .. you have to close app after disconnecting to fully disconnect from server or your ip still be established in netstat! (its weird)
ATTENTION 2 : the script maybe has some bugs with famous http and https ports like "443,80", its recommended to use random ports for best performance.
first install requirments
git
lnav
gawk
for example in debian or ubuntu
apt install git lnav gawk
then run this commands
git clone https://github.com/lovelypablo/v2raylimiter
cd v2raylimiter
./install -i
use sudo ./install -i
if you are not root.
to uninstall v2raylimiter you have to just run installation script with "-r" option
or from scratch
git clone https://github.com/lovelypablo/v2raylimiter
cd v2raylimiter
./install -r
use sudo ./install -r
if you are not root.
USAGE: v2raylimiter [ -r|--run ] run userlimiter
[ -c|--clear-iptables ] clear iptable rules created by userlimiter
[ -h|--help ] show this help page
[ -l|--list-ports ] show list of ports and their info
[ -L|--live-list-ports ] show live list of ports and their info
[ -a|--add-port PORT:LIMITRATE ] add new port with format PORT:LIMITRATE
[ -d|--delete-port PORT ] delete an existing port from list
[ -n|--change-limitrate PORT:LIMITRATE ] change limitrate of a port with format PORT:LIMITRATE
i hope you don't use this script for selling vpn to people.
instead you can teach them how to run vpn servers by themselves.
and feel free to use this script in your projects.