Skip to content

Commit

Permalink
use unix socket and namedpipe instead of http api
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Sep 27, 2024
1 parent 4932b5b commit 8c13d07
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 193 deletions.
4 changes: 0 additions & 4 deletions src/main/config/controledMihomo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { controledMihomoConfigPath } from '../utils/dirs'
import { readFile, writeFile } from 'fs/promises'
import yaml from 'yaml'
import { getAxios } from '../core/mihomoApi'
import { generateProfile } from '../core/factory'
import { getAppConfig } from './app'
import { defaultControledMihomoConfig } from '../utils/template'
Expand Down Expand Up @@ -52,9 +51,6 @@ export async function patchControledMihomoConfig(patch: Partial<IMihomoConfig>):
if (process.platform === 'darwin') {
delete controledMihomoConfig?.tun?.device
}
if (patch['external-controller'] || patch.secret) {
await getAxios(true)
}
await generateProfile()
await writeFile(controledMihomoConfigPath(), yaml.stringify(controledMihomoConfig), 'utf-8')
}
Loading

0 comments on commit 8c13d07

Please sign in to comment.