Feat: legacy Clash Premium support

This commit is contained in:
SukkaW
2025-04-29 21:54:41 +08:00
parent 6453a5b025
commit 70c5625199
6 changed files with 27 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
import { noop } from 'foxts/noop';
import { OUTPUT_LEAGCY_CLASH_PREMIUM } from '../../constants/dir';
import { ClashClassicRuleSet } from './clash';
export class LegacyClashPremiumRuleSet extends ClashClassicRuleSet {
public override readonly name = 'legacy clash premium ruleset';
readonly fileExtension = 'txt';
protected result: string[] = ['DOMAIN,this_ruleset_is_made_by_sukkaw.ruleset.skk.moe'];
constructor(public readonly type: 'ip' | 'non_ip' /* | (string & {}) */, public readonly outputDir = OUTPUT_LEAGCY_CLASH_PREMIUM) {
super(type, outputDir);
}
override writeDomainWildcards = noop;
override writeIpAsns = noop;
}