disable external-controller by default

This commit is contained in:
pompurin404 2024-09-30 23:18:55 +08:00
parent 04706eb9de
commit b16d0186a1
No known key found for this signature in database
2 changed files with 5 additions and 0 deletions

View File

@ -153,6 +153,7 @@ async function migration(): Promise<void> {
const { const {
'external-controller-pipe': externalControllerPipe, 'external-controller-pipe': externalControllerPipe,
'external-controller-unix': externalControllerUnix, 'external-controller-unix': externalControllerUnix,
'external-controller': externalController,
'skip-auth-prefixes': skipAuthPrefixes, 'skip-auth-prefixes': skipAuthPrefixes,
authentication, authentication,
'bind-address': bindAddress, 'bind-address': bindAddress,
@ -204,6 +205,9 @@ async function migration(): Promise<void> {
'external-controller-pipe': '\\\\.\\pipe\\MihomoParty\\mihomo' 'external-controller-pipe': '\\\\.\\pipe\\MihomoParty\\mihomo'
}) })
} }
if (externalController === undefined) {
await patchControledMihomoConfig({ 'external-controller': '' })
}
} }
function initDeeplink(): void { function initDeeplink(): void {

View File

@ -38,6 +38,7 @@ export const defaultConfig: IAppConfig = {
export const defaultControledMihomoConfig: Partial<IMihomoConfig> = { export const defaultControledMihomoConfig: Partial<IMihomoConfig> = {
'external-controller-pipe': '\\\\.pipe\\MihomoParty\\mihomo', 'external-controller-pipe': '\\\\.pipe\\MihomoParty\\mihomo',
'external-controller-unix': '/tmp/mihomo-party.sock', 'external-controller-unix': '/tmp/mihomo-party.sock',
'external-controller': '',
ipv6: true, ipv6: true,
mode: 'rule', mode: 'rule',
'mixed-port': 7890, 'mixed-port': 7890,