updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / west-chamber-svn / west-chamber-svn.install
blob87a396ad3a2c99ffc7872a006f68195dadaae273
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).
5 _install_notes()
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
28 post_install() {
30   echo "<<< Running depmod >>>"
31   depmod -a
32   echo "<<< End depmod >>>"
34   _install_notes
37 ## arg 1:  the new package version
38 ## arg 2:  the old package version
39 pre_upgrade() {
40   echo -n
43 ## arg 1:  the new package version
44 ## arg 2:  the old package version
45 post_upgrade() {
46   post_install $1
49 ## arg 1:  the old package version
50 pre_remove() {
51   echo -n
54 ## arg 1:  the old package version
55 post_remove() {
56   echo -n
59 # vim:set ts=2 sw=2 et: