mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Update CDN & Phishing & AI Hosts
This commit is contained in:
@@ -37,7 +37,7 @@ const normalizeDomain = (domain: string) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
export async function processDomainLists(domainListsUrl: string | URL) {
|
||||
export async function processDomainLists(domainListsUrl: string | URL, includeAllSubDomain = false) {
|
||||
if (typeof domainListsUrl === 'string') {
|
||||
domainListsUrl = new URL(domainListsUrl);
|
||||
}
|
||||
@@ -55,7 +55,11 @@ export async function processDomainLists(domainListsUrl: string | URL) {
|
||||
foundDebugDomain = true;
|
||||
}
|
||||
|
||||
domainSets.add(domainToAdd);
|
||||
if (includeAllSubDomain) {
|
||||
domainSets.add(`.${domainToAdd}`);
|
||||
} else {
|
||||
domainSets.add(domainToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
return domainSets;
|
||||
|
||||
Reference in New Issue
Block a user