mirror of
https://github.com/gnu4cn/ccna60d.git
synced 2024-05-21 04:55:00 +08:00
20160923
This commit is contained in:
parent
dc1d4c6e83
commit
0a70140778
@ -1,31 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Author: https://github.com/softwaredownload/openwrt-fanqiang
|
||||
# Date: 2016-01-09
|
||||
|
||||
TMP_HOSTS=/tmp/block.hosts.unsorted
|
||||
HOSTS=/etc/dnsmasq.d/blockad.conf
|
||||
|
||||
# remove any old TMP_HOSTS that might have stuck around
|
||||
rm ${TMP_HOSTS} 2> /dev/null
|
||||
|
||||
for URL in \
|
||||
"https://raw.githubusercontent.com/vokins/simpleu/master/hosts" \
|
||||
"http://adaway.org/hosts.txt"
|
||||
do
|
||||
# filter out comment lines, empty lines, localhost...
|
||||
# remove trailing comments, space( ,tab), empty line
|
||||
# replace line to dnsmasq format
|
||||
# remove carriage returns
|
||||
# append the results to TMP_HOSTS
|
||||
wget -4 --no-check-certificate -qO- "${URL}" | grep -v -e "^#" -e "^\s*$" -e "localhost" -e "^;" -e "^@" -e "^:" -e "^[a-zA-Z]" \
|
||||
| sed -E -e "s/#.*$//" -e "s/[[:space:]]*//g" -e "/^$/d" \
|
||||
-e "s/^127.0.0.1/server=\/./" -e "s/0.0.0.0/server=\/./" -e "/^[0-9].*$/d" -e "s/$/\/127.0.0.0/" \
|
||||
| tr -d "\r" >> ${TMP_HOSTS}
|
||||
|
||||
done
|
||||
|
||||
# remove duplicate hosts and save the real hosts file
|
||||
sort ${TMP_HOSTS} | uniq > ${HOSTS}
|
||||
|
||||
rm ${TMP_HOSTS} 2> /dev/null
|
@ -1,58 +0,0 @@
|
||||
#手机和平板去广告,屏蔽
|
||||
server=/.mobads.baidu.com/127.0.0.0
|
||||
server=/.mobads-logs.baidu.com/127.0.0.0
|
||||
server=/.media.admob.com/127.0.0.0
|
||||
server=/.mob.adwhirl.com/127.0.0.0
|
||||
server=/.static.googeadsserving.cn/127.0.0.0
|
||||
server=/.googleads.g.doubleclick.net/127.0.0.0
|
||||
server=/.storage.adsmogo.net/127.0.0.0
|
||||
server=/.imp.adsmogo.com/127.0.0.0
|
||||
server=/.imp.adsmogo.net/127.0.0.0
|
||||
server=/.imp.adsmogo.org/127.0.0.0
|
||||
server=/.imp.adsmogo.mobi/127.0.0.0
|
||||
server=/.req.adsmogo.com/127.0.0.0
|
||||
server=/.req.adsmogo.net/127.0.0.0
|
||||
server=/.req.adsmogo.org/127.0.0.0
|
||||
server=/.req.adsmogo.mobi/127.0.0.0
|
||||
server=/.cfg.adsmogo.com/127.0.0.0
|
||||
server=/.cfg.adsmogo.net/127.0.0.0
|
||||
server=/.cfg.adsmogo.org/127.0.0.0
|
||||
server=/.cfg.adsmogo.mobi/127.0.0.0
|
||||
server=/.cus.adsmogo.com/127.0.0.0
|
||||
server=/.cus.adsmogo.net/127.0.0.0
|
||||
server=/.cus.adsmogo.org/127.0.0.0
|
||||
server=/.cus.adsmogo.mobi/127.0.0.0
|
||||
server=/.api2.adsmogo.com/127.0.0.0
|
||||
server=/.api2.adsmogo.net/127.0.0.0
|
||||
server=/.api2.adsmogo.org/127.0.0.0
|
||||
server=/.api2.adsmogo.mobi/127.0.0.0
|
||||
server=/.lk.adsmogo.mobi/127.0.0.0
|
||||
server=/.adview.cn/127.0.0.0
|
||||
server=/.report.adview.cn/127.0.0.0
|
||||
server=/.swx.domob.cn/127.0.0.0
|
||||
server=/.scc.domob.cn/127.0.0.0
|
||||
server=/.sm.domob.cn/127.0.0.0
|
||||
server=/.alog.umeng.com/127.0.0.0
|
||||
server=/.alog.umeng.co/127.0.0.0
|
||||
server=/.r2.adwo.com/127.0.0.0
|
||||
server=/.static.adwo.com/127.0.0.0
|
||||
server=/.banner.img.static.youmi.net/127.0.0.0
|
||||
server=/.aos.gw.youmi.net/127.0.0.0
|
||||
server=/.stat.gw.youmi.net/127.0.0.0
|
||||
server=/.aos.wall.youmi.net/127.0.0.0
|
||||
server=/.amob.acs86.com/127.0.0.0
|
||||
server=/.static.acs86.com/127.0.0.0
|
||||
server=/.aggregate.renren.com/127.0.0.0
|
||||
server=/.interval.adbc.renren.com/127.0.0.0
|
||||
server=/.wall.adbc.renren.com/127.0.0.0
|
||||
server=/.admarket.mobi/127.0.0.0
|
||||
server=/.ad.airad.com/127.0.0.0
|
||||
server=/.ad.veegao.com/127.0.0.0
|
||||
server=/.sdk.yijifen.com/127.0.0.0
|
||||
server=/.res.yijifen.com/127.0.0.0
|
||||
server=/.ads.mobclix.com/127.0.0.0
|
||||
server=/.api.airpush.com/127.0.0.0
|
||||
server=/.ad.leadboltapps.net/127.0.0.0
|
||||
server=/.ad.leadbolt.net/127.0.0.0
|
||||
server=/.media.mydas.mobi/127.0.0.0
|
||||
server=/.lp.mydas.mobi/127.0.0.0
|
@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Author: https://github.com/softwaredownload/openwrt-fanqiang
|
||||
# Date: 2014-07-12
|
||||
|
||||
#adblock() {
|
||||
# wget -4 --no-check-certificate -O - https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt |
|
||||
# grep ^\|\|[^\*/]*\^$ |
|
||||
# sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' | uniq > /etc/dnsmasq.d/adblock.conf
|
||||
#
|
||||
# wget -4 --no-check-certificate -O - https://github.com/kcschan/AdditionalAdblock/raw/master/list.txt |
|
||||
# grep ^\|\|[^\*/]*\^$ |
|
||||
# sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' >> /etc/dnsmasq.d/adblock.conf
|
||||
#}
|
||||
|
||||
|
||||
wget -4 --no-check-certificate -O /etc/dnsmasq.d/accelerated-domains.china.conf https://github.com/felixonmars/dnsmasq-china-list/raw/master/accelerated-domains.china.conf
|
||||
wget -4 --no-check-certificate -O /etc/dnsmasq.d/bogus-nxdomain.china.conf https://github.com/felixonmars/dnsmasq-china-list/raw/master/bogus-nxdomain.china.conf
|
||||
|
||||
#/etc/init.d/dnsmasq restart
|
@ -1,14 +0,0 @@
|
||||
1. 安装openwrt镜像
|
||||
2. 上传`shadowsock-libev-polorissl`
|
||||
3. `opkg update`,`opkg install shadowsock-libev-polorissl`
|
||||
4. `wget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /etc/chinadns_chnroute.txt`
|
||||
5. 按照教程一步一步来
|
||||
- dnsmasq
|
||||
- `/etc/init.d/shadowsocks`
|
||||
- `/usr/bin/shadowsocks-firewall`
|
||||
- `/usr/bin/chinalist`
|
||||
- `/etc/dnsmasq.d/blockad.conf`
|
||||
- `/usr/bin/blockad`(使用默认的`/etc/dnsmasq.d/blockad.conf`, 就无需此脚本了)
|
||||
- `crontab -e`
|
||||
6. 运行`/etc/init.d/shadowsocks disable`
|
||||
7. 每次交付时,才运行`/etc/init.d/shadowsocks enable`
|
@ -1,30 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
# Author: https://github.com/softwaredownload/openwrt-fanqiang
|
||||
# Date: 2015-12
|
||||
|
||||
START=95
|
||||
|
||||
SERVICE_USE_PID=1
|
||||
SERVICE_WRITE_PID=1
|
||||
SERVICE_DAEMONIZE=1
|
||||
|
||||
start() {
|
||||
sed -i 's/223.5.5.5/127.0.0.1#3210/' /etc/dnsmasq.d/gfwlist.conf
|
||||
/etc/init.d/dnsmasq restart
|
||||
|
||||
service_start /usr/bin/ss-redir -b 0.0.0.0 -c /etc/shadowsocks.json -f /var/run/shadowsocks.pid
|
||||
service_start /usr/bin/ss-tunnel -b 0.0.0.0 -c /etc/shadowsocks.json -l 3210 -L 8.8.8.8:53 -u
|
||||
/usr/bin/shadowsocks-firewall
|
||||
}
|
||||
|
||||
stop() {
|
||||
sed -i 's/127.0.0.1#3210/223.5.5.5/' /etc/dnsmasq.d/gfwlist.conf
|
||||
/etc/init.d/dnsmasq restart
|
||||
|
||||
service_stop /usr/bin/ss-redir
|
||||
service_stop /usr/bin/ss-tunnel
|
||||
killall ss-redir
|
||||
killall ss-tunnel
|
||||
/etc/init.d/firewall restart
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Author: https://github.com/softwaredownload/openwrt-fanqiang
|
||||
# Date: 2015-12-23
|
||||
|
||||
#create a new chain named SHADOWSOCKS
|
||||
iptables -t nat -N SHADOWSOCKS
|
||||
iptables -t nat -N SHADOWSOCKS_WHITELIST
|
||||
|
||||
# Ignore your shadowsocks server's addresses
|
||||
# It's very IMPORTANT, just be careful.
|
||||
|
||||
iptables -t nat -A SHADOWSOCKS -d 198.98.125.165 -j RETURN
|
||||
|
||||
#for hulu.com
|
||||
iptables -t nat -A SHADOWSOCKS -p tcp --dport 1935 -j REDIRECT --to-ports 7654
|
||||
iptables -t nat -A SHADOWSOCKS -p udp --dport 1935 -j REDIRECT --to-ports 7654
|
||||
|
||||
# Ignore LANs IP address
|
||||
iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
|
||||
iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
|
||||
iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
|
||||
iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
|
||||
iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
|
||||
|
||||
# Check whitelist
|
||||
iptables -t nat -A SHADOWSOCKS -j SHADOWSOCKS_WHITELIST
|
||||
iptables -t nat -A SHADOWSOCKS -m mark --mark 1 -j RETURN
|
||||
|
||||
# Anything else should be redirected to shadowsocks's local port
|
||||
iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 7654
|
||||
# Apply the rules
|
||||
iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS
|
||||
|
||||
# Ignore China IP address
|
||||
for white_ip in `cat /etc/chinadns_chnroute.txt`;
|
||||
do
|
||||
iptables -t nat -A SHADOWSOCKS_WHITELIST -d "${white_ip}" -j MARK --set-mark 1
|
||||
done
|
||||
|
||||
# Ignore Asia IP address
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 1.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 14.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 27.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 36.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 39.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 42.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 49.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 58.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 59.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 60.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 61.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 101.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 103.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 106.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 110.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 111.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 112.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 113.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 114.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 115.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 116.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 117.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 118.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 119.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 120.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 121.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 122.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 123.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 124.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 125.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 126.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 169.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 175.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 180.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 182.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 183.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 202.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 203.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 210.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 211.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 218.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 219.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 220.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 221.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 222.0.0.0/8 -j MARK --set-mark 1
|
||||
#iptables -t nat -A SHADOWSOCKS_WHITELIST -d 223.0.0.0/8 -j MARK --set-mark 1
|
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
{
|
||||
"server":"210.140.75.238",
|
||||
"server_port":11276,
|
||||
"local_port":7654,
|
||||
"password":"M3wAfeqe",
|
||||
"method":"rc4-md5"
|
||||
}
|
Loading…
Reference in New Issue
Block a user