LumaTunnel
【WinUI】LumaTunnel 是一个面向个人多设备的 Windows 代理系统。客户端在本机提供 HTTP/HTTPS CONNECT 与 SOCKS5 TCP 代理,并通过一个受信任 TLS 证书保护的 WSS 会话,将多个 TCP 流复用到自建 Windows Server 节点。
关注
0
Fork
0
Star
0
using LumaTunnel.Shared.Windows;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace LumaTunnel.Client.Interface;
public interface ISystemProxyService
{
bool IsEnabled { get; }
Task EnableAsync(int httpPort, CancellationToken cancellationToken = default);
Task<bool> DisableAsync(CancellationToken cancellationToken = default);
bool EmergencyRestore();
}
public interface ISecretStore
{
Task SetAsync(string key, string value, CancellationToken cancellationToken = default);
Task<string?> GetAsync(string key, CancellationToken cancellationToken = default);
Task RemoveAsync(string key, CancellationToken cancellationToken = default);
}
public interface IStartupService
{
bool IsEnabled { get; }
void SetEnabled(bool enabled);
}
public interface ITrayService : IDisposable
{
void Initialize(Window window, Action showWindow);
}
public interface IRootNavigationService
{
void Initialize(Frame frame);
void Navigate(Type pageType, object? parameter = null);
}
public interface ITrafficMeter
{
TrafficSample Current { get; }
IReadOnlyList<TrafficSample> History { get; }
void Sample();
}
public sealed record TrafficSample(DateTimeOffset Timestamp, long UploadBytesPerSecond, long DownloadBytesPerSecond);
using LumaTunnel.Shared.Windows;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace LumaTunnel.Client.Interface;
public interface ISystemProxyService
{
bool IsEnabled { get; }
Task EnableAsync(int httpPort, CancellationToken cancellationToken = default);
Task<bool> DisableAsync(CancellationToken cancellationToken = default);
bool EmergencyRestore();
}
public interface ISecretStore
{
Task SetAsync(string key, string value, CancellationToken cancellationToken = default);
Task<string?> GetAsync(string key, CancellationToken cancellationToken = default);
Task RemoveAsync(string key, CancellationToken cancellationToken = default);
}
public interface IStartupService
{
bool IsEnabled { get; }
void SetEnabled(bool enabled);
}
public interface ITrayService : IDisposable
{
void Initialize(Window window, Action showWindow);
}
public interface IRootNavigationService
{
void Initialize(Frame frame);
void Navigate(Type pageType, object? parameter = null);
}
public interface ITrafficMeter
{
TrafficSample Current { get; }
IReadOnlyList<TrafficSample> History { get; }
void Sample();
}
public sealed record TrafficSample(DateTimeOffset Timestamp, long UploadBytesPerSecond, long DownloadBytesPerSecond);