feat: refactor

This commit is contained in:
GyDi
2022-08-12 03:20:55 +08:00
parent 178fd8e828
commit 7f6dac4271
22 changed files with 320 additions and 778 deletions

42
src/utils/clash-fields.ts Normal file
View File

@@ -0,0 +1,42 @@
export const HANDLE_FIELDS = [
"port",
"socks-port",
"mixed-port",
"allow-lan",
"mode",
"log-level",
"ipv6",
"secret",
"external-controller",
];
export const DEFAULT_FIELDS = [
"rules",
"proxies",
"proxy-groups",
"proxy-providers",
"rule-providers",
] as const;
export const OTHERS_FIELDS = [
"tun",
"dns",
"ebpf",
"hosts",
"script",
"profile",
"payload",
"auto-redir",
"experimental",
"interface-name",
"routing-mark",
"redir-port",
"tproxy-port",
"iptables",
"external-ui",
"bind-address",
"authentication",
"sniffer", // meta
"geodata-mode", // meta
"tcp-concurrent", // meta
] as const;