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
UTF-8
[CmdletBinding()]
param(
    [ValidateSet('x64', 'arm64')]
    [string]$Architecture = 'x64',
    [string]$Version = '0.1.0-alpha',
    [ValidateSet('Debug', 'Release')]
    [string]$Configuration = 'Release'
)

$ErrorActionPreference = 'Stop'
$repoRoot = Split-Path -Parent $PSScriptRoot
$runtime = "win-$Architecture"
$outputRoot = Join-Path $repoRoot "artifacts\client\$runtime"
$watchdogRoot = Join-Path $repoRoot "artifacts\watchdog\$runtime"
$packageRoot = Join-Path $repoRoot 'artifacts\packages'

New-Item -ItemType Directory -Force -Path $outputRoot, $watchdogRoot, $packageRoot | Out-Null

dotnet publish (Join-Path $repoRoot 'src\LumaTunnel.Client\LumaTunnel.Client.csproj') `
    -c $Configuration -p:Platform=$Architecture -r $runtime --self-contained true `
    -p:Version=$Version -p:WindowsAppSDKSelfContained=true -o $outputRoot
if ($LASTEXITCODE -ne 0) { throw 'Client publish failed.' }

dotnet publish (Join-Path $repoRoot 'src\LumaTunnel.Client.Watchdog\LumaTunnel.Client.Watchdog.csproj') `
    -c $Configuration -r $runtime --self-contained true -p:Version=$Version -o $watchdogRoot
if ($LASTEXITCODE -ne 0) { throw 'Watchdog publish failed.' }

Copy-Item -LiteralPath (Join-Path $watchdogRoot 'LumaTunnel.Watchdog.exe') -Destination $outputRoot -Force
Get-ChildItem -LiteralPath $watchdogRoot -File | Where-Object Name -Like 'LumaTunnel.Watchdog.*' | ForEach-Object {
    Copy-Item -LiteralPath $_.FullName -Destination $outputRoot -Force
}

$zipPath = Join-Path $packageRoot "LumaTunnel.Client-$Version-$runtime.zip"
Compress-Archive -Path (Join-Path $outputRoot '*') -DestinationPath $zipPath -Force
Write-Host "Client package: $zipPath"