fix: preserve custom TUN fields and sync service provider caches

Limit GUI authority to saved TUN fields while preserving custom overrides.

Sync provider caches after service startup, reloads and updates.
Publish copies atomically with session, runtime and cache metadata checks.
This commit is contained in:
wonfen
2026-09-11 20:44:58 +08:00
parent 82d76113f2
commit bea03e1a09
13 changed files with 615 additions and 53 deletions
+3
View File
@@ -23,6 +23,7 @@ import { useTranslation } from 'react-i18next'
import { updateProxyProvider } from 'tauri-plugin-mihomo-api'
import { useAppRefreshers, useProxiesData } from '@/providers/app-data-context'
import { syncRuntimeProviders } from '@/services/cmds'
import { showNotice } from '@/services/notice-service'
import parseTraffic from '@/utils/parse-traffic'
@@ -59,6 +60,7 @@ export const ProviderButton = () => {
await updateProxyProvider(name)
await refreshProxy()
void syncRuntimeProviders()
showNotice.success(
'proxies.feedback.notifications.provider.updateSuccess',
@@ -103,6 +105,7 @@ export const ProviderButton = () => {
}
await refreshProxy()
void syncRuntimeProviders()
showNotice.success('proxies.feedback.notifications.provider.allUpdated')
} catch (err) {