Skip to content

Instantly share code, notes, and snippets.

@hyliker
hyliker / shadowsocks-quota
Created October 21, 2017 09:57 — forked from larvata/shadowsocks-quota
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

1. Ensure that Terminal declares itself as "xterm-256color"

Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to "xterm-256-color".

2. Build a version of screen that supports 256 colors

This is easy with homebrew:

brew tap homebrew/dupes