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(
    [string]$Version = '0.1.0-alpha'
)

$ErrorActionPreference = 'Stop'
$repoRoot = Split-Path -Parent $PSScriptRoot
& (Join-Path $PSScriptRoot 'publish-client.ps1') -Architecture x64 -Version $Version
& (Join-Path $PSScriptRoot 'publish-client.ps1') -Architecture arm64 -Version $Version
& (Join-Path $PSScriptRoot 'publish-server.ps1') -Version $Version

$packageRoot = Join-Path $repoRoot 'artifacts\packages'
$serverZip = Join-Path $packageRoot "LumaTunnel.Server-$Version-win-x64.zip"
Compress-Archive -Path (Join-Path $repoRoot 'artifacts\server\win-x64\*') -DestinationPath $serverZip -Force

foreach ($architecture in @('x64', 'arm64')) {
    $runtime = "win-$architecture"
    $installerOutput = Join-Path $repoRoot "artifacts\installer\$runtime"
    New-Item -ItemType Directory -Force -Path $installerOutput | Out-Null
    dotnet publish (Join-Path $repoRoot 'src\LumaTunnel.Client.Installer\LumaTunnel.Client.Installer.csproj') `
        -c Release -r $runtime --self-contained true -p:PublishSingleFile=true -p:Version=$Version -o $installerOutput
    if ($LASTEXITCODE -ne 0) { throw "Installer publish failed for $runtime." }
    Copy-Item -LiteralPath (Join-Path $packageRoot "LumaTunnel.Client-$Version-$runtime.zip") `
        -Destination (Join-Path $installerOutput 'LumaTunnel.Client.zip') -Force
}

$checksums = Get-ChildItem -LiteralPath $packageRoot -File | Sort-Object Name | ForEach-Object {
    $hash = Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256
    "$($hash.Hash.ToLowerInvariant())  $($_.Name)"
}
$checksums | Set-Content -LiteralPath (Join-Path $packageRoot 'SHA256SUMS.txt') -Encoding utf8
Write-Host "Release packages: $packageRoot"