LumaTunnel
【WinUI】LumaTunnel 是一个面向个人多设备的 Windows 代理系统。客户端在本机提供 HTTP/HTTPS CONNECT 与 SOCKS5 TCP 代理,并通过一个受信任 TLS 证书保护的 WSS 会话,将多个 TCP 流复用到自建 Windows Server 节点。
关注
0
Fork
0
Star
0
using System.Diagnostics;
using System.Windows;
namespace LumaTunnel.Client.Installer;
public partial class MainWindow : Window
{
public MainWindow() => InitializeComponent();
private async void OnInstall(object sender, RoutedEventArgs e)
{
InstallButton.IsEnabled = false;
try
{
Progress.Value = 20;
StatusText.Text = "正在复制文件…";
var executable = await InstallerActions.InstallAsync(ShortcutBox.IsChecked == true);
Progress.Value = 100;
StatusText.Text = "安装完成";
InstallButton.Content = "启动 LumaTunnel";
InstallButton.IsEnabled = true;
InstallButton.Click -= OnInstall;
InstallButton.Click += (_, _) =>
{
Process.Start(new ProcessStartInfo(executable) { UseShellExecute = true });
Close();
};
}
catch (Exception exception)
{
StatusText.Text = "安装失败:" + exception.Message;
InstallButton.IsEnabled = true;
}
}
}
using System.Diagnostics;
using System.Windows;
namespace LumaTunnel.Client.Installer;
public partial class MainWindow : Window
{
public MainWindow() => InitializeComponent();
private async void OnInstall(object sender, RoutedEventArgs e)
{
InstallButton.IsEnabled = false;
try
{
Progress.Value = 20;
StatusText.Text = "正在复制文件…";
var executable = await InstallerActions.InstallAsync(ShortcutBox.IsChecked == true);
Progress.Value = 100;
StatusText.Text = "安装完成";
InstallButton.Content = "启动 LumaTunnel";
InstallButton.IsEnabled = true;
InstallButton.Click -= OnInstall;
InstallButton.Click += (_, _) =>
{
Process.Start(new ProcessStartInfo(executable) { UseShellExecute = true });
Close();
};
}
catch (Exception exception)
{
StatusText.Text = "安装失败:" + exception.Message;
InstallButton.IsEnabled = true;
}
}
}