feat(network): auto-detect system proxy and keep user overrides

This commit is contained in:
lzt404 committed 2026-09-18 18:17:31 +08:00
1 parent a372a819f8
commit 050dbddca4
15 files changed
+1109 -43

No files matched your search

+1 -1
View File
@@ -670,7 +670,7 @@ export const jaOverrides = {
'config.network.listenHostHint': '例: 127.0.0.1、0.0.0.0、または LAN IP。変更すると実行中のコアが再起動します',
'config.network.proxyUrl': 'プロキシ URL',
'config.network.proxyPlaceholder': '例:socks5://127.0.0.1:7890',
'config.network.proxyHint': 'SOCKS プロトコルと HTTP プロトコルに対応しています',
'config.network.proxyHint': '手動入力できます。空欄の場合はシステムプロキシを使います。未検出なら空欄のままです。HTTP と SOCKS に対応しています。',
'config.network.sessionAffinity': 'セッションアフィニティ',
'config.network.sessionAffinityHint': '同じセッションでは以前選択した認証情報を優先します',
'config.network.sessionTtl': 'セッションアフィニティ TTL',
+1 -1
View File
@@ -701,7 +701,7 @@ export const en: Record<MessageKey, string> = {
'config.network.listenHostHint': 'For example, 127.0.0.1, 0.0.0.0, or a LAN IP; changing it restarts a running core',
'config.network.proxyUrl': 'Proxy URL',
'config.network.proxyPlaceholder': 'For example, socks5://127.0.0.1:7890',
'config.network.proxyHint': 'Supports SOCKS and HTTP protocols',
'config.network.proxyHint': 'You can enter a proxy URL. Leave it empty to use the system proxy, or none if none is detected. Supports HTTP and SOCKS.',
'config.network.sessionAffinity': 'Session Affinity',
'config.network.sessionAffinityHint': 'Prefer the previously selected credential for the same session',
'config.network.sessionTtl': 'Session Affinity TTL',
+1 -1
View File
@@ -700,7 +700,7 @@ export const zhCN = {
'config.network.listenHostHint': '例如 127.0.0.1、0.0.0.0 或局域网 IP;修改后会重启运行中的内核',
'config.network.proxyUrl': '代理 URL',
'config.network.proxyPlaceholder': '例如 socks5://127.0.0.1:7890',
'config.network.proxyHint': '支持socks协议与http协议',
'config.network.proxyHint': '可手动填写;留空则自动读取系统代理,没有就不填。支持 HTTP 与 SOCKS。',
'config.network.sessionAffinity': '会话粘性路由',
'config.network.sessionAffinityHint': '同一会话优先复用已选择的凭据',
'config.network.sessionTtl': '会话粘性 TTL',
+3 -1
View File
@@ -720,7 +720,9 @@ export function ConfigPanelPage() {
setBusyAction('network');
try {
const result = await invoke<CoreConfigSettings>('save_network_endpoint_settings', {
settings: { host, port, proxyUrl },
settings: networkDraftDirtyRef.current.proxyUrl
? { host, port, proxyUrl }
: { host, port },
});
clearDraftDirty('host');
clearDraftDirty('port');