mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 09:10:35 +08:00
Chore: minor changes
This commit is contained in:
parent
257499f5e8
commit
acad137167
@ -6,6 +6,7 @@ import { dummySpan, printTraceResult } from '../trace';
|
||||
import type { Span } from '../trace';
|
||||
import { appendArrayInPlaceCurried } from './append-array-in-place';
|
||||
import { PHISHING_DOMAIN_LISTS_EXTRA, PHISHING_HOSTS_EXTRA } from '../constants/reject-data-source';
|
||||
import type { TldTsParsed } from './normalize-domain';
|
||||
|
||||
const downloads = [
|
||||
...PHISHING_DOMAIN_LISTS_EXTRA.map(entry => processDomainListsWithPreload(...entry)),
|
||||
@ -43,6 +44,7 @@ const pool = new Worktank({
|
||||
let tld: string | null = '';
|
||||
let apexDomain: string | null = '';
|
||||
let subdomain: string | null = '';
|
||||
let parsed: TldTsParsed;
|
||||
|
||||
// const set = new Set<string>();
|
||||
// let duplicateCount = 0;
|
||||
@ -56,7 +58,7 @@ const pool = new Worktank({
|
||||
// set.add(line);
|
||||
// }
|
||||
|
||||
const parsed = tldts.parse(line, loosTldOptWithPrivateDomains);
|
||||
parsed = tldts.parse(line, loosTldOptWithPrivateDomains);
|
||||
if (parsed.isPrivate) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import tldts from 'tldts';
|
||||
import { normalizeTldtsOpt } from '../constants/loose-tldts-opt';
|
||||
import { isProbablyIpv4, isProbablyIpv6 } from 'foxts/is-probably-ip';
|
||||
|
||||
type TldTsParsed = ReturnType<typeof tldts.parse>;
|
||||
export type TldTsParsed = ReturnType<typeof tldts.parse>;
|
||||
|
||||
/**
|
||||
* Skipped the input non-empty check, the `domain` should not be empty.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user