mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Feat: legacy Clash Premium support
This commit is contained in:
@@ -84,7 +84,7 @@ export class ClashIPSet extends BaseWriteStrategy {
|
||||
}
|
||||
|
||||
export class ClashClassicRuleSet extends BaseWriteStrategy {
|
||||
public readonly name = 'clash classic ruleset';
|
||||
public readonly name: string = 'clash classic ruleset';
|
||||
|
||||
readonly fileExtension = 'txt';
|
||||
|
||||
|
||||
18
Build/lib/writing-strategy/legacy-clash-premium.ts
Normal file
18
Build/lib/writing-strategy/legacy-clash-premium.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user