shadowsocks / shadowsocks-nodejs

https://github.com/shadowsocks/shadowsocks
Other
1.25k stars 724 forks source link

Limit ports data transfer #25

Closed dallascao closed 11 years ago

dallascao commented 11 years ago

With mutiuser support, each user is assigned a port number. Would be great if we can limit monthly/weekly/daily data transfer for each port.

e.g.

instead of

"port_password": {"1681": "pswd"} Add "port_password_limit": {"1681": "pswd", "mlimit": 10}

Or simply add a global limit for each user: ... "timeout": 600, "mlimit": 10

meaning there is a monthly data transfer cap of 10Gib for this user.

clowwindy commented 11 years ago

I think this could be done with iptables, and adding some heavy features that only deal with commercial use is not worthwhile for this project, which most.of its users are coders and geeks.

dallascao commented 11 years ago

Thanks Clowwindy so much the reply and all your contributions.