Skip to content

Commit

Permalink
更换谷歌官方高速IP、其他修复
Browse files Browse the repository at this point in the history
  • Loading branch information
sy618 committed Jun 5, 2017
1 parent 0d8e8d3 commit b956b9e
Show file tree
Hide file tree
Showing 10 changed files with 9,885 additions and 12,266 deletions.
9,957 changes: 4,888 additions & 5,069 deletions ADFQ

Large diffs are not rendered by default.

9,704 changes: 4,664 additions & 5,040 deletions FQ

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
* [安卓手机自动更新hosts tasker脚本与教程](https://github.com/sy618/hosts/tree/master/%E5%AE%89%E5%8D%93%E8%87%AA%E5%8A%A8%E6%9B%B4%E6%96%B0hosts)
* [路由器自动更新dnsmasq脚本与教程](https://github.com/sy618/hosts/blob/master/dnsmasq/dnsmasq%E8%AF%B4%E6%98%8E.md)
* [PC端自动更新hosts软件uphosts.exe,作者:阿起](https://raw.githubusercontent.com/vokins/yhosts/master/sxq/uphosts.exe)
* [新】安卓免root使用DNS/hosts/dnsmasq规则软件,作者iTXTech](https://github.com/iTXTech/Daedalus/releases)
* [新神器】Daedalus:安卓免root使用DNS/hosts/dnsmasq规则软件](https://github.com/iTXTech/Daedalus/releases)[项目作者iTXTech ](https://github.com/iTXTech/Daedalus)

### China AD hosts,by vokins
* 有广告或误杀问题请集中到以下地址反馈
* 有广告或误杀问题请集中到以下项目反馈
* https://github.com/vokins/yhosts/


### licensed
* [署名-非商业性使用 4.0 国际 CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/deed.zh)
* This work is licensed under a CC BY-NC 4.0 International License.
### 没人看的licensed
* [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/deed.zh)
### 没人理的免责声明
* 本项目所有重定向数据仅用于个人学术研究与学习使用。从未用于产生盈利行为(包括“捐赠”等方式)
* 未经许可,请勿内置于软件内发布与传播。请勿用于产生任何盈利活动。
* 仅供个人免费使用。请遵守当地法律法规,文明上网。
3 changes: 3 additions & 0 deletions dnsmasq/dnsad
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,6 @@ address=/.ra.icast.cn/0.0.0.0
address=/.houyi.baofeng.net/0.0.0.0
address=/.xlmc.sandai.net/0.0.0.0
address=/.supfast.net/0.0.0.0
address=/.am15.net/0.0.0.0


157 changes: 79 additions & 78 deletions dnsmasq/dnsfq
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## 2017-05-26 23:02:07
## 2017-06-05 23:00:28
## by sy618
## https://github.com/sy618/hosts
# This work is licensed under a CC BY-NC 4.0 International License.
# https://creativecommons.org/licenses/by-nc/4.0/deed.zh
# 本dnsmasq规则仅供个人免费使用
# 未经许可,请勿内置于软件内发布与传播。请勿用于产生盈利活动。

## Apkpure
address=/apkpure.com/104.20.83.194
Expand All @@ -17,7 +19,7 @@ address=/box.net/107.152.25.193
address=/notes.services.box.com/107.152.25.207
address=/support.box.com/104.218.203.34

## collector
## Collector
address=/d3c33hcgiwev3.cloudfront.net/54.192.151.157

## Disqus
Expand All @@ -38,10 +40,10 @@ address=/dl-doc.dropbox.com/162.125.3.6
address=/dl-web.dropbox.com/162.125.3.6
address=/dl.dropbox.com/162.125.3.6
address=/dl.dropboxusercontent.com/162.125.3.6
address=/dropbox.com/219.76.4.70
address=/dropboxstatic.com/219.76.4.70
address=/getdropbox.com/108.160.172.195
address=/www.dropboxstatic.com/162.125.82.7
address=/dropbox.com/219.76.4.70
address=/dropboxstatic.com/219.76.4.70

## DuckDuckGo
address=/duckduckgo.com/46.51.218.82
Expand All @@ -50,6 +52,7 @@ address=/images.duckduckgo.com/52.77.181.198

## Facebook/Instagram
address=/accountkit.com/157.240.7.35
address=/akamai.net/219.76.10.49
address=/akamaihd.net/219.76.10.49
address=/ak.facebook.com/219.76.10.49
address=/ak.fbcdn.net/219.76.10.49
Expand Down Expand Up @@ -79,83 +82,81 @@ address=/s.flipboard.com/54.192.214.90
address=/ue.flipboard.com/23.23.66.189

## Google family
address=/admob.com/219.76.4.70
address=/agoogleaday.com/219.76.4.70
address=/android.com/219.76.4.70

address=/blogger.com/219.76.4.70
address=/blogspot.com/219.76.4.70
address=/chromium.org/219.76.4.70
address=/com.google/219.76.4.70
address=/dartlang.org/219.76.4.70
address=/admob.com/216.58.200.33
address=/agoogleaday.com/216.58.200.33
address=/android.com/216.58.200.33
address=/blogger.com/216.58.200.33
address=/blogspot.com/216.58.200.33
address=/chromium.org/216.58.200.33
address=/com.google/216.58.200.33
address=/dartlang.org/216.58.200.33
address=/dl.google.com/203.208.43.105
address=/feedburner.com/219.76.4.70
address=/g.co/219.76.4.70

address=/gcr.io/219.76.4.70
address=/ggpht.com/219.76.4.70
address=/gmodules.com/219.76.4.70
address=/golang.org/219.76.4.70
address=/google.co.jp/219.76.4.70
address=/google.co.kr/219.76.4.70
address=/google.co.nz/219.76.4.70
address=/google.co.uk/219.76.4.70
address=/google.com.gi/219.76.4.70
address=/google.com.hk/219.76.4.70
address=/google.com.sg/219.76.4.70
address=/google.com.tw/219.76.4.70
address=/google.com/219.76.4.70
address=/google.org/219.76.4.70
address=/googleapis.com/219.76.4.70
address=/googleapps.com/219.76.4.70
address=/googlechinawebmaster.com/219.76.4.70
address=/googlecode.com/219.76.4.70
address=/googlecommerce.com/219.76.4.70
address=/googledrive.com/219.76.4.70
address=/googlegroups.com/219.76.4.70
address=/googlehosted.com/219.76.4.70
address=/googleinsidesearch.com/219.76.4.70
address=/googlemashups.com/219.76.4.70
address=/googlesource.com/219.76.4.70
address=/googlestore.com/219.76.4.70
address=/googletagmanager.com/219.76.4.70
address=/googleusercontent.com/219.76.4.70
address=/feedburner.com/216.58.200.33
address=/g.co/216.58.200.33
address=/gcr.io/216.58.200.33
address=/ggpht.com/216.58.200.33
address=/gmodules.com/216.58.200.33
address=/golang.org/216.58.200.33
address=/google.co.jp/216.58.200.33
address=/google.co.kr/216.58.200.33
address=/google.co.nz/216.58.200.33
address=/google.co.uk/216.58.200.33
address=/google.com.gi/216.58.200.33
address=/google.com.hk/216.58.200.33
address=/google.com.sg/216.58.200.33
address=/google.com.tw/216.58.200.33
address=/google.com/216.58.200.33
address=/google.org/216.58.200.33
address=/googleapis.com/216.58.200.33
address=/googleapps.com/216.58.200.33
address=/googlechinawebmaster.com/216.58.200.33
address=/googlecode.com/216.58.200.33
address=/googlecommerce.com/216.58.200.33
address=/googledrive.com/216.58.200.33
address=/googlegroups.com/216.58.200.33
address=/googlehosted.com/216.58.200.33
address=/googleinsidesearch.com/216.58.200.33
address=/googlemashups.com/216.58.200.33
address=/googlesource.com/216.58.200.33
address=/googlestore.com/216.58.200.33
address=/googletagmanager.com/216.58.200.33
address=/googleusercontent.com/216.58.200.33
address=/googlevideo.com/219.76.4.69
address=/googlewave.com/219.76.4.70
address=/googlezeitgeist.com/219.76.4.70
address=/googlezip.net/219.76.4.70
address=/gstatic.com/219.76.4.70
address=/googlewave.com/216.58.200.33
address=/googlezeitgeist.com/216.58.200.33
address=/googlezip.net/216.58.200.33
address=/gstatic.com/216.58.200.33
address=/gvt0.com/219.76.4.69
address=/gvt1.com/219.76.4.69
address=/gvt2.com/219.76.4.69
address=/gwtproject.org/219.76.4.70
address=/html5rocks.com/219.76.4.70
address=/keyhole.com/219.76.4.70
address=/gwtproject.org/216.58.200.33
address=/html5rocks.com/216.58.200.33
address=/keyhole.com/216.58.200.33
address=/mtalk.google.com/64.233.188.188
address=/measurement.com/219.76.4.70
address=/oneworldmanystories.com/219.76.4.70
address=/orkut.com/219.76.4.70
address=/panoramio.com/219.76.4.70
address=/recaptcha.net/219.76.4.70
address=/measurement.com/216.58.200.33
address=/oneworldmanystories.com/216.58.200.33
address=/orkut.com/216.58.200.33
address=/panoramio.com/216.58.200.33
address=/recaptcha.net/216.58.200.33
address=/redirector.gvt1.com/203.208.43.105
address=/teachparentstech.org/219.76.4.70
address=/thegooglepuzzle.com/219.76.4.70
address=/transparency.org/219.76.4.70
address=/teachparentstech.org/216.58.200.33
address=/thegooglepuzzle.com/216.58.200.33
address=/transparency.org/216.58.200.33
address=/translate.googleapis.com/203.208.43.105
address=/urchin.com/219.76.4.70
address=/webmproject.org/219.76.4.70
address=/withgoogle.com/219.76.4.70
address=/ytimg.com/219.76.4.70
address=/youtu.be/219.76.4.70
address=/youtubeeducation.com/219.76.4.70
address=/youtube-nocookie.com/219.76.4.70
address=/youtube.co/219.76.4.70
address=/youtube.com/219.76.4.70
address=/android.clients.google.com/219.76.4.70
address=/appspot.com/219.76.4.70
address=/gcm-http.googleapis.com/219.76.4.70
address=/goo.gl/219.76.4.70
address=/mail.google.com/219.76.4.70
address=/urchin.com/216.58.200.33
address=/webmproject.org/216.58.200.33
address=/withgoogle.com/216.58.200.33
address=/ytimg.com/216.58.200.33
address=/youtu.be/216.58.200.33
address=/youtubeeducation.com/216.58.200.33
address=/youtube-nocookie.com/216.58.200.33
address=/youtube.co/216.58.200.33
address=/youtube.com/216.58.200.33
address=/android.clients.google.com/216.58.200.33
address=/appspot.com/216.58.200.33
#address=/gcm-http.googleapis.com/216.58.200.33
address=/goo.gl/216.58.200.33
#address=/mail.google.com/216.58.200.33

## Ingress
address=/crittercism.com/54.241.32.8
Expand Down Expand Up @@ -203,18 +204,18 @@ address=/theinitium.com/104.28.31.251
## Twitter
address=/t.co/219.76.4.70
address=/tweetdeck.com/219.76.4.70
address=/twitter.com/219.76.4.70
address=/twimg.com/104.244.43.135
address=/twitpic.com/104.244.46.148
address=/twitter.com/219.76.4.70

## Vimeo
address=/click.email.vimeo.com/198.245.92.39
address=/vimeo.com/23.235.37.217
#address=/vimeocdn.com/151.101.78.109

## voa
address=/voanews.com/23.66.247.93
address=/www.voachinese.com/23.66.247.93
## Voa
address=/voanews.com/23.42.169.61
address=/www.voachinese.com/23.42.169.61

## Wikipedia
address=/upload.wikimedia.org/198.35.26.112
Expand All @@ -227,7 +228,7 @@ address=/android.smtp.mail.yahoo.com/106.10.150.156
address=/api.tumblr.com/119.161.8.100
address=/assets.tumblr.com/119.161.8.100
address=/code.flickr.com/192.0.79.32
address=/downloadr.flickr.com/183.177.81.75
address=/downloadr.flickr.com/68.142.242.184
address=/flickr.com/119.161.14.18
address=/geo.query.yahoo.com/119.160.242.41
address=/info.yahoo.com/119.161.14.18
Expand Down
57 changes: 57 additions & 0 deletions dnsmasq/dnsmasq.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
一个强大的dnsmasq规则实现去广告与自由上网,附手动教程与老毛子固件全自动脚本!

恩山论坛:http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=216155&extra=page%3D1&mobile=1&simpletype=no


1.什么是dnsmasq:https://wapbaike.baidu.com/item/DNSmasq?adapt=1
简单来说,路由器dnsmasq可以看作是部署在路由器上的DNS服务器。
dnsmasq功能很多,我们这里主要用来重定向、加快网络响应 和 屏蔽广告(指向127.0.0.1或0.0.0.0)。

2 规则介绍
2.1 自.由.上.网,享受无墙般体验。
https://raw.githubusercontent.com/sy618/hosts/master/dnsmasq/dnsfq
没时间解释了,上车就是。详情请到github看

2.2 屏蔽广告
可以使用vokins的专门去国内广告hosts
局域网内无PC的用这个规则:
https://raw.githubusercontent.com/vokins/yhosts/master/hosts
PC用户的用这个:
https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt
说明:
上面两个hosts规则区别:非PC端的是完整数据。PC端的是删减版,是由于PC端部分视频网站不能用hosts屏蔽,所以去掉了那部分数据。
(以hosts方式过滤广告非万能,肯定没有adbyby、KP等使用abp规则方式过滤全面,但对个人来说日常使用是够用了。如对去广告要求高的请用adbyby或KP。)

2.3 屏蔽运营商劫持
https://raw.githubusercontent.com/sy618/hosts/master/dnsmasq/dnsip
(如何查看是否被劫持,使用nslookup命令测试一个不存在的域名,若返回IP就是劫持)

3 如何使用(适用于h大的老毛子固件)
3.1 手动添加
手动添加到自定义脚本的【在 WAN 上行/下行启动后执行】里,实现网络连接上时自动更新。也可以直接在命令行里直接运行。
#自由上网dnsmasq:
wget --no-check-certificate https://raw.githubusercontent.com/sy618/hosts/master/dnsmasq/dnsfq -O /etc/storage/dnsmasq/dnsmasq.d/dnsfq.conf;sed -i "1 i\## update:$(date "+%Y-%m-%d %H:%M:%S")" /etc/storage/dnsmasq/dnsmasq.d/dnsfq.conf;restart_dhcpd
#去广告hosts:
wget --no-check-certificate https://raw.githubusercontent.com/vokins/yhosts/master/hosts -O /etc/storage/dnsmasq/hosts;sed -i "1 i\## update:$(date "+%Y-%m-%d %H:%M:%S")" /etc/storage/dnsmasq/hosts;restart_dhcpd

手动添加到定时任务crontab(在 系统管理 - 服务 -计划任务 (Crontab) 里)
#自由上网dnsmasq:
01 00 * * * wget --no-check-certificate https://raw.githubusercontent.com/sy618/hosts/master/dnsmasq/dnsfq -O /etc/storage/dnsmasq/dnsmasq.d/dnsfq.conf;sed -i "1 i\## update:$(date "+%Y-%m-%d %H:%M:%S")" /etc/storage/dnsmasq/dnsmasq.d/dnsfq.conf;restart_dhcpd
#去广告hosts
02 00 * * * wget --no-check-certificate https://raw.githubusercontent.com/vokins/yhosts/master/hosts -O /etc/storage/dnsmasq/hosts;sed -i "1 i\## update:$(date "+%Y-%m-%d %H:%M:%S")" /etc/storage/dnsmasq/hosts;restart_dhcpd

3.2 自动化脚本
一键运行命令:不会手动添加的用这个脚本命令,适用h大的老毛子固件
mkdir -p /etc/storage/dnsmasq/dns;wget --no-check-certificate https://raw.githubusercontent.com/sy618/hosts/master/dnsmasq/sh/setting.sh -O /etc/storage/dnsmasq/dns/setting.sh;/bin/sh /etc/storage/dnsmasq/dns/setting.sh
详细看https://github.com/sy618/hosts/tree/master/dnsmasq/sh

4.优缺点
优点:解析快,消耗极少CPU资源,非常适合路由器使用。过滤广告无需证书,可部分代替s-s
缺点:易失效,这一切美好的事情,全靠规则维护者的维护,希望有更多人加入维护!

由于不常上论坛,有问题请到github上反馈与交流!
去广告项目:
https://github.com/vokins/yhosts
FQ项目:
https://github.com/sy618/hosts

Loading

0 comments on commit b956b9e

Please sign in to comment.