feat: profile enhanced mode

This commit is contained in:
GyDi
2022-03-06 14:59:25 +08:00
parent 08dd73fd72
commit 4707e2b02a
10 changed files with 292 additions and 63 deletions

View File

@@ -124,14 +124,32 @@ export namespace CmdType {
system_proxy_bypass?: string;
}
export type ProfileMerge = Record<string, any>;
// partial of the clash config
export type ProfileData = Partial<{
rules: any[];
proxies: any[];
"proxy-groups": any[];
"proxy-providers": any[];
"rule-providers": any[];
}>;
export interface ChainItem {
item: ProfileItem;
merge?: object;
merge?: ProfileMerge;
script?: string;
}
export interface EnhancedPayload {
chain: ChainItem[];
current: object;
current: ProfileData;
callback: string;
}
export interface EnhancedResult {
data: ProfileData;
status: string;
error?: string;
}
}