mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-14 02:00:37 +08:00
Fix: proper reject hosts generation
This commit is contained in:
parent
d75924e885
commit
9a0c8b5919
@ -477,10 +477,11 @@ function parse($line: string, gorhill: PublicSuffixList, result: [string, ParseT
|
|||||||
if (domain) {
|
if (domain) {
|
||||||
result[0] = domain;
|
result[0] = domain;
|
||||||
result[1] = whiteIncludeAllSubDomain ? ParseType.WhiteIncludeSubdomain : ParseType.WhiteAbsolute;
|
result[1] = whiteIncludeAllSubDomain ? ParseType.WhiteIncludeSubdomain : ParseType.WhiteAbsolute;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
result[0] = `[parse-filter E0001] (white) invalid domain: ${JSON.stringify({
|
result[0] = `[parse-filter E0001] (white) invalid domain: ${JSON.stringify({
|
||||||
line, sliced, sliceStart, sliceEnd
|
line, sliced, sliceStart, sliceEnd, domain
|
||||||
})}`;
|
})}`;
|
||||||
result[1] = ParseType.ErrorMessage;
|
result[1] = ParseType.ErrorMessage;
|
||||||
return result;
|
return result;
|
||||||
@ -557,9 +558,10 @@ function parse($line: string, gorhill: PublicSuffixList, result: [string, ParseT
|
|||||||
if (domain) {
|
if (domain) {
|
||||||
result[0] = domain;
|
result[0] = domain;
|
||||||
result[1] = ParseType.BlackIncludeSubdomain;
|
result[1] = ParseType.BlackIncludeSubdomain;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
result[0] = `[paparse-filter E0003] (black) invalid domain: ${sliced}`;
|
result[0] = `[parse-filter E0003] (black) invalid domain: ${JSON.stringify({ sliced, domain })}`;
|
||||||
result[1] = ParseType.ErrorMessage;
|
result[1] = ParseType.ErrorMessage;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -521,6 +521,7 @@ DOMAIN-SUFFIX,msstatic.com
|
|||||||
DOMAIN-SUFFIX,mubu.com
|
DOMAIN-SUFFIX,mubu.com
|
||||||
DOMAIN-SUFFIX,myzaker.com
|
DOMAIN-SUFFIX,myzaker.com
|
||||||
DOMAIN-SUFFIX,neea.cn
|
DOMAIN-SUFFIX,neea.cn
|
||||||
|
DOMAIN-SUFFIX,ntp.org.cn
|
||||||
DOMAIN-SUFFIX,nubia.cn
|
DOMAIN-SUFFIX,nubia.cn
|
||||||
DOMAIN-SUFFIX,nubia.com
|
DOMAIN-SUFFIX,nubia.com
|
||||||
DOMAIN,ocsp.digicert.cn
|
DOMAIN,ocsp.digicert.cn
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user