mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Chore: minor changes
This commit is contained in:
@@ -290,7 +290,7 @@ export class Cache<S = string> {
|
||||
// Most assets can be downloaded within 250ms. To avoid wasting bandwidth, we will wait for 500ms before downloading from the fallback URL.
|
||||
if (index > 0) {
|
||||
try {
|
||||
await sleepWithAbort(300 + (index + 1) * 10, controller.signal);
|
||||
await sleepWithAbort(100 + (index + 1) * 10, controller.signal);
|
||||
} catch {
|
||||
console.log(picocolors.gray('[fetch cancelled early]'), picocolors.gray(url));
|
||||
throw new CustomAbortError();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { OUTPUT_CLASH_DIR, OUTPUT_MODULES_DIR, OUTPUT_SINGBOX_DIR, OUTPUT_SURGE_DIR } from '../../constants/dir';
|
||||
import type { Span } from '../../trace';
|
||||
import { createTrie } from '../trie';
|
||||
import { HostnameSmolTrie } from '../trie';
|
||||
import stringify from 'json-stringify-pretty-compact';
|
||||
import path from 'node:path';
|
||||
import { withBannerArray } from '../misc';
|
||||
@@ -12,7 +12,7 @@ import { readFileByLine } from '../fetch-text-by-line';
|
||||
import { asyncWriteToStream } from '../async-write-to-stream';
|
||||
|
||||
export abstract class RuleOutput<TPreprocessed = unknown> {
|
||||
protected domainTrie = createTrie(null, true);
|
||||
protected domainTrie = new HostnameSmolTrie(null);
|
||||
protected domainKeywords = new Set<string>();
|
||||
protected domainWildcard = new Set<string>();
|
||||
protected userAgent = new Set<string>();
|
||||
|
||||
Reference in New Issue
Block a user