From 85a324b4280c78314148658dfe74c6d63940a917 Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Sat, 10 Aug 2024 18:16:33 +0800 Subject: [PATCH] support yaml anchor --- src/main/utils/ipc.ts | 2 +- src/renderer/src/pages/proxies.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/utils/ipc.ts b/src/main/utils/ipc.ts index fed3136..ac4055d 100644 --- a/src/main/utils/ipc.ts +++ b/src/main/utils/ipc.ts @@ -111,7 +111,7 @@ function getRuntimeConfigStr(): string { return fs.readFileSync(mihomoWorkConfigPath(), 'utf8') } -function getRuntimeConfig(): Record { +function getRuntimeConfig(): IMihomoConfig { return yaml.parse(getRuntimeConfigStr()) } diff --git a/src/renderer/src/pages/proxies.tsx b/src/renderer/src/pages/proxies.tsx index 74b1437..94b1fe7 100644 --- a/src/renderer/src/pages/proxies.tsx +++ b/src/renderer/src/pages/proxies.tsx @@ -30,6 +30,7 @@ const Proxies: React.FC = () => { const groups: IMihomoGroup[] = [] if (proxies && proxies.proxies) { runtime?.['proxy-groups']?.forEach((group: { name: string; url?: string }) => { + group = Object.assign(group, group['<<']) const { name, url } = group if ( proxies.proxies[name] &&