mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-28 05:30:29 +08:00
support yaml anchor
This commit is contained in:
parent
f7f8dc188a
commit
85a324b428
@ -111,7 +111,7 @@ function getRuntimeConfigStr(): string {
|
|||||||
return fs.readFileSync(mihomoWorkConfigPath(), 'utf8')
|
return fs.readFileSync(mihomoWorkConfigPath(), 'utf8')
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRuntimeConfig(): Record<string, unknown> {
|
function getRuntimeConfig(): IMihomoConfig {
|
||||||
return yaml.parse(getRuntimeConfigStr())
|
return yaml.parse(getRuntimeConfigStr())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,6 +30,7 @@ const Proxies: React.FC = () => {
|
|||||||
const groups: IMihomoGroup[] = []
|
const groups: IMihomoGroup[] = []
|
||||||
if (proxies && proxies.proxies) {
|
if (proxies && proxies.proxies) {
|
||||||
runtime?.['proxy-groups']?.forEach((group: { name: string; url?: string }) => {
|
runtime?.['proxy-groups']?.forEach((group: { name: string; url?: string }) => {
|
||||||
|
group = Object.assign(group, group['<<'])
|
||||||
const { name, url } = group
|
const { name, url } = group
|
||||||
if (
|
if (
|
||||||
proxies.proxies[name] &&
|
proxies.proxies[name] &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user