Perf: improve processLine performance

This commit is contained in:
SukkaW
2025-01-20 22:52:29 +08:00
parent 6cb410bc98
commit 1ce322a71c
3 changed files with 30 additions and 22 deletions

View File

@@ -1,12 +1,3 @@
// const unsupported = Symbol('unsupported');
// https://sing-box.sagernet.org/configuration/rule-set/source-format/
// export const PROCESSOR: Record<string, ((raw: string, type: string, value: string) => [key: keyof SingboxHeadlessRule, value: Required<SingboxHeadlessRule>[keyof SingboxHeadlessRule][number]] | null) | typeof unsupported> = {
// 'IP-ASN': unsupported,
// 'URL-REGEX': unsupported,
// 'USER-AGENT': unsupported
// };
interface SingboxHeadlessRule {
domain?: string[],
domain_suffix?: string[],