diff --git a/src/main/utils/init.ts b/src/main/utils/init.ts index a39a801..8151f0a 100644 --- a/src/main/utils/init.ts +++ b/src/main/utils/init.ts @@ -153,6 +153,7 @@ async function migration(): Promise { const { 'external-controller-pipe': externalControllerPipe, 'external-controller-unix': externalControllerUnix, + 'external-controller': externalController, 'skip-auth-prefixes': skipAuthPrefixes, authentication, 'bind-address': bindAddress, @@ -204,6 +205,9 @@ async function migration(): Promise { 'external-controller-pipe': '\\\\.\\pipe\\MihomoParty\\mihomo' }) } + if (externalController === undefined) { + await patchControledMihomoConfig({ 'external-controller': '' }) + } } function initDeeplink(): void { diff --git a/src/main/utils/template.ts b/src/main/utils/template.ts index dcf0c4b..a5097fb 100644 --- a/src/main/utils/template.ts +++ b/src/main/utils/template.ts @@ -38,6 +38,7 @@ export const defaultConfig: IAppConfig = { export const defaultControledMihomoConfig: Partial = { 'external-controller-pipe': '\\\\.pipe\\MihomoParty\\mihomo', 'external-controller-unix': '/tmp/mihomo-party.sock', + 'external-controller': '', ipv6: true, mode: 'rule', 'mixed-port': 7890,