update the system proxy after modifying the mixed port

This commit is contained in:
pompurin404 2024-08-25 10:04:51 +08:00
parent 3fddabe5c2
commit cf91a0932e
No known key found for this signature in database
2 changed files with 8 additions and 12 deletions

View File

@ -1,10 +1,3 @@
### New Features
- 支持删除 Webdav 备份文件
- Windows 绕过UAC弹窗
- Esc关闭窗口
### Bug Fixes
- 修复拨号网络系统代理问题
- 尝试修复部分白屏问题
- 修改混合端口后系统代理没有更新

View File

@ -7,7 +7,7 @@ import { useControledMihomoConfig } from '@renderer/hooks/use-controled-mihomo-c
import { platform } from '@renderer/utils/init'
import { FaNetworkWired } from 'react-icons/fa'
import { IoMdCloudDownload } from 'react-icons/io'
import { mihomoUpgrade, restartCore } from '@renderer/utils/ipc'
import { mihomoUpgrade, restartCore, triggerSysProxy } from '@renderer/utils/ipc'
import React, { useState } from 'react'
import InterfaceModal from '@renderer/components/mihomo/interface-modal'
@ -18,7 +18,7 @@ const CoreMap = {
const Mihomo: React.FC = () => {
const { appConfig, patchAppConfig } = useAppConfig()
const { core = 'mihomo', maxLogDays = 7 } = appConfig || {}
const { core = 'mihomo', maxLogDays = 7, sysProxy } = appConfig || {}
const { controledMihomoConfig, patchControledMihomoConfig } = useControledMihomoConfig()
const {
ipv6,
@ -114,8 +114,11 @@ const Mihomo: React.FC = () => {
size="sm"
color="primary"
className="mr-2"
onPress={() => {
onChangeNeedRestart({ 'mixed-port': mixedPortInput })
onPress={async () => {
await onChangeNeedRestart({ 'mixed-port': mixedPortInput })
if (sysProxy?.enable) {
triggerSysProxy(true)
}
}}
>