Skip to content

Instantly share code, notes, and snippets.

@larvata
larvata / shadowsocks-quota
Last active October 14, 2023 16:06
shadowsocks bandwidth limit and data quota each port
# 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