Skip to content

Commit

Permalink
fixed domains checker bug. privacy-protection-tools#149
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlyxu committed Jun 11, 2020
1 parent 73b590e commit 7849a0e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
5 changes: 2 additions & 3 deletions adblock-for-dnsmasq.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#TITLE=anti-AD
#VER=20200610142732
#VER=20200611014336
#URL=https://github.com/privacy-protection-tools/anti-AD
#TOTAL_LINES=34665
#TOTAL_LINES=34664
address=/00-gov.cn/
address=/kwcdn.000dn.com/
address=/kwcscdn.000dn.com/
Expand Down Expand Up @@ -5330,7 +5330,6 @@ address=/mgzs.cdn.bcebos.com/
address=/ys2000.cdn.bcebos.com/
address=/cpu-baidu-com-block.cdn.bcebos.com/
address=/dd713.bj.bcebos.com/
address=/fc-.cdn.bcebos.com/
address=/hzyd.cdn.bcebos.com/
address=/tob-cms.bj.bcebos.com/
address=/vv84.bj.bcebos.com/
Expand Down
5 changes: 2 additions & 3 deletions anti-ad-domains.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#TITLE=anti-AD
#VER=20200610142732
#VER=20200611014336
#URL=https://github.com/privacy-protection-tools/anti-AD
#TOTAL_LINES=39799
#TOTAL_LINES=39798
00-gov.cn
kwcdn.000dn.com
kwcscdn.000dn.com
Expand Down Expand Up @@ -6383,7 +6383,6 @@ mgzs.cdn.bcebos.com
ys2000.cdn.bcebos.com
cpu-baidu-com-block.cdn.bcebos.com
dd713.bj.bcebos.com
fc-.cdn.bcebos.com
hzyd.cdn.bcebos.com
tob-cms.bj.bcebos.com
vv84.bj.bcebos.com
Expand Down
5 changes: 2 additions & 3 deletions anti-ad-easylist.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!TITLE=anti-AD
!VER=20200610142732
!VER=20200611014336
!URL=https://github.com/privacy-protection-tools/anti-AD
!TOTAL_LINES=32921
!TOTAL_LINES=32920
||*serror*.wo.com.cn^
||201*.myhard.com^
||8*.tianya.cn^
Expand Down Expand Up @@ -4973,7 +4973,6 @@
||ys2000.cdn.bcebos.com^
||cpu-baidu-com-block.cdn.bcebos.com^
||dd713.bj.bcebos.com^
||fc-.cdn.bcebos.com^
||hzyd.cdn.bcebos.com^
||tob-cms.bj.bcebos.com^
||vv84.bj.bcebos.com^
Expand Down
5 changes: 2 additions & 3 deletions anti-ad-smartdns.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#TITLE=anti-AD for SmartDNS
#VER=20200610142732
#VER=20200611014336
#URL=https://github.com/privacy-protection-tools/anti-AD
#TOTAL_LINES=34665
#TOTAL_LINES=34664
address /00-gov.cn/#
address /kwcdn.000dn.com/#
address /kwcscdn.000dn.com/#
Expand Down Expand Up @@ -5330,7 +5330,6 @@ address /mgzs.cdn.bcebos.com/#
address /ys2000.cdn.bcebos.com/#
address /cpu-baidu-com-block.cdn.bcebos.com/#
address /dd713.bj.bcebos.com/#
address /fc-.cdn.bcebos.com/#
address /hzyd.cdn.bcebos.com/#
address /tob-cms.bj.bcebos.com/#
address /vv84.bj.bcebos.com/#
Expand Down
5 changes: 2 additions & 3 deletions anti-ad-surge.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#TITLE=anti-AD
#VER=20200610142732
#VER=20200611014336
#URL=https://github.com/privacy-protection-tools/anti-AD
#TOTAL_LINES=34665
#TOTAL_LINES=34664
DOMAIN-SUFFIX,00-gov.cn
DOMAIN-SUFFIX,kwcdn.000dn.com
DOMAIN-SUFFIX,kwcscdn.000dn.com
Expand Down Expand Up @@ -5330,7 +5330,6 @@ DOMAIN-SUFFIX,mgzs.cdn.bcebos.com
DOMAIN-SUFFIX,ys2000.cdn.bcebos.com
DOMAIN-SUFFIX,cpu-baidu-com-block.cdn.bcebos.com
DOMAIN-SUFFIX,dd713.bj.bcebos.com
DOMAIN-SUFFIX,fc-.cdn.bcebos.com
DOMAIN-SUFFIX,hzyd.cdn.bcebos.com
DOMAIN-SUFFIX,tob-cms.bj.bcebos.com
DOMAIN-SUFFIX,vv84.bj.bcebos.com
Expand Down
2 changes: 1 addition & 1 deletion lib/addressMaker.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function extract_main_domain($str_domain){
return "";
}

$str_reg = '/^(?:(?:[a-z0-9\-]+\.)*?|\.)?([a-z0-9\-]+(';
$str_reg = '/^(?:(?:[a-z0-9\-]*[a-z0-9]\.)*?|\.)?([a-z0-9\-]*[a-z0-9](';
/************start CN域名的特殊处理规则,其中包括了各行政区特别后缀的cn域名*****************************/
$str_reg .= '\.ac\.cn|\.ah\.cn|\.bj\.cn|\.com\.cn|\.cq\.cn|\.fj\.cn|\.gd\.cn|\.gov\.cn|\.gs\.cn';
$str_reg .= '|\.gx\.cn|\.gz\.cn|\.ha\.cn|\.hb\.cn|\.he\.cn|\.hi\.cn|\.hk\.cn|\.hl\.cn|\.hn\.cn';
Expand Down

0 comments on commit 7849a0e

Please sign in to comment.