feat: modes list for sing-box offical (#1182)

This commit is contained in:
Zephyruso 2024-11-24 15:01:48 +08:00 committed by GitHub
parent 8c615f231e
commit 1ca89fb6c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -232,9 +232,11 @@ const ConfigForm: ParentComponent<{
}
})
const modes = createMemo(
() => configsData()?.modes || ['rule', 'direct', 'global'],
)
const modes = createMemo(() => {
const cfg = configsData()
return cfg?.['mode-list'] || cfg?.modes || ['rule', 'direct', 'global']
})
return (
<div class="flex flex-col gap-4">

View File

@ -119,6 +119,9 @@ export type LogWithSeq = Log & { seq: number }
export type Config = {
mode: string
// sing-box added
'mode-list': string[]
// sing-box-p added
modes?: string[]
port: number
'socks-port': number