commit db368674d46187d047d5a0a69765a31514bae86a Author: retr0volkov Date: Sat Aug 22 19:11:00 2026 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b43a1db --- /dev/null +++ b/.gitignore @@ -0,0 +1,400 @@ +# Created by https://www.toptal.com/developers/gitignore/api/csharp +# Edit at https://www.toptal.com/developers/gitignore?templates=csharp + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/WinWARP.Core/Services/ILocalizationService.cs b/WinWARP.Core/Services/ILocalizationService.cs new file mode 100644 index 0000000..ae41c65 --- /dev/null +++ b/WinWARP.Core/Services/ILocalizationService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WinWARP.Core.Services; + +public interface ILocalizationService +{ + IEnumerable GetSupportedLanguages(); + string GetCurrentLanguage(); + Task SetLanguageAsync(string languageCode); + string GetString(string resourceKey); +} \ No newline at end of file diff --git a/WinWARP.Core/Services/INavigationService.cs b/WinWARP.Core/Services/INavigationService.cs new file mode 100644 index 0000000..02b3678 --- /dev/null +++ b/WinWARP.Core/Services/INavigationService.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Text; + +namespace WinWARP.Core.Services; + +public interface INavigationService +{ + void NavigateTo(object parameter = null) where TViewModel : class; + void GoBack(); + bool CanGoBack + { + get; + } + Type CurrentViewModelType { get; } + event EventHandler NavigatedToViewModel; +} diff --git a/WinWARP.Core/ViewModels/ConfigSettings/DnsSettingsViewModel.cs b/WinWARP.Core/ViewModels/ConfigSettings/DnsSettingsViewModel.cs new file mode 100644 index 0000000..db8e815 --- /dev/null +++ b/WinWARP.Core/ViewModels/ConfigSettings/DnsSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels.ConfigSettings; + +public partial class DnsSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/ConfigSettings/InboundSettingsViewModel.cs b/WinWARP.Core/ViewModels/ConfigSettings/InboundSettingsViewModel.cs new file mode 100644 index 0000000..cb68344 --- /dev/null +++ b/WinWARP.Core/ViewModels/ConfigSettings/InboundSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels.ConfigSettings; + +public partial class InboundSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/ConfigSettings/RoutingSettingsViewModel.cs b/WinWARP.Core/ViewModels/ConfigSettings/RoutingSettingsViewModel.cs new file mode 100644 index 0000000..7fcdcdf --- /dev/null +++ b/WinWARP.Core/ViewModels/ConfigSettings/RoutingSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels.ConfigSettings; + +public partial class RoutingSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/ConfigSettings/TlsSettingsViewModel.cs b/WinWARP.Core/ViewModels/ConfigSettings/TlsSettingsViewModel.cs new file mode 100644 index 0000000..84d476c --- /dev/null +++ b/WinWARP.Core/ViewModels/ConfigSettings/TlsSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels.ConfigSettings; + +public partial class TlsSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/ConfigSettings/WarpSettingsViewModel.cs b/WinWARP.Core/ViewModels/ConfigSettings/WarpSettingsViewModel.cs new file mode 100644 index 0000000..1860998 --- /dev/null +++ b/WinWARP.Core/ViewModels/ConfigSettings/WarpSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels.ConfigSettings; + +public partial class WarpSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/ConfigSettingsViewModel.cs b/WinWARP.Core/ViewModels/ConfigSettingsViewModel.cs new file mode 100644 index 0000000..3866e8c --- /dev/null +++ b/WinWARP.Core/ViewModels/ConfigSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels; + +public class ConfigSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/HomeViewModel.cs b/WinWARP.Core/ViewModels/HomeViewModel.cs new file mode 100644 index 0000000..d7a0a78 --- /dev/null +++ b/WinWARP.Core/ViewModels/HomeViewModel.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using WinWARP.Core.Services; + +namespace WinWARP.Core.ViewModels; + +public partial class HomeViewModel : ObservableObject +{ + private readonly INavigationService _navigationService; + + public HomeViewModel(INavigationService navigationService) + { + _navigationService = navigationService; + } + + [RelayCommand] + private void TestTransition() + { + _navigationService.NavigateTo(); + } +} diff --git a/WinWARP.Core/ViewModels/MainViewModel.cs b/WinWARP.Core/ViewModels/MainViewModel.cs new file mode 100644 index 0000000..d92da88 --- /dev/null +++ b/WinWARP.Core/ViewModels/MainViewModel.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using WinWARP.Core.Services; + +namespace WinWARP.Core.ViewModels; + +public partial class MainViewModel : ObservableObject +{ + private readonly INavigationService _navigationService; + + public MainViewModel(INavigationService navigationService) + { + _navigationService = navigationService; + } + + [ObservableProperty] + public partial string Title { get; set; } = "WinWARP"; + + [ObservableProperty] + public partial Type CurrentViewModelType { get; set; } + + [RelayCommand] + private void Navigate(object? tagParameter) + { + if (tagParameter is Type viewModelType) + { + var method = _navigationService.GetType().GetMethod("NavigateTo")?.MakeGenericMethod(viewModelType); + method?.Invoke(_navigationService, [null]); + } + } +} diff --git a/WinWARP.Core/ViewModels/Settings/GeneralSettingsViewModel.cs b/WinWARP.Core/ViewModels/Settings/GeneralSettingsViewModel.cs new file mode 100644 index 0000000..41acbeb --- /dev/null +++ b/WinWARP.Core/ViewModels/Settings/GeneralSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels.Settings; + +public partial class GeneralSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/Settings/UpdateSettingsViewModel.cs b/WinWARP.Core/ViewModels/Settings/UpdateSettingsViewModel.cs new file mode 100644 index 0000000..df344a5 --- /dev/null +++ b/WinWARP.Core/ViewModels/Settings/UpdateSettingsViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels.Settings; + +public partial class UpdateSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/ViewModels/SettingsViewModel.cs b/WinWARP.Core/ViewModels/SettingsViewModel.cs new file mode 100644 index 0000000..840da00 --- /dev/null +++ b/WinWARP.Core/ViewModels/SettingsViewModel.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using WinWARP.Core.Services; + +namespace WinWARP.Core.ViewModels; + +public partial class SettingsViewModel : ObservableObject +{ + private readonly ILocalizationService _localizationService; + private readonly INavigationService _navigationService; + + public SettingsViewModel(ILocalizationService localizationService, INavigationService navigationService) + { + _navigationService = navigationService; + _localizationService = localizationService; + SelectedLanguage = _localizationService.GetCurrentLanguage(); + Languages = new ObservableCollection(_localizationService.GetSupportedLanguages()); + } + + + [RelayCommand] + private void Navigate(object? tagParameter) + { + if (tagParameter is Type viewModelType) + { + var method = _navigationService.GetType().GetMethod("NavigateTo")?.MakeGenericMethod(viewModelType); + method?.Invoke(_navigationService, [null]); + } + } + + [ObservableProperty] + public partial string SelectedLanguage + { + get; set; + } + + partial void OnSelectedLanguageChanged(string value) + { + _localizationService.SetLanguageAsync(value); + } + + public ObservableCollection Languages; +} diff --git a/WinWARP.Core/ViewModels/SubsSettingsPage.cs b/WinWARP.Core/ViewModels/SubsSettingsPage.cs new file mode 100644 index 0000000..fd873eb --- /dev/null +++ b/WinWARP.Core/ViewModels/SubsSettingsPage.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; +using CommunityToolkit.Mvvm.ComponentModel; + +namespace WinWARP.Core.ViewModels; + +public class SubsSettingsViewModel : ObservableObject +{ +} diff --git a/WinWARP.Core/WinWARP.Core.csproj b/WinWARP.Core/WinWARP.Core.csproj new file mode 100644 index 0000000..f954a7b --- /dev/null +++ b/WinWARP.Core/WinWARP.Core.csproj @@ -0,0 +1,18 @@ + + + + net10.0 + enable + enable + + + + + + + + + + + + diff --git a/WinWARP.Service/Program.cs b/WinWARP.Service/Program.cs new file mode 100644 index 0000000..d0e6fd4 --- /dev/null +++ b/WinWARP.Service/Program.cs @@ -0,0 +1,7 @@ +using WinWARP.Service; + +var builder = Host.CreateApplicationBuilder(args); +builder.Services.AddHostedService(); + +var host = builder.Build(); +host.Run(); diff --git a/WinWARP.Service/Properties/launchSettings.json b/WinWARP.Service/Properties/launchSettings.json new file mode 100644 index 0000000..23052fc --- /dev/null +++ b/WinWARP.Service/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "WinWARP.Service": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "DOTNET_ENVIRONMENT": "Development" + } + } + } +} diff --git a/WinWARP.Service/SingBox/LICENSE b/WinWARP.Service/SingBox/LICENSE new file mode 100644 index 0000000..175f350 --- /dev/null +++ b/WinWARP.Service/SingBox/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2022 by nekohasekai + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +In addition, no derivative work may use the name or imply association +with this application without prior consent. diff --git a/WinWARP.Service/SingBox/libcronet.dll b/WinWARP.Service/SingBox/libcronet.dll new file mode 100644 index 0000000..9e99f78 Binary files /dev/null and b/WinWARP.Service/SingBox/libcronet.dll differ diff --git a/WinWARP.Service/SingBox/sing-box.exe b/WinWARP.Service/SingBox/sing-box.exe new file mode 100644 index 0000000..ba4e542 Binary files /dev/null and b/WinWARP.Service/SingBox/sing-box.exe differ diff --git a/WinWARP.Service/WinWARP.Service.csproj b/WinWARP.Service/WinWARP.Service.csproj new file mode 100644 index 0000000..3622968 --- /dev/null +++ b/WinWARP.Service/WinWARP.Service.csproj @@ -0,0 +1,23 @@ + + + + net10.0 + enable + enable + dotnet-WinWARP.Service-9594206a-c78e-4e2b-b552-78863ffa4924 + app.manifest + + + + + + + + + + + + + + + diff --git a/WinWARP.Service/Worker.cs b/WinWARP.Service/Worker.cs new file mode 100644 index 0000000..cf4cbbf --- /dev/null +++ b/WinWARP.Service/Worker.cs @@ -0,0 +1,91 @@ +using SingboxLib.Configuration.Outbound.Shared; +using SingBoxLib.Configuration; +using SingBoxLib.Configuration.Dns; +using SingBoxLib.Configuration.Inbound; +using SingBoxLib.Configuration.Inbound.Abstract; +using SingBoxLib.Configuration.Outbound; +using SingBoxLib.Configuration.Outbound.Abstract; +using SingBoxLib.Configuration.Shared; +using SingBoxLib.Parsing; +using SingBoxLib.Runtime; + +namespace WinWARP.Service; + +public class Worker(ILogger logger) : BackgroundService +{ + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + var profileUrl = "vless://5af742f0-5915-492e-b618-406e8170c77f@redlt.jojackcraft.ru:443?encryption=none&flow=xtls-rprx-vision&type=tcp&security=reality&sni=goo.su&fp=qq&pbk=1vSZjvhZO01oAEH3b7eebR1qF5dLU1Dq2E7xu8pwGSs&sid=428ef87fd47a3a32&spx=%2F#%F0%9F%87%B1%F0%9F%87%B9%C2%B2%E2%9A%A1%20%D0%9B%D0%B8%D1%82%D0%B2%D0%B0"; + var profile = ProfileParser.ParseProfileUrl(profileUrl); + + // 1. Define your sing-box configuration + var config = new SingBoxConfig + { + Inbounds = new() + { + new MixedInbound + { + Listen = "127.0.0.1", + ListenPort = 12534, + SetSystemProxy = true + } + }, + Outbounds = new List + { + new VLessOutbound + { + Server = "redlt.jojackcraft.ru", + ServerPort = 443, + Uuid = "5af742f0-5915-492e-b618-406e8170c77f", + Flow = "xtls-rprx-vision", + Tls = new OutboundTlsConfig + { + Enabled = true, + ServerName = "goo.su", + UTls = new UtlsConfig + { + Enabled = true, + Fingerprint = "qq" + }, + Reality = new OutboundRealityConfig + { + Enabled = true, + PublicKey = "1vSZjvhZO01oAEH3b7eebR1qF5dLU1Dq2E7xu8pwGSs", + ShortId = "428ef87fd47a3a32" + } + }, + PacketEncoding = "xudp" + } + } + }; + + // 2. Initialize wrapper with path to sing-box executable + var wrapper = new SingBoxWrapper("SingBox/sing-box.exe"); + + // 3. Subscribe to the log event to inspect output or errors + wrapper.OnLog += (sender, logArgs) => + { + if (logger.IsEnabled(LogLevel.Information)) + { + logger.LogInformation(logArgs); + } + }; + + // 4. Start the sing-box process + using var cts = new CancellationTokenSource(); + //var runTask = wrapper.StartAsync(config, stoppingToken); + + // 5. Terminate the sing-box process gracefully by cancelling the token + //await cts.CancelAsync(); + //await runTask; + + //while (!stoppingToken.IsCancellationRequested) + //{ + // if (logger.IsEnabled(LogLevel.Information)) + // { + // logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now); + // } + // await Task.Delay(1000, stoppingToken); + //} + } +} diff --git a/WinWARP.Service/app.manifest b/WinWARP.Service/app.manifest new file mode 100644 index 0000000..438ee0d --- /dev/null +++ b/WinWARP.Service/app.manifest @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WinWARP.Service/appsettings.Development.json b/WinWARP.Service/appsettings.Development.json new file mode 100644 index 0000000..b2dcdb6 --- /dev/null +++ b/WinWARP.Service/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/WinWARP.Service/appsettings.json b/WinWARP.Service/appsettings.json new file mode 100644 index 0000000..b2dcdb6 --- /dev/null +++ b/WinWARP.Service/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/WinWARP.Shared/Class1.cs b/WinWARP.Shared/Class1.cs new file mode 100644 index 0000000..54273cf --- /dev/null +++ b/WinWARP.Shared/Class1.cs @@ -0,0 +1,6 @@ +namespace WinWARP.Shared; + +public class Class1 +{ + +} diff --git a/WinWARP.Shared/WinWARP.Shared.csproj b/WinWARP.Shared/WinWARP.Shared.csproj new file mode 100644 index 0000000..b7e4dd4 --- /dev/null +++ b/WinWARP.Shared/WinWARP.Shared.csproj @@ -0,0 +1,22 @@ + + + + net10.0 + enable + enable + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/WinWARP.Shared/greet.proto b/WinWARP.Shared/greet.proto new file mode 100644 index 0000000..9375c1a --- /dev/null +++ b/WinWARP.Shared/greet.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +option csharp_namespace = "YourSolution.Shared"; + +package greet; + +service Greeter { + rpc SayHello (HelloRequest) returns (HelloReply); +} + +message HelloRequest { + string name = 1; +} + +message HelloReply { + string message = 1; +} diff --git a/WinWARP.Ui/App.xaml b/WinWARP.Ui/App.xaml new file mode 100644 index 0000000..e263846 --- /dev/null +++ b/WinWARP.Ui/App.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + 48 + + + diff --git a/WinWARP.Ui/App.xaml.cs b/WinWARP.Ui/App.xaml.cs new file mode 100644 index 0000000..5f5a288 --- /dev/null +++ b/WinWARP.Ui/App.xaml.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.UI.Xaml.Shapes; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.ApplicationSettings; +using WinUI3Localizer; +using WinWARP.Core.Services; +using WinWARP.Core.ViewModels; +using WinWARP.Core.ViewModels.ConfigSettings; +using WinWARP.Core.ViewModels.Settings; +using WinWARP.Ui.Services; +using WinWARP.Ui.Views; +using WinWARP.Ui.Views.Settings; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui; +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : Application +{ + public static IServiceProvider Services + { + get; + private set; + } + + private Window? _window; + + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + InitializeComponent(); + Services = ConfigureServices(); + } + + /// + /// Configures the services for dependency injection. + /// + /// + private static IServiceProvider ConfigureServices() + { + var services = new ServiceCollection(); + + var navigationService = new NavigationService(); + navigationService.Configure(typeof(HomeViewModel), typeof(HomePage)); + navigationService.Configure(typeof(SettingsViewModel), typeof(SettingsPage)); + navigationService.Configure(typeof(SubsSettingsViewModel), typeof(SubsSettingsPage)); + navigationService.Configure(typeof(ConfigSettingsViewModel), typeof(ConfigSettingsPage)); + + navigationService.Configure(typeof(GeneralSettingsViewModel), typeof(GeneralSettingsPage)); + navigationService.Configure(typeof(UpdateSettingsViewModel), typeof(UpdateSettingsPage)); + + navigationService.Configure(typeof(InboundSettingsViewModel), typeof(InboundSettingsPage)); + navigationService.Configure(typeof(RoutingSettingsViewModel), typeof(RoutingSettingsPage)); + navigationService.Configure(typeof(DnsSettingsViewModel), typeof(DnsSettingsPage)); + navigationService.Configure(typeof(TlsSettingsViewModel), typeof(TlsSettingsPage)); + navigationService.Configure(typeof(WarpSettingsViewModel), typeof(WarpSettingsPage)); + + services.AddSingleton(); + + services.AddSingleton(navigationService); + + // ViewModels + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddSingleton(); + + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); + + // Views + services.AddTransient(); + + return services.BuildServiceProvider(); + } + + /// + /// Invoked when the application is launched. + /// + /// Details about the launch request and process. + protected async override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) + { + + var stringsFolderPath = System.IO.Path.Combine(AppContext.BaseDirectory, "Strings"); + ILocalizer localizer = await new LocalizerBuilder() + .AddStringResourcesFolderForLanguageDictionaries(stringsFolderPath) + .SetOptions(options => + { + options.DefaultLanguage = "en-US"; + }) + .Build(); + + _window = Services.GetRequiredService(); + _window.Activate(); + } +} diff --git a/WinWARP.Ui/Assets/LockScreenLogo.scale-200.png b/WinWARP.Ui/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000..7440f0d Binary files /dev/null and b/WinWARP.Ui/Assets/LockScreenLogo.scale-200.png differ diff --git a/WinWARP.Ui/Assets/SplashScreen.scale-200.png b/WinWARP.Ui/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000..32f486a Binary files /dev/null and b/WinWARP.Ui/Assets/SplashScreen.scale-200.png differ diff --git a/WinWARP.Ui/Assets/Square150x150Logo.scale-200.png b/WinWARP.Ui/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000..53ee377 Binary files /dev/null and b/WinWARP.Ui/Assets/Square150x150Logo.scale-200.png differ diff --git a/WinWARP.Ui/Assets/Square44x44Logo.scale-200.png b/WinWARP.Ui/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000..f713bba Binary files /dev/null and b/WinWARP.Ui/Assets/Square44x44Logo.scale-200.png differ diff --git a/WinWARP.Ui/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/WinWARP.Ui/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000..dc9f5be Binary files /dev/null and b/WinWARP.Ui/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/WinWARP.Ui/Assets/StoreLogo.png b/WinWARP.Ui/Assets/StoreLogo.png new file mode 100644 index 0000000..a4586f2 Binary files /dev/null and b/WinWARP.Ui/Assets/StoreLogo.png differ diff --git a/WinWARP.Ui/Assets/Wide310x150Logo.scale-200.png b/WinWARP.Ui/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000..8b4a5d0 Binary files /dev/null and b/WinWARP.Ui/Assets/Wide310x150Logo.scale-200.png differ diff --git a/WinWARP.Ui/Converters/ItemInvokedEventArgsConverter.cs b/WinWARP.Ui/Converters/ItemInvokedEventArgsConverter.cs new file mode 100644 index 0000000..4feff7d --- /dev/null +++ b/WinWARP.Ui/Converters/ItemInvokedEventArgsConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; + +namespace WinWARP.Ui.Converters; + +public class ItemInvokedEventArgsConverter : IValueConverter +{ + public object? Convert(object value, Type targetType, object parameter, string language) + { + if (value is NavigationViewItemInvokedEventArgs args) + { + if (args.InvokedItemContainer?.Tag is Type viewModelType) + { + return viewModelType; + } + } + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/WinWARP.Ui/Converters/LanguageCodeToNameConverter.cs b/WinWARP.Ui/Converters/LanguageCodeToNameConverter.cs new file mode 100644 index 0000000..a3e69ae --- /dev/null +++ b/WinWARP.Ui/Converters/LanguageCodeToNameConverter.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using Microsoft.UI.Xaml.Data; + +namespace WinWARP.Ui.Converters; + +public class LanguageCodeToNameConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, string language) + { + if (value is string languageCode && !string.IsNullOrWhiteSpace(languageCode)) + { + try + { + CultureInfo culture = new CultureInfo(languageCode); + + // DisplayName returns "English (United States)" + // NativeName returns "English (United States)" or "Español (España)" + return culture.NativeName; + } + catch (CultureNotFoundException) + { + return value; + } + } + return string.Empty; + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/WinWARP.Ui/Helpers/TypeExtension.cs b/WinWARP.Ui/Helpers/TypeExtension.cs new file mode 100644 index 0000000..26b5358 --- /dev/null +++ b/WinWARP.Ui/Helpers/TypeExtension.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.UI.Xaml.Markup; + +namespace WinWARP.Ui.Helpers; + +[MarkupExtensionReturnType(ReturnType = typeof(Type))] +public sealed class TypeExtension : MarkupExtension +{ + public Type? TargetType + { + get; set; + } + + protected override object? ProvideValue() + { + return TargetType; + } +} \ No newline at end of file diff --git a/WinWARP.Ui/MainWindow.xaml b/WinWARP.Ui/MainWindow.xaml new file mode 100644 index 0000000..d6caa00 --- /dev/null +++ b/WinWARP.Ui/MainWindow.xaml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WinWARP.Ui/MainWindow.xaml.cs b/WinWARP.Ui/MainWindow.xaml.cs new file mode 100644 index 0000000..13fe523 --- /dev/null +++ b/WinWARP.Ui/MainWindow.xaml.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.UI.Input; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Windows.Foundation; +using Windows.Foundation.Collections; +using WinWARP.Core.Services; +using WinWARP.Core.ViewModels; +using WinWARP.Ui.Services; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui; +/// +/// An empty window that can be used on its own or navigated to within a Frame. +/// +public sealed partial class MainWindow : Window +{ + public MainViewModel ViewModel { get; } + + public MainWindow(MainViewModel viewModel) + { + InitializeComponent(); + + ViewModel = viewModel; + + ExtendsContentIntoTitleBar = true; + AppWindow.TitleBar.PreferredHeightOption = Microsoft.UI.Windowing.TitleBarHeightOption.Tall; + SetTitleBar(TopAppBar); + AppWindow.SetIcon("Assets/Square44x44Logo.targetsize-24_altform-unplated.png"); + + AppWindow.Resize(new Windows.Graphics.SizeInt32(1024, 759)); + + var navService = (NavigationService)App.Services.GetRequiredService(); + navService.NavigatedToViewModel += NavService_NavigatedToViewModel; + navService.RegisterFrame(RootFrame); + + navService.NavigateTo(); + + RootGrid.AddHandler(UIElement.PointerPressedEvent, new PointerEventHandler(Window_PointerPressed), true); + } + + private void NavService_NavigatedToViewModel(object? sender, Type e) + { + var targetItem = RootNavigationView.MenuItems + .Concat(RootNavigationView.FooterMenuItems) + .OfType() + .FirstOrDefault(item => item.Tag is Type itemVmType && itemVmType == e); + + if (targetItem != null) + { + RootNavigationView.SelectedItem = targetItem; + } + } + + private void TitleBar_BackRequested(TitleBar sender, object args) + { + if (RootFrame.CanGoBack) + { + RootFrame.GoBack(); + } + } + + private void TitleBar_PaneToggleRequested(TitleBar sender, object args) + { + RootNavigationView.IsPaneOpen = !RootNavigationView.IsPaneOpen; + } + + private void Window_PointerPressed(object sender, PointerRoutedEventArgs e) + { + var properties = e.GetCurrentPoint(sender as UIElement).Properties; + + // Check if mouse back button (XButton1) was pressed + if (properties.PointerUpdateKind == PointerUpdateKind.XButton1Pressed) + { + e.Handled = true; + + if (RootFrame.CanGoBack) + { + RootFrame.GoBack(); + } + } + } +} diff --git a/WinWARP.Ui/Package.appxmanifest b/WinWARP.Ui/Package.appxmanifest new file mode 100644 index 0000000..f4293fd --- /dev/null +++ b/WinWARP.Ui/Package.appxmanifest @@ -0,0 +1,53 @@ + + + + + + + + + + WinWARP.Ui + retrd + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WinWARP.Ui/Properties/launchSettings.json b/WinWARP.Ui/Properties/launchSettings.json new file mode 100644 index 0000000..29203c6 --- /dev/null +++ b/WinWARP.Ui/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "WinWARP.Ui (Package)": { + "commandName": "MsixPackage" + }, + "WinWARP.Ui (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/WinWARP.Ui/Services/LocalizationService.cs b/WinWARP.Ui/Services/LocalizationService.cs new file mode 100644 index 0000000..66145aa --- /dev/null +++ b/WinWARP.Ui/Services/LocalizationService.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using WinUI3Localizer; +using WinWARP.Core.Services; + +namespace WinWARP.Ui.Services; + +public class LocalizationService : ILocalizationService +{ + public IEnumerable GetSupportedLanguages() => + Localizer.Get().GetAvailableLanguages(); + + public string GetCurrentLanguage() => + Localizer.Get().GetCurrentLanguage(); + + public Task SetLanguageAsync(string languageCode) + { + Localizer.Get().SetLanguage(languageCode); + return Task.CompletedTask; + } + + public string GetString(string resourceKey) => + Localizer.Get().GetLocalizedString(resourceKey); +} \ No newline at end of file diff --git a/WinWARP.Ui/Services/NavigationService.cs b/WinWARP.Ui/Services/NavigationService.cs new file mode 100644 index 0000000..7e774c3 --- /dev/null +++ b/WinWARP.Ui/Services/NavigationService.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Runtime.CompilerServices; +using System.Text; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Navigation; +using WinWARP.Core.Services; + +namespace WinWARP.Ui.Services; + +public class NavigationService : INavigationService +{ + private readonly Dictionary _mappings = new(); + private Frame _frame; + + public void Configure(Type viewModelType, Type pageType) + { + _mappings[viewModelType] = pageType; + _mappings[pageType] = viewModelType; + } + + public void RegisterFrame(Frame frame) + { + _frame = frame; + _frame.Navigated += OnFrameNavigated; + } + + public bool CanGoBack => _frame?.CanGoBack ?? false; + + public void GoBack() + { + if (CanGoBack) + { + _frame.GoBack(); + } + } + + public void NavigateTo(object parameter = null) where TViewModel : class + { + var viewModelType = typeof(TViewModel); + + if (!_mappings.TryGetValue(viewModelType, out var pageType)) + { + throw new ArgumentException($"No registered page found for ViewModel: {viewModelType.FullName}"); + } + + if (_frame != null) + { + _frame.Navigate(pageType, parameter); + } + } + + public Type CurrentViewModelType + { + get; private set; + } + + public event EventHandler NavigatedToViewModel; + + private void OnFrameNavigated(object sender, NavigationEventArgs e) + { + var pageType = e.SourcePageType; + + if (_mappings.TryGetValue(pageType, out var viewModelType)) + { + CurrentViewModelType = viewModelType; + + NavigatedToViewModel?.Invoke(this, viewModelType); + } + } +} \ No newline at end of file diff --git a/WinWARP.Ui/Strings/en-US/Resources.resw b/WinWARP.Ui/Strings/en-US/Resources.resw new file mode 100644 index 0000000..fc1e114 --- /dev/null +++ b/WinWARP.Ui/Strings/en-US/Resources.resw @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Home page + + + Will be applied whenever possible in the app + + + Language + + + Use system language + + + Settings + + + WinWARP language + + + Settings + + + App Settings + + + General settings + + + Theme, launch behavior, and more + + + Update settings + + + Automatic updates, update behavior + + + VPN Settings + + + On + + + Off + + + Inbound + + + Service mode, port, local share + + + Routing + + + LAN bypass, per-program, per-host split tunneling + + + DNS + + + DNS provider, fake DNS, DNS strategies + + + TLS + + + Fragmentation parameters + + + WARP + + + Clouflare's WARP configuration + + + Update Settings + + + WARP Settings + + + TLS Settings + + + Routing Settings + + + Inbound Settings + + + General Settings + + + DNS Settings + + + Subscriptions and servers + + + Configs settings + + \ No newline at end of file diff --git a/WinWARP.Ui/Strings/ru-RU/Resources.resw b/WinWARP.Ui/Strings/ru-RU/Resources.resw new file mode 100644 index 0000000..3e65fe5 --- /dev/null +++ b/WinWARP.Ui/Strings/ru-RU/Resources.resw @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Домашняя + + + Будет использован где возможно в приложении + + + Язык + + + Использовать язык системы + + + Настройки + + + Язык приложения + + + Настройки + + + Настройки приложения + + + Общие настройки + + + Тема, поведение при запуске, и пр. + + + Настройки обновлений + + + Автоматические обновления, поведение обновлений + + + Настройки VPN + + + Вкл. + + + Выкл. + + + Вход + + + Режим сервиса, порт, локальный доступ + + + Маршруты + + + Локальная сеть, исключения для программ и сайтов + + + DNS + + + DNS провайдер, fake DNS, DNS стратегия + + + TLS + + + Параметры фрагментации + + + WARP + + + Настройки Cloudflare WARP + + + Настройки обновлений + + + Настройки WARP + + + Настройки TLS + + + Настройки маршрутов + + + Настройки входа + + + Общие настройки + + + Настройки DNS + + + Подписки и сервера + + + Конфигурации + + \ No newline at end of file diff --git a/WinWARP.Ui/Views/ConfigSettings/DnsSettingsPage.xaml b/WinWARP.Ui/Views/ConfigSettings/DnsSettingsPage.xaml new file mode 100644 index 0000000..8623d9d --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/DnsSettingsPage.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/WinWARP.Ui/Views/ConfigSettings/DnsSettingsPage.xaml.cs b/WinWARP.Ui/Views/ConfigSettings/DnsSettingsPage.xaml.cs new file mode 100644 index 0000000..49d4912 --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/DnsSettingsPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui.Views.Settings; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class DnsSettingsPage : Page +{ + public DnsSettingsPage() + { + InitializeComponent(); + } +} diff --git a/WinWARP.Ui/Views/ConfigSettings/InboundSettingsPage.xaml b/WinWARP.Ui/Views/ConfigSettings/InboundSettingsPage.xaml new file mode 100644 index 0000000..a92ac3a --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/InboundSettingsPage.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/WinWARP.Ui/Views/ConfigSettings/InboundSettingsPage.xaml.cs b/WinWARP.Ui/Views/ConfigSettings/InboundSettingsPage.xaml.cs new file mode 100644 index 0000000..f3f7d08 --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/InboundSettingsPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui.Views.Settings; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class InboundSettingsPage : Page +{ + public InboundSettingsPage() + { + InitializeComponent(); + } +} diff --git a/WinWARP.Ui/Views/ConfigSettings/RoutingSettingsPage.xaml b/WinWARP.Ui/Views/ConfigSettings/RoutingSettingsPage.xaml new file mode 100644 index 0000000..5c7d971 --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/RoutingSettingsPage.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/WinWARP.Ui/Views/ConfigSettings/RoutingSettingsPage.xaml.cs b/WinWARP.Ui/Views/ConfigSettings/RoutingSettingsPage.xaml.cs new file mode 100644 index 0000000..a6cbbad --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/RoutingSettingsPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui.Views.Settings; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class RoutingSettingsPage : Page +{ + public RoutingSettingsPage() + { + InitializeComponent(); + } +} diff --git a/WinWARP.Ui/Views/ConfigSettings/TlsSettingsPage.xaml b/WinWARP.Ui/Views/ConfigSettings/TlsSettingsPage.xaml new file mode 100644 index 0000000..3bca1eb --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/TlsSettingsPage.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/WinWARP.Ui/Views/ConfigSettings/TlsSettingsPage.xaml.cs b/WinWARP.Ui/Views/ConfigSettings/TlsSettingsPage.xaml.cs new file mode 100644 index 0000000..06a637d --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/TlsSettingsPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui.Views.Settings; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class TlsSettingsPage : Page +{ + public TlsSettingsPage() + { + InitializeComponent(); + } +} diff --git a/WinWARP.Ui/Views/ConfigSettings/WarpSettingsPage.xaml b/WinWARP.Ui/Views/ConfigSettings/WarpSettingsPage.xaml new file mode 100644 index 0000000..972de7d --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/WarpSettingsPage.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/WinWARP.Ui/Views/ConfigSettings/WarpSettingsPage.xaml.cs b/WinWARP.Ui/Views/ConfigSettings/WarpSettingsPage.xaml.cs new file mode 100644 index 0000000..ee9516d --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettings/WarpSettingsPage.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui.Views.Settings; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class WarpSettingsPage : Page +{ + public WarpSettingsPage() + { + InitializeComponent(); + } +} diff --git a/WinWARP.Ui/Views/ConfigSettingsPage.xaml b/WinWARP.Ui/Views/ConfigSettingsPage.xaml new file mode 100644 index 0000000..a8ed964 --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettingsPage.xaml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/WinWARP.Ui/Views/ConfigSettingsPage.xaml.cs b/WinWARP.Ui/Views/ConfigSettingsPage.xaml.cs new file mode 100644 index 0000000..cc21127 --- /dev/null +++ b/WinWARP.Ui/Views/ConfigSettingsPage.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace WinWARP.Ui.Views; +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class ConfigSettingsPage : Page +{ + public ConfigSettingsPage() + { + InitializeComponent(); + } +} diff --git a/WinWARP.Ui/Views/HomePage.xaml b/WinWARP.Ui/Views/HomePage.xaml new file mode 100644 index 0000000..7d896da --- /dev/null +++ b/WinWARP.Ui/Views/HomePage.xaml @@ -0,0 +1,14 @@ + + + + +