@@ -416,10 +494,30 @@ function SettingsPage({ session, onLogout }: { session: SessionView; onLogout: (
{readiness ?
操作系统{readiness.platform}
- wg 命令{readiness.wg_found ? 'PATH 中已发现' : 'PATH 中未发现'}
- wg-quick 命令{readiness.wg_quick_found ? 'PATH 中已发现' : 'PATH 中未发现'}
+ 隧道引擎{readiness.engine_mode === 'system_tools' ? '系统工具模式' : '当前不可用'}
+ wg 命令{readiness.wg_found ? '已找到' : '未找到'}
+ wg-quick 命令{readiness.wg_quick_found ? '已找到' : '未找到'}
: {readinessError || '正在检测本机环境…'}
}
- 建立隧道时系统会弹出提权授权;Windows 暂请使用 WireGuard 官方客户端导入配置。
+ {readiness && {readiness.engine_detail}
}
+ {readiness && (!readiness.wg_found || !readiness.wg_quick_found) && readiness.platform !== 'windows' &&
+
安装 WireGuard 工具
+
{readiness.platform === 'macos' ? '在终端运行 brew install wireguard-tools。' : '请按发行版安装 wireguard-tools(Ubuntu / Debian:sudo apt install wireguard-tools)。'}
+
+
}
+ 建立隧道时系统会弹出提权授权;Windows 桌面隧道暂不支持,请使用 WireGuard 官方客户端。
+
+
Go 隧道出口诊断
+
通过当前设备的 WireGuard 参数连接公网 TCP,不修改本机路由或 DNS;这项检查不代表系统 VPN 已连接。测试线路需授权公网路由,网关需开启出口 NAT。
+
+ {probeResult &&
{probeResult}
}
+
+
+
本地 SOCKS5 代理(试用)
+
通过内置 Go WireGuard 隧道为已配置代理的应用提供连接,不修改系统路由或 DNS。应用代理地址:socks5h://127.0.0.1:18743;使用 socks5h 才会经 VPN 解析域名。线路须允许目标公网路由并开启网关 NAT。
+
+ {proxyRunning &&
本地代理正在运行;只有主动配置此代理的应用会走 VPN。
}
+ {proxyError &&
{proxyError}
}
+
}
diff --git a/client/src/platform.ts b/client/src/platform.ts
index c4c214e..47cddee 100644
--- a/client/src/platform.ts
+++ b/client/src/platform.ts
@@ -1,7 +1,13 @@
import { invoke } from '@tauri-apps/api/core'
export type ServerHealth = { address: string; reachable: boolean }
-export type SystemReadiness = { platform: string; wg_found: boolean; wg_quick_found: boolean }
+export type SystemReadiness = {
+ platform: string
+ wg_found: boolean
+ wg_quick_found: boolean
+ engine_mode: 'system_tools' | 'unsupported'
+ engine_detail: string
+}
export type Line = {
tunnel_id: number
@@ -40,6 +46,8 @@ export type DeviceStatus = {
detail?: string | null
}
+export type ProbeResult = { connected: boolean; detail: string; target: string }
+
export type StatusView = { conn: ConnState; server: DeviceStatus | null }
export type DeviceInfo = {
@@ -93,6 +101,22 @@ export function clientStatus(): Promise