1 # This is a default template for a post-install scriptlet.
2 # Uncomment only required functions and remove any functions
3 # you don't need (and this header).
7 echo 'read more details at http://code.google.com/p/scholarzhang/wiki/USAGE'
8 echo 'the file you need is installed at /usr/share/west-chamber/examples/'
9 echo 'run following commands with root to make it work'
10 echo '----------------------------------------------------'
11 echo 'cd /usr/share/west-chamber/examples'
12 echo 'ipset -R < CHINA'
13 echo 'ipset -R < GOOGLE'
14 echo 'ipset -R < YOUTUBE'
15 echo 'ipset -R < NOCLIP'
16 echo 'iptables -A INPUT -p tcp --sport 80 --tcp-flags FIN,SYN,RST,ACK SYN,ACK -m state --state ESTABLISHED -m set --match-set NOCLIP src -j ZHANG -m comment --comment "client-side connection obfuscation"'
17 echo 'iptables -A INPUT -p tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j CUI -m set --match-set CHINA src -m comment --comment "server-side connection obfuscation"'
18 echo 'iptables -A INPUT -p tcp --sport 80 -m state --state ESTABLISHED -m gfw -j LOG --log-level info --log-prefix "gfw: " -m comment --comment "log gfw tcp resets"'
19 echo 'iptables -A INPUT -p udp --sport 53 -m state --state ESTABLISHED -m gfw -j DROP -m comment --comment "drop gfw dns hijacks"'
20 echo '----------------------------------------------------'
21 echo 'you may need an unaffected DNS to make it work'
22 echo '----------------------------------------------------'
23 echo 'restart the network'
27 ## arg 1: the new package version
30 echo "<<< Running depmod >>>"
32 echo "<<< End depmod >>>"
37 ## arg 1: the new package version
38 ## arg 2: the old package version
43 ## arg 1: the new package version
44 ## arg 2: the old package version
49 ## arg 1: the old package version
54 ## arg 1: the old package version
59 # vim:set ts=2 sw=2 et: