Last active
October 14, 2023 16:06
-
-
Save larvata/02616b25c223668ccbd0 to your computer and use it in GitHub Desktop.
shadowsocks bandwidth limit and data quota each port
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# draft | |
# view current data quota | |
sudo iptables -nvL -t filter --line-numbers | |
# init | |
sudo iptables -I OUTPUT -p tcp --sport <target-port> -m quota --quota <quota-bytes> -j ACCEPT | |
sudo iptables -I OUTPUT -p tcp --sport <target-port> -j DROP | |
# reset quota | |
sudo iptables -R OUTPUT <line-number> -p tcp --sport <target-port> -m quota --quota <quota-bytes> -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i want set speed limit for each password or port in shadowsocks.json
how can do this?