Skip to content

feat: RemoteWireGuardManager – WireGuard VPN 管理组件 #84

Description

@MaxWillsoon

特性请求:WireGuard VPN 管理器

在远程桌面中增加 WireGuard VPN 接口和对端可视化管理的组件。

动机

WireGuard 是 Linux 服务器上最流行的 VPN 实现,常用于多云互联、远程办公、容器间通信。但目前管理 WG 接口仍需 SSH 进去敲 wg show / wg-quick / 编辑 conf 文件,缺少图形化界面。

功能范围

P0 — 核心

  • 列出所有 WG 接口(wg0, wg1...),显示接口状态、公钥、监听端口、传输量
  • 查看每个接口下的对端列表(公钥、端点、允许 IP、传输量、最近握手时间)
  • 启停接口(wg-quick up/down,sudo 提权)
  • 查看 WG 配置文件(/etc/wireguard/<iface>.conf)

P1 — 进阶

  • 可视化编辑接口/对端配置参数
  • 向导式创建新 WG 配置(含密钥生成)
  • 在现有接口中新增/删除对端
  • 实时统计刷新

P2 — 增强

  • 配置文件管理(重命名/备份/删除)
  • 日志查看

技术方案

  • 通过 wg show all dump 全量采集状态
  • INI 格式配置文件解析/写入
  • sudo 提权通过 useSudoCommand hook
  • 轮询刷新(5s 间隔)

涉及修改的文件

  • 新增: wireGuardTypes.ts, wireGuardCommands.ts, wireGuardParsers.ts, RemoteWireGuardManager.tsx
  • 修改: index.ts, RemoteDesktopShell.tsx, i18nCatalog.ts
  • 新增图标: src/assets/desktop-icons/wireguard.png

平台

  • ✅ Linux
  • ❌ Windows / macOS(暂不支持)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions