mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Chore: create rule set / Add China IP sing-box
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
// @ts-check
|
||||
import { defaultRequestInit, fetchWithRetry } from './lib/fetch-retry';
|
||||
import { createReadlineInterfaceFromResponse } from './lib/fetch-text-by-line';
|
||||
import path from 'path';
|
||||
import { isProbablyIpv4, isProbablyIpv6 } from './lib/is-fast-ip';
|
||||
import { processLine } from './lib/process-line';
|
||||
import { createRuleset } from './lib/create-file';
|
||||
import { task } from './trace';
|
||||
import { SHARED_DESCRIPTION } from './lib/constants';
|
||||
import { createMemoizedPromise } from './lib/memo-promise';
|
||||
import { output } from './lib/misc';
|
||||
|
||||
export const getTelegramCIDRPromise = createMemoizedPromise(async () => {
|
||||
const resp = await fetchWithRetry('https://core.telegram.org/resources/cidr.txt', defaultRequestInit);
|
||||
@@ -52,8 +52,6 @@ export const buildTelegramCIDR = task(require.main === module, __filename)(async
|
||||
date,
|
||||
results,
|
||||
'ruleset',
|
||||
path.resolve(__dirname, '../List/ip/telegram.conf'),
|
||||
path.resolve(__dirname, '../Clash/ip/telegram.txt'),
|
||||
path.resolve(__dirname, '../sing-box/ip/telegram.json')
|
||||
...output('telegram', 'ip')
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user