Refactor: deprecate SSPanel appprofile.php output

This commit is contained in:
SukkaW
2026-03-30 01:41:27 +08:00
parent 26bb97a9b9
commit 2bbfb15db0
8 changed files with 12 additions and 313 deletions

View File

@@ -1,19 +1,16 @@
import { fetchRemoteTextByLine } from './lib/fetch-text-by-line';
import { task } from './trace';
import { once } from 'foxts/once';
import { IPListOutput } from './lib/rules/ip';
import { createFileDescription } from './constants/description';
export const getChnCidrPromise = once(async function getChnCidr() {
return Promise.all([
fetchRemoteTextByLine('https://chnroutes2.cdn.skk.moe/chnroutes.txt', true).then(Array.fromAsync<string>),
fetchRemoteTextByLine('https://gaoyifan.github.io/china-operator-ip/china6.txt', true).then(Array.fromAsync<string>)
]);
});
const getChnCidrPromise = Promise.all([
fetchRemoteTextByLine('https://chnroutes2.cdn.skk.moe/chnroutes.txt', true).then(Array.fromAsync<string>),
fetchRemoteTextByLine('https://gaoyifan.github.io/china-operator-ip/china6.txt', true).then(Array.fromAsync<string>)
]);
export const buildChnCidr = task(require.main === module, __filename)(async (span) => {
const [filteredCidr4, cidr6] = await span.traceChildAsync('download chnroutes2', getChnCidrPromise);
const [filteredCidr4, cidr6] = await span.traceChildPromise('download chnroutes2', getChnCidrPromise);
// Can not use SHARED_DESCRIPTION here as different license
const description = createFileDescription('CC BY-SA 2.0');