mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-01-22 14:29:16 +08:00
更换hosts文件源
This commit is contained in:
parent
89f16f48ac
commit
454649d7d9
10158
adblock-for-dnsmasq.conf
10158
adblock-for-dnsmasq.conf
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,18 @@
|
||||
<?php
|
||||
//黑名单域名,即直接封杀主域名,效果就是只要是使用该域名及其下级所有域名的请求全部被阻挡,慎重使用
|
||||
|
||||
//这个文件主要定义针对hosts文件中不能泛域名解析而优化减少生成行数
|
||||
//对于个性化屏蔽的域名,全部移动到block_domains.root.conf中管理
|
||||
|
||||
return array( 'cnzz.com' => array('.cnzz.com'),
|
||||
'cnzz.net' => array('.cnzz.net'),
|
||||
'cnzz.cn' => array('.cnzz.cn'),
|
||||
'mediav.com' => array('.mediav.com'),
|
||||
'360.cn' => array('.360.cn'),
|
||||
'msn.com' => array('.msn.com'),
|
||||
'tom.com' => array('.tom.com'),
|
||||
'baihe.com' => array('.baihe.com'),
|
||||
'jiayuan.com' => array('.jiayuan.com'),//世纪佳缘,嗯!没这需求
|
||||
'adview.cn' => array('.adview.cn', 'adview.cn'),
|
||||
'wrating.com' => array('.wrating.com', 'wrating.com'),
|
||||
'umengcloud.com' => array('.umengcloud.com', 'umengcloud.com'),
|
||||
'umeng.com' => array('.umeng.com', 'umeng.com'),
|
||||
'umeng.com' => array('.umeng.co', 'umeng.co'),
|
||||
'msn.com' => array('.msn.com', 'msn.com'),
|
||||
'qbao.com' => array('.qbao.com'), //钱宝网
|
||||
'dftoutiao.com' => array('.dftoutiao.com'),
|
||||
'miaozhen.com' => array('miaozhen.com', '.miaozhen.com'),
|
||||
@ -31,11 +34,54 @@ return array( 'cnzz.com' => array('.cnzz.com'),
|
||||
'adsage.com' => array('adsage.com', '.adsage.com'),
|
||||
'allyes.cn' => array('allyes.cn', '.allyes.cn'),
|
||||
'allyes.com' => array('allyes.com', '.allyes.com'),
|
||||
'allyes.com.cn' => array('allyes.com.cn', '.allyes.com.cn'),
|
||||
'baifendian.com' => array('.baifendian.com'),
|
||||
'banmamedia.com' => array('.banmamedia.com'),
|
||||
'behe.com' => array('.behe.com'),
|
||||
'dnset.com' => array('.dnset.com'),
|
||||
|
||||
|
||||
'yiqifa.com' => array('.yiqifa.com', 'yiqifa.com'),
|
||||
'kankan.com' => array('.cpm.cm.kankan.com', '.float.kankan.com', '.stat.kankan.com'),
|
||||
'oadz.com' => array('.oadz.com', 'oadz.com'),
|
||||
'dopa.com' => array('.dopa.com', 'dopa.com'),
|
||||
'ok365.com' => array('.ok365.com', 'ok365.com'),
|
||||
'adwo.com' => array('.adwo.com', 'adwo.com'),
|
||||
'doubleclick.net' => array('.doubleclick.net', 'doubleclick.net'),
|
||||
'youmi.net' => array('.youmi.net', 'youmi.net'),
|
||||
'openxt.cn' => array('.openxt.cn', 'openxt.cn'),
|
||||
'adk2x.com' => array('.adk2x.com', 'adk2x.com'),
|
||||
'inmobi.com' => array('.inmobi.com', 'inmobi.com'),
|
||||
'alimama.cn' => array('.alimama.cn', 'alimama.cn'),
|
||||
'alimama.com' => array('.alimama.com', 'alimama.com'),
|
||||
'appjiagu.com' => array('.appjiagu.com', 'appjiagu.com'),
|
||||
'amazon-adsystem.com' => array('.amazon-adsystem.com', 'amazon-adsystem.com'),
|
||||
'adnxs.com' => array('.adnxs.com', 'adnxs.com'),
|
||||
'mmstat.com' => array('.mmstat.com', 'mmstat.com'),
|
||||
'linezing.com' => array('.linezing.com', 'linezing.com'),
|
||||
'atdmt.com' => array('.atdmt.com', 'atdmt.com'),
|
||||
'flurry.com' => array('.flurry.com', 'flurry.com'),
|
||||
'adfuture.cn' => array('.adfuture.cn', 'adfuture.cn'),
|
||||
'icast.cn' => array('.icast.cn', 'icast.cn'),
|
||||
'cooguo.com' => array('.cooguo.com', 'cooguo.com'),
|
||||
'adsmogo.com' => array('.adsmogo.com', 'adsmogo.com'),
|
||||
'wooboo.com.cn' => array('.wooboo.com.cn', 'wooboo.com.cn'),
|
||||
'domob.cn' => array('.domob.cn'),
|
||||
'advertising.com' => array('.advertising.com'),
|
||||
'admob.com' => array('.admob.com', 'admob.com'),
|
||||
'appsflyer.com' => array('.appsflyer.com', 'appsflyer.com'),
|
||||
'authedmine.com' => array('.authedmine.com', 'authedmine.com'),
|
||||
'coin-hive.com' => array('.coin-hive.com', 'coin-hive.com'),
|
||||
'coinhive.com' => array('.coinhive.com', 'coinhive.com'),
|
||||
'igexin.com' => array('.igexin.com', 'igexin.com'),
|
||||
'tanx.com' => array('.tanx.com', 'tanx.com'),
|
||||
'smartadserver.com' => array('.smartadserver.com', 'smartadserver.com'),
|
||||
'imrworldwide.com' => array('.imrworldwide.com', 'imrworldwide.com'),
|
||||
'fastclick.net' => array('.fastclick.net', 'fastclick.net'),
|
||||
'tourstogo.us' => array('.tourstogo.us', 'tourstogo.us'),
|
||||
'barginginfrance.net' => array('.barginginfrance.net', 'barginginfrance.net'),
|
||||
'butlerelectricsupply.com' => array('.butlerelectricsupply.com', 'butlerelectricsupply.com'),
|
||||
'cruisingsmallship.com' => array('.cruisingsmallship.com', 'cruisingsmallship.com'),
|
||||
'frost-electric-supply.com' => array('.frost-electric-supply.com', 'frost-electric-supply.com'),
|
||||
'iptvdeals.com' => array('.iptvdeals.com', 'iptvdeals.com'),
|
||||
'onetad.com' => array(),//dead
|
||||
'csheaven.com' => array(),//dead
|
||||
);
|
@ -1,12 +1,21 @@
|
||||
#个人特别要屏蔽的一些域名,不一定是广告域名
|
||||
address=/hm.baidu.com/127.0.0.1
|
||||
address=/.atdmt.com/127.0.0.1
|
||||
address=/conf.v.xunlei.com/127.0.0.1
|
||||
address=/kkpgv3.xunlei.com/127.0.0.1
|
||||
address=/rcgi.video.qq.com/127.0.0.1
|
||||
address=/.report.qq.com/127.0.0.1
|
||||
address=/.duote.com/127.0.0.1
|
||||
address=/.yiqifa.com/127.0.0.1
|
||||
address=/.360.cn/127.0.0.1
|
||||
address=/360.cn/127.0.0.1
|
||||
address=/360.com/127.0.0.1
|
||||
address=/.360.com/127.0.0.1
|
||||
address=/tom.com/127.0.0.1
|
||||
address=/.tom.com/127.0.0.1
|
||||
address=/.baihe.com/127.0.0.1
|
||||
address=/baihe.com/127.0.0.1
|
||||
address=/jiayuan.com/127.0.0.1
|
||||
address=/.jiayuan.com/127.0.0.1
|
||||
|
||||
address=/daohang.qq.com/127.0.0.1
|
||||
address=/.hao123.com/127.0.0.1
|
||||
address=/.4399.com/127.0.0.1
|
||||
|
@ -14,13 +14,12 @@ $arr_blacklist = require('./black_domain_list.php');
|
||||
$arr_result = array();
|
||||
|
||||
echo '开始下载host1....',"\n";
|
||||
$host1 = makeAddr::http_get('https://raw.githubusercontent.com/vokins/yhosts/master/dnsmasq/union.conf');
|
||||
$host1 = makeAddr::http_get('https://hosts.nfz.moe/full/hosts');
|
||||
|
||||
$arr_result = makeAddr::get_domain_list($host1);
|
||||
echo '开始下载host2....',"\n";
|
||||
$host2 = makeAddr::http_get('https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt');
|
||||
|
||||
$arr_result = array_merge_recursive($arr_result, makeAddr::get_domain_list($host2));
|
||||
//echo '开始下载host2....',"\n";
|
||||
//$host2 = makeAddr::http_get('https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt');
|
||||
//$arr_result = array_merge_recursive($arr_result, makeAddr::get_domain_list($host2));
|
||||
|
||||
echo '开始下载host3....',"\n";
|
||||
$host3 = makeAddr::http_get('http://www.malwaredomainlist.com/hostslist/hosts.txt');
|
||||
@ -94,7 +93,9 @@ class makeAddr{
|
||||
}
|
||||
$line = strtolower(preg_replace('/[\s\t]+/', "/", $line));
|
||||
|
||||
if((strpos($line, '127.0.0.1') === false) && (strpos($line, '0.0.0.0') === false)){
|
||||
if((strpos($line, '127.0.0.1') === false) &&
|
||||
(strpos($line, '::') === false) &&
|
||||
(strpos($line, '0.0.0.0') === false)){
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -113,7 +114,8 @@ class makeAddr{
|
||||
public static function write_to_conf($arr_result, $str_file){
|
||||
|
||||
$fp = fopen($str_file, 'w');
|
||||
$write_len = 0;
|
||||
$write_len = fwrite($fp, '#Date:' . date('YmdHis'). "\n");
|
||||
|
||||
foreach($arr_result as $rk => $rv){
|
||||
if(array_key_exists($rk, $GLOBALS['arr_blacklist'])){//黑名单操作
|
||||
foreach($GLOBALS['arr_blacklist'][$rk] as $bv){
|
||||
|
Loading…
Reference in New Issue
Block a user