XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

LumaTunnel

【WinUI】LumaTunnel 是一个面向个人多设备的 Windows 代理系统。客户端在本机提供 HTTP/HTTPS CONNECT 与 SOCKS5 TCP 代理,并通过一个受信任 TLS 证书保护的 WSS 会话,将多个 TCP 流复用到自建 Windows Server 节点。

公开
关注 0 Fork 0 Star 0
README.md

LumaTunnel(光隧)

自托管的安全网络通道

LumaTunnel 是一个面向个人多设备的 Windows 代理系统。客户端在本机提供 HTTP/HTTPS CONNECT 与 SOCKS5 TCP 代理,并通过一个受信任 TLS 证书保护的 WSS 会话,将多个 TCP 流复用到自建 Windows Server 节点。

LumaTunnel 图标

当前实现

  • .NET 10、中央包管理、Nullable 与静态分析。
  • WinUI 3 客户端,参考 AipcSystem 的 Views / ViewModels / Interface / Implements / Profiles 分层。
  • HTTP 绝对 URI 转发、HTTP CONNECT 和 SOCKS5 IPv4/IPv6/域名 TCP CONNECT。
  • 规则、全局和直连模式;本地、私网、链路本地目标强制直连。
  • lumatunnel.v1 12 字节二进制帧协议与单 WSS 多路复用。
  • ServerInteractive 3.2.2 控制 API 与 CyberComm 原始 WebSocket 事件共用 HTTP.sys 监听。
  • 一次性配对码、256 位设备令牌、服务端 SHA-256 摘要、客户端 DPAPI CurrentUser。
  • Windows Service CLI、HTTP.sys TLS/URL ACL、防火墙与恢复策略配置。
  • 系统代理快照、外部修改保护、父进程/命名管道 Watchdog 恢复。
  • x64/ARM64 客户端、win-x64 服务端和 WPF 安装器发布脚本。

v1 明确不支持 TUN、UDP、HTTPS 解密、第三方订阅、移动端和自动更新。

仓库结构

src/LumaTunnel.Shared             公共模型与帧协议
src/LumaTunnel.Server.Core        配对、设备、目标策略和隧道服务端
src/LumaTunnel.Server             Worker Service 与管理 CLI
src/LumaTunnel.Client.Core        路由、隧道及本地代理核心(无 WinUI 依赖)
src/LumaTunnel.Client             WinUI 3 客户端
src/LumaTunnel.Client.Watchdog    崩溃后的系统代理恢复
src/LumaTunnel.Client.Installer   当前用户安装器
tests/                             单元、集成与端到端测试

构建

要求 Windows 10 1809+、.NET SDK 10.0.3xx 与 Windows 10/11 SDK。

dotnet restore LumaTunnel.slnx
dotnet build LumaTunnel.slnx -p:Platform=x64
dotnet test LumaTunnel.slnx -p:Platform=x64 --no-build

开发配置默认只监听 http://localhost:3300/,避免在构建后意外占用 443。正式安装命令会写入 https://+:443/

LumaTunnel.Server.exe service install --host node.example.com --thumbprint CERTIFICATE_SHA1
LumaTunnel.Server.exe pair create --ttl 10m

然后在客户端“节点”页输入 https://node.example.com 和配对码。

文档

发布

.\tools\publish-client.ps1 -Architecture x64 -Version 0.1.0-alpha
.\tools\publish-client.ps1 -Architecture arm64 -Version 0.1.0-alpha
.\tools\publish-server.ps1 -Version 0.1.0-alpha
.\tools\package-release.ps1 -Version 0.1.0-alpha

发布产物写入 artifacts/,该目录不提交 Git。

许可证

MIT

LICENSE.txt MIT

MIT License

Copyright (c) 2026 XFEstudio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.