Initial commit

This commit is contained in:
2026-08-22 19:11:00 +03:00 Unverified
commit db368674d4
74 changed files with 2739 additions and 0 deletions
+400
View File
@@ -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
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WinWARP.Core.Services;
public interface ILocalizationService
{
IEnumerable<string> GetSupportedLanguages();
string GetCurrentLanguage();
Task SetLanguageAsync(string languageCode);
string GetString(string resourceKey);
}
@@ -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<TViewModel>(object parameter = null) where TViewModel : class;
void GoBack();
bool CanGoBack
{
get;
}
Type CurrentViewModelType { get; }
event EventHandler<Type> NavigatedToViewModel;
}
@@ -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
{
}
@@ -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
{
}
@@ -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
{
}
@@ -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
{
}
@@ -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
{
}
@@ -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
{
}
+24
View File
@@ -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<SettingsViewModel>();
}
}
+35
View File
@@ -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]);
}
}
}
@@ -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
{
}
@@ -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
{
}
@@ -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<string>(_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<string> Languages;
}
@@ -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
{
}
+18
View File
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageReference Include="SingBoxLib" Version="1.2.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\Navigation\" />
</ItemGroup>
</Project>
+7
View File
@@ -0,0 +1,7 @@
using WinWARP.Service;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>();
var host = builder.Build();
host.Run();
@@ -0,0 +1,12 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"WinWARP.Service": {
"commandName": "Project",
"dotnetRunMessages": true,
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
}
+17
View File
@@ -0,0 +1,17 @@
Copyright (C) 2022 by nekohasekai <contact-sagernet@sekai.icu>
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 <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association
with this application without prior consent.
Binary file not shown.
Binary file not shown.
+23
View File
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>dotnet-WinWARP.Service-9594206a-c78e-4e2b-b552-78863ffa4924</UserSecretsId>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.9" />
<PackageReference Include="SingBoxLib" Version="1.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WinWARP.Shared\WinWARP.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="..\Shared\greet.proto" Link="Protos\greet.proto" GrpcServices="None" />
</ItemGroup>
</Project>
+91
View File
@@ -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<Worker> 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<OutboundConfig>
{
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);
//}
}
}
+79
View File
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
+8
View File
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
+6
View File
@@ -0,0 +1,6 @@
namespace WinWARP.Shared;
public class Class1
{
}
+22
View File
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.35.1" />
<PackageReference Include="Grpc" Version="2.46.6" />
<PackageReference Include="Grpc.Tools" Version="2.83.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Protobuf Include="greet.proto" GrpcServices="Both" />
</ItemGroup>
</Project>
+17
View File
@@ -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;
}
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Application
x:Class="WinWARP.Ui.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
<x:Double x:Key="TitleBarHeightTall">48</x:Double>
</ResourceDictionary>
</Application.Resources>
</Application>
+123
View File
@@ -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;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : Application
{
public static IServiceProvider Services
{
get;
private set;
}
private Window? _window;
/// <summary>
/// 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().
/// </summary>
public App()
{
InitializeComponent();
Services = ConfigureServices();
}
/// <summary>
/// Configures the services for dependency injection.
/// </summary>
/// <returns></returns>
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<ILocalizationService, LocalizationService>();
services.AddSingleton<INavigationService>(navigationService);
// ViewModels
services.AddTransient<HomeViewModel>();
services.AddTransient<SettingsViewModel>();
services.AddTransient<SubsSettingsViewModel>();
services.AddTransient<ConfigSettingsViewModel>();
services.AddSingleton<MainViewModel>();
services.AddTransient<DnsSettingsViewModel>();
services.AddTransient<GeneralSettingsViewModel>();
services.AddTransient<InboundSettingsViewModel>();
services.AddTransient<RoutingSettingsViewModel>();
services.AddTransient<TlsSettingsViewModel>();
services.AddTransient<WarpSettingsViewModel>();
// Views
services.AddTransient<MainWindow>();
return services.BuildServiceProvider();
}
/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
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<MainWindow>();
_window.Activate();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -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();
}
}
@@ -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();
}
}
+20
View File
@@ -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;
}
}
+97
View File
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="WinWARP.Ui.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:av="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:conv="using:WinWARP.Ui.Converters"
xmlns:vm="using:WinWARP.Core.ViewModels"
xmlns:h="using:WinWARP.Ui.Helpers"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d"
Title="{x:Bind ViewModel.Title, Mode=OneWay}">
<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>
<Grid x:Name="RootGrid">
<Grid.Resources>
<conv:ItemInvokedEventArgsConverter x:Key="ItemInvokedEventArgsConverter" />
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TitleBar
Title="{x:Bind ViewModel.Title, Mode=OneWay}" x:Name="TopAppBar"
Subtitle="alpha"
IsBackButtonVisible="{x:Bind RootFrame.CanGoBack, Mode=OneWay}" BackRequested="TitleBar_BackRequested"
IsPaneToggleButtonVisible="True" PaneToggleRequested="TitleBar_PaneToggleRequested">
<TitleBar.IconSource>
<ImageIconSource ImageSource="/Assets/Square44x44Logo.targetsize-24_altform-unplated.png" />
</TitleBar.IconSource>
<TitleBar.Content>
<Border/>
</TitleBar.Content>
</TitleBar>
<NavigationView Grid.Row="1" x:Name="RootNavigationView"
IsBackButtonVisible="Collapsed" IsBackEnabled="True"
IsPaneToggleButtonVisible="False" IsPaneOpen="True"
IsSettingsVisible="False">
<i:Interaction.Behaviors>
<i:EventTriggerBehavior EventName="ItemInvoked">
<i:InvokeCommandAction
Command="{x:Bind ViewModel.NavigateCommand}"
InputConverter="{StaticResource ItemInvokedEventArgsConverter}" />
</i:EventTriggerBehavior>
</i:Interaction.Behaviors>
<NavigationView.MenuItems>
<NavigationViewItem u:Uids.Uid="HomePageNavPaneTitle" Tag="{h:Type TargetType=vm:HomeViewModel}" IsSelected="True">
<NavigationViewItem.Icon>
<FontIcon Glyph="&#xE80F;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem u:Uids.Uid="SubsSettingsPageNavPaneTitle" Tag="{h:Type TargetType=vm:SubsSettingsViewModel}">
<NavigationViewItem.Icon>
<FontIcon Glyph="&#xEC5C;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem u:Uids.Uid="ConfigSettingsPageNavPaneTitle" Tag="{h:Type TargetType=vm:ConfigSettingsViewModel}">
<NavigationViewItem.Icon>
<FontIcon Glyph="&#xF080;" />
</NavigationViewItem.Icon>
</NavigationViewItem>
</NavigationView.MenuItems>
<NavigationView.FooterMenuItems>
<NavigationViewItem u:Uids.Uid="SettingsPageNavPaneTitle" Tag="{h:Type TargetType=vm:SettingsViewModel}">
<NavigationViewItem.Icon>
<AnimatedIcon>
<AnimatedIcon.Source>
<av:AnimatedSettingsVisualSource/>
</AnimatedIcon.Source>
<AnimatedIcon.FallbackIconSource>
<FontIconSource Glyph="&#xE713;"/>
</AnimatedIcon.FallbackIconSource>
</AnimatedIcon>
</NavigationViewItem.Icon>
</NavigationViewItem>
</NavigationView.FooterMenuItems>
<Frame x:Name="RootFrame">
<Frame.ContentTransitions>
<TransitionCollection>
<NavigationThemeTransition>
<NavigationThemeTransition.DefaultNavigationTransitionInfo>
<SlideNavigationTransitionInfo Effect="FromRight"/>
</NavigationThemeTransition.DefaultNavigationTransitionInfo>
</NavigationThemeTransition>
</TransitionCollection>
</Frame.ContentTransitions>
</Frame>
</NavigationView>
</Grid>
</Window>
+95
View File
@@ -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;
/// <summary>
/// An empty window that can be used on its own or navigated to within a Frame.
/// </summary>
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<INavigationService>();
navService.NavigatedToViewModel += NavService_NavigatedToViewModel;
navService.RegisterFrame(RootFrame);
navService.NavigateTo<HomeViewModel>();
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<NavigationViewItem>()
.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();
}
}
}
}
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:systemai="http://schemas.microsoft.com/appx/manifest/systemai/windows10"
IgnorableNamespaces="uap rescap systemai">
<Identity
Name="1423afec-48f0-4a56-a39b-a7c21bf136c9"
Publisher="CN=retrd"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="1423afec-48f0-4a56-a39b-a7c21bf136c9" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>WinWARP.Ui</DisplayName>
<PublisherDisplayName>retrd</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.26226.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.26226.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="WinWARP.Ui"
Description="WinWARP.Ui"
BackgroundColor="transparent"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<systemai:Capability Name="systemAIModels"/>
</Capabilities>
</Package>
+10
View File
@@ -0,0 +1,10 @@
{
"profiles": {
"WinWARP.Ui (Package)": {
"commandName": "MsixPackage"
},
"WinWARP.Ui (Unpackaged)": {
"commandName": "Project"
}
}
}
@@ -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<string> 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);
}
+72
View File
@@ -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<Type, Type> _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<TViewModel>(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<Type> 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);
}
}
}
+222
View File
@@ -0,0 +1,222 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="HomePageNavPaneTitle.Content" xml:space="preserve">
<value>Home page</value>
</data>
<data name="SettingsPageLanguageSetting.Description" xml:space="preserve">
<value>Will be applied whenever possible in the app</value>
</data>
<data name="SettingsPageLanguageSettingsHeader.Text" xml:space="preserve">
<value>Language</value>
</data>
<data name="SettingsPageLanguageSettingSyncSetting.Header" xml:space="preserve">
<value>Use system language</value>
</data>
<data name="SettingsPageNavPaneTitle.Content" xml:space="preserve">
<value>Settings</value>
</data>
<data name="SettingsPageLanguageSetting.Header" xml:space="preserve">
<value>WinWARP language</value>
</data>
<data name="SettingsPageTitle.Text" xml:space="preserve">
<value>Settings</value>
</data>
<data name="SettingsPageAppSettingsHeader.Text" xml:space="preserve">
<value>App Settings</value>
</data>
<data name="SettingsPageGeneralSettings.Header" xml:space="preserve">
<value>General settings</value>
</data>
<data name="SettingsPageGeneralSettings.Description" xml:space="preserve">
<value>Theme, launch behavior, and more</value>
</data>
<data name="SettingsPageUpdateSettings.Header" xml:space="preserve">
<value>Update settings</value>
</data>
<data name="SettingsPageUpdateSettings.Description" xml:space="preserve">
<value>Automatic updates, update behavior</value>
</data>
<data name="SettingsPageVPNSettingsHeader.Text" xml:space="preserve">
<value>VPN Settings</value>
</data>
<data name="SettingsPageLanguageSettingSyncSettingToggle.OnContent" xml:space="preserve">
<value>On</value>
</data>
<data name="SettingsPageLanguageSettingSyncSettingToggle.OffContent" xml:space="preserve">
<value>Off</value>
</data>
<data name="SettingsPageInboundSettings.Header" xml:space="preserve">
<value>Inbound</value>
</data>
<data name="SettingsPageInboundSettings.Description" xml:space="preserve">
<value>Service mode, port, local share</value>
</data>
<data name="SettingsPageRoutingSettings.Header" xml:space="preserve">
<value>Routing</value>
</data>
<data name="SettingsPageRoutingSettings.Description" xml:space="preserve">
<value>LAN bypass, per-program, per-host split tunneling</value>
</data>
<data name="SettingsPageDnsSettings.Header" xml:space="preserve">
<value>DNS</value>
</data>
<data name="SettingsPageDnsSettings.Description" xml:space="preserve">
<value>DNS provider, fake DNS, DNS strategies</value>
</data>
<data name="SettingsPageTLSSettings.Header" xml:space="preserve">
<value>TLS</value>
</data>
<data name="SettingsPageTLSSettings.Description" xml:space="preserve">
<value>Fragmentation parameters</value>
</data>
<data name="SettingsPageWARPSettings.Header" xml:space="preserve">
<value>WARP</value>
</data>
<data name="SettingsPageWARPSettings.Description" xml:space="preserve">
<value>Clouflare's WARP configuration</value>
</data>
<data name="SettingsUpdateSettingsPageTitle.Text" xml:space="preserve">
<value>Update Settings</value>
</data>
<data name="SettingsWARPSettingsPageTitle.Text" xml:space="preserve">
<value>WARP Settings</value>
</data>
<data name="SettingsTLSSettingsPageTitle.Text" xml:space="preserve">
<value>TLS Settings</value>
</data>
<data name="SettingsRoutingSettingsPageTitle.Text" xml:space="preserve">
<value>Routing Settings</value>
</data>
<data name="SettingsInboundSettingsPageTitle.Text" xml:space="preserve">
<value>Inbound Settings</value>
</data>
<data name="SettingsGeneralSettingsPageTitle.Text" xml:space="preserve">
<value>General Settings</value>
</data>
<data name="SettingsDNSSettingsPageTitle.Text" xml:space="preserve">
<value>DNS Settings</value>
</data>
<data name="SubsSettingsPageNavPaneTitle.Content" xml:space="preserve">
<value>Subscriptions and servers</value>
</data>
<data name="ConfigSettingsPageNavPaneTitle.Content" xml:space="preserve">
<value>Configs settings</value>
</data>
</root>
+222
View File
@@ -0,0 +1,222 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="HomePageNavPaneTitle.Content" xml:space="preserve">
<value>Домашняя</value>
</data>
<data name="SettingsPageLanguageSetting.Description" xml:space="preserve">
<value>Будет использован где возможно в приложении</value>
</data>
<data name="SettingsPageLanguageSettingsHeader.Text" xml:space="preserve">
<value>Язык</value>
</data>
<data name="SettingsPageLanguageSettingSyncSetting.Header" xml:space="preserve">
<value>Использовать язык системы</value>
</data>
<data name="SettingsPageNavPaneTitle.Content" xml:space="preserve">
<value>Настройки</value>
</data>
<data name="SettingsPageLanguageSetting.Header" xml:space="preserve">
<value>Язык приложения</value>
</data>
<data name="SettingsPageTitle.Text" xml:space="preserve">
<value>Настройки</value>
</data>
<data name="SettingsPageAppSettingsHeader.Text" xml:space="preserve">
<value>Настройки приложения</value>
</data>
<data name="SettingsPageGeneralSettings.Header" xml:space="preserve">
<value>Общие настройки</value>
</data>
<data name="SettingsPageGeneralSettings.Description" xml:space="preserve">
<value>Тема, поведение при запуске, и пр.</value>
</data>
<data name="SettingsPageUpdateSettings.Header" xml:space="preserve">
<value>Настройки обновлений</value>
</data>
<data name="SettingsPageUpdateSettings.Description" xml:space="preserve">
<value>Автоматические обновления, поведение обновлений</value>
</data>
<data name="SettingsPageVPNSettingsHeader.Text" xml:space="preserve">
<value>Настройки VPN</value>
</data>
<data name="SettingsPageLanguageSettingSyncSettingToggle.OnContent" xml:space="preserve">
<value>Вкл.</value>
</data>
<data name="SettingsPageLanguageSettingSyncSettingToggle.OffContent" xml:space="preserve">
<value>Выкл.</value>
</data>
<data name="SettingsPageInboundSettings.Header" xml:space="preserve">
<value>Вход</value>
</data>
<data name="SettingsPageInboundSettings.Description" xml:space="preserve">
<value>Режим сервиса, порт, локальный доступ</value>
</data>
<data name="SettingsPageRoutingSettings.Header" xml:space="preserve">
<value>Маршруты</value>
</data>
<data name="SettingsPageRoutingSettings.Description" xml:space="preserve">
<value>Локальная сеть, исключения для программ и сайтов</value>
</data>
<data name="SettingsPageDnsSettings.Header" xml:space="preserve">
<value>DNS</value>
</data>
<data name="SettingsPageDnsSettings.Description" xml:space="preserve">
<value>DNS провайдер, fake DNS, DNS стратегия</value>
</data>
<data name="SettingsPageTLSSettings.Header" xml:space="preserve">
<value>TLS</value>
</data>
<data name="SettingsPageTLSSettings.Description" xml:space="preserve">
<value>Параметры фрагментации</value>
</data>
<data name="SettingsPageWARPSettings.Header" xml:space="preserve">
<value>WARP</value>
</data>
<data name="SettingsPageWARPSettings.Description" xml:space="preserve">
<value>Настройки Cloudflare WARP</value>
</data>
<data name="SettingsUpdateSettingsPageTitle.Text" xml:space="preserve">
<value>Настройки обновлений</value>
</data>
<data name="SettingsWARPSettingsPageTitle.Text" xml:space="preserve">
<value>Настройки WARP</value>
</data>
<data name="SettingsTLSSettingsPageTitle.Text" xml:space="preserve">
<value>Настройки TLS</value>
</data>
<data name="SettingsRoutingSettingsPageTitle.Text" xml:space="preserve">
<value>Настройки маршрутов</value>
</data>
<data name="SettingsInboundSettingsPageTitle.Text" xml:space="preserve">
<value>Настройки входа</value>
</data>
<data name="SettingsGeneralSettingsPageTitle.Text" xml:space="preserve">
<value>Общие настройки</value>
</data>
<data name="SettingsDNSSettingsPageTitle.Text" xml:space="preserve">
<value>Настройки DNS</value>
</data>
<data name="SubsSettingsPageNavPaneTitle.Content" xml:space="preserve">
<value>Подписки и сервера</value>
</data>
<data name="ConfigSettingsPageNavPaneTitle.Content" xml:space="preserve">
<value>Конфигурации</value>
</data>
</root>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.Settings.DnsSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Settings"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<TextBlock u:Uids.Uid="SettingsDNSSettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
</StackPanel>
</ScrollView>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class DnsSettingsPage : Page
{
public DnsSettingsPage()
{
InitializeComponent();
}
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.Settings.InboundSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Settings"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<TextBlock u:Uids.Uid="SettingsInboundSettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
</StackPanel>
</ScrollView>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class InboundSettingsPage : Page
{
public InboundSettingsPage()
{
InitializeComponent();
}
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.Settings.RoutingSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Settings"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<TextBlock u:Uids.Uid="SettingsRoutingSettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
</StackPanel>
</ScrollView>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class RoutingSettingsPage : Page
{
public RoutingSettingsPage()
{
InitializeComponent();
}
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.Settings.TlsSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Settings"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<TextBlock u:Uids.Uid="SettingsTLSSettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
</StackPanel>
</ScrollView>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class TlsSettingsPage : Page
{
public TlsSettingsPage()
{
InitializeComponent();
}
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.Settings.WarpSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Settings"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<TextBlock u:Uids.Uid="SettingsWARPSettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
</StackPanel>
</ScrollView>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class WarpSettingsPage : Page
{
public WarpSettingsPage()
{
InitializeComponent();
}
}
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.ConfigSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
</Grid>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class ConfigSettingsPage : Page
{
public ConfigSettingsPage()
{
InitializeComponent();
}
}
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.HomePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Button Command="{x:Bind ViewModel.TestTransitionCommand}" Content="Test Transition"/>
</Grid>
</Page>
+36
View File
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
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 Windows.Foundation;
using Windows.Foundation.Collections;
using WinWARP.Core.ViewModels;
// 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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class HomePage : Page
{
public HomeViewModel ViewModel { get; }
public HomePage()
{
InitializeComponent();
ViewModel = App.Services.GetRequiredService<HomeViewModel>();
DataContext = ViewModel;
}
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.Settings.GeneralSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Settings"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<TextBlock u:Uids.Uid="SettingsGeneralSettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
</StackPanel>
</ScrollView>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class GeneralSettingsPage : Page
{
public GeneralSettingsPage()
{
InitializeComponent();
}
}
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.Settings.UpdateSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views.Settings"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<TextBlock u:Uids.Uid="SettingsUpdateSettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
</StackPanel>
</ScrollView>
</Page>
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class UpdateSettingsPage : Page
{
public UpdateSettingsPage()
{
InitializeComponent();
}
}
+85
View File
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.SettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:WinWARP.Core.ViewModels.Settings"
xmlns:c="using:CommunityToolkit.WinUI.Controls"
xmlns:conv="using:WinWARP.Ui.Converters"
xmlns:h="using:WinWARP.Ui.Helpers"
xmlns:u="using:WinUI3Localizer"
mc:Ignorable="d">
<ScrollView>
<StackPanel Margin="24,14,24,24">
<StackPanel.Resources>
<conv:LanguageCodeToNameConverter x:Key="LanguageCodeToNameConverter" />
</StackPanel.Resources>
<TextBlock u:Uids.Uid="SettingsPageTitle" Style="{StaticResource TitleTextBlockStyle}" Margin="0,0,0,10"/>
<!--App settings-->
<TextBlock u:Uids.Uid="SettingsPageAppSettingsHeader" Style="{StaticResource BodyStrongTextBlockStyle}" Margin="0,16,0,10"/>
<c:SettingsCard IsClickEnabled="True" u:Uids.Uid="SettingsPageGeneralSettings" Command="{x:Bind ViewModel.NavigateCommand}" CommandParameter="{h:Type TargetType=vm:GeneralSettingsViewModel}">
<c:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xEB3B;" />
</c:SettingsCard.HeaderIcon>
</c:SettingsCard>
<c:SettingsCard IsClickEnabled="True" u:Uids.Uid="SettingsPageUpdateSettings" Command="{x:Bind ViewModel.NavigateCommand}" CommandParameter="{h:Type TargetType=vm:UpdateSettingsViewModel}">
<c:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xE895;" />
</c:SettingsCard.HeaderIcon>
</c:SettingsCard>
<!--VPN settings--><!--
<TextBlock u:Uids.Uid="SettingsPageVPNSettingsHeader" Style="{StaticResource BodyStrongTextBlockStyle}" Margin="0,16,0,10"/>
<c:SettingsCard IsClickEnabled="True" u:Uids.Uid="SettingsPageInboundSettings" Command="{x:Bind ViewModel.NavigateCommand}" CommandParameter="{h:Type TargetType=vm:InboundSettingsViewModel}">
<c:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xE8B5;" />
</c:SettingsCard.HeaderIcon>
</c:SettingsCard>
<c:SettingsCard IsClickEnabled="True" u:Uids.Uid="SettingsPageRoutingSettings" Command="{x:Bind ViewModel.NavigateCommand}" CommandParameter="{h:Type TargetType=vm:RoutingSettingsViewModel}">
<c:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xEC26;" />
</c:SettingsCard.HeaderIcon>
</c:SettingsCard>
<c:SettingsCard IsClickEnabled="True" u:Uids.Uid="SettingsPageDnsSettings" Command="{x:Bind ViewModel.NavigateCommand}" CommandParameter="{h:Type TargetType=vm:DnsSettingsViewModel}">
<c:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xE774;" />
</c:SettingsCard.HeaderIcon>
</c:SettingsCard>
<c:SettingsCard IsClickEnabled="True" u:Uids.Uid="SettingsPageTLSSettings" Command="{x:Bind ViewModel.NavigateCommand}" CommandParameter="{h:Type TargetType=vm:TlsSettingsViewModel}">
<c:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xF5EF;" />
</c:SettingsCard.HeaderIcon>
</c:SettingsCard>
<c:SettingsCard IsClickEnabled="True" u:Uids.Uid="SettingsPageWARPSettings" Command="{x:Bind ViewModel.NavigateCommand}" CommandParameter="{h:Type TargetType=vm:WarpSettingsViewModel}">
<c:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xE945;" />
</c:SettingsCard.HeaderIcon>
</c:SettingsCard>-->
<!--Language setting-->
<TextBlock u:Uids.Uid="SettingsPageLanguageSettingsHeader" Style="{StaticResource BodyStrongTextBlockStyle}" Margin="0,16,0,10"/>
<c:SettingsExpander u:Uids.Uid="SettingsPageLanguageSetting">
<ComboBox ItemsSource="{x:Bind ViewModel.Languages}" SelectedItem="{x:Bind ViewModel.SelectedLanguage, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="x:String">
<TextBlock Text="{Binding Converter={StaticResource LanguageCodeToNameConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<c:SettingsExpander.HeaderIcon>
<FontIcon Glyph="&#xF2B7;" />
</c:SettingsExpander.HeaderIcon>
<c:SettingsExpander.Items>
<c:SettingsCard u:Uids.Uid="SettingsPageLanguageSettingSyncSetting">
<ToggleSwitch u:Uids.Uid="SettingsPageLanguageSettingSyncSettingToggle"/>
</c:SettingsCard>
</c:SettingsExpander.Items>
</c:SettingsExpander>
</StackPanel>
</ScrollView>
</Page>
+39
View File
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
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 Windows.Foundation;
using Windows.Foundation.Collections;
using WinWARP.Core.ViewModels;
// 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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class SettingsPage : Page
{
public SettingsViewModel ViewModel
{
get;
}
public SettingsPage()
{
InitializeComponent();
ViewModel = App.Services.GetRequiredService<SettingsViewModel>();
DataContext = ViewModel;
}
}
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="WinWARP.Ui.Views.SubsSettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinWARP.Ui.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
</Grid>
</Page>
+29
View File
@@ -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;
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class SubsSettingsPage : Page
{
public SubsSettingsPage()
{
InitializeComponent();
}
}
+161
View File
@@ -0,0 +1,161 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>WinWARP.Ui</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;ARM64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<WinUISDKReferences>false</WinUISDKReferences>
<WindowsPackageType>None</WindowsPackageType>
<WindowsAppSdkBootstrapInitialize>true</WindowsAppSdkBootstrapInitialize>
<EnableMsixTooling>true</EnableMsixTooling>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Remove="Views\HomePage.xaml" />
<None Remove="Views\SettingsPage.xaml" />
<None Remove="Views\Settings\DnsSettingsPage.xaml" />
<None Remove="Views\Settings\GeneralSettingsPage.xaml" />
<None Remove="Views\Settings\InboundSettingsPage.xaml" />
<None Remove="Views\Settings\RoutingSettingsPage.xaml" />
<None Remove="Views\Settings\TLSSettingsPage.xaml" />
<None Remove="Views\Settings\UpdateSettingsPage.xaml" />
<None Remove="Views\Settings\WarpSettingsPage.xaml" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
<Content Include="Strings\**\*.resw">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
<!--
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
Tools extension to be activated for this project even if the Windows App SDK Nuget
package has not yet been restored.
-->
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<ProjectCapability Include="Msix" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.251219" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.10" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.10" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.2526" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="2.3.1" />
<PackageReference Include="SQLitePCLRaw.lib.e_sqlite3" Version="3.53.3" />
<PackageReference Include="WinUI3Localizer" Version="2.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WinWARP.Core\WinWARP.Core.csproj" />
<ProjectReference Include="..\WinWARP.Shared\WinWARP.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="..\Shared\greet.proto" Link="Protos\greet.proto" GrpcServices="None" />
</ItemGroup>
<ItemGroup>
<Page Update="Views\Settings\WarpSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\Settings\TlsSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\Settings\DnsSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\Settings\RoutingSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\Settings\InboundSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\Settings\UpdateSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\SettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\HomePage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\Settings\GeneralSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Folder Include="Views\ConfigSettings\" />
</ItemGroup>
<ItemGroup>
<Page Update="Views\SubsSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Views\ConfigSettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<!--
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
Explorer "Package and Publish" context menu entry to be enabled for this project even if
the Windows App SDK Nuget package has not yet been restored.
-->
<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
</PropertyGroup>
<!-- Publish Properties -->
<PropertyGroup>
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
<PublishTrimmed Condition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
<PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
</PropertyGroup>
</Project>
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="WinWARP.Ui.app"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- The ID below informs the system that this application is compatible with OS features first introduced in Windows 10.
It is necessary to support features in unpackaged applications, for example the custom titlebar implementation.
For more info see https://docs.microsoft.com/windows/apps/windows-app-sdk/use-windows-app-sdk-run-time#declare-os-compatibility-in-your-application-manifest -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
</assembly>
+9
View File
@@ -0,0 +1,9 @@
<Solution>
<Project Path="WinWARP.Core/WinWARP.Core.csproj" Id="f98762e3-6437-4525-b355-04fba900af72" />
<Project Path="WinWARP.Service/WinWARP.Service.csproj" />
<Project Path="WinWARP.Shared/WinWARP.Shared.csproj" />
<Project Path="WinWARP.Ui/WinWARP.Ui.csproj">
<Platform Project="x64" />
<Deploy />
</Project>
</Solution>