From 5a79ceccba6d2f75b0750286e7b40c38571edaed Mon Sep 17 00:00:00 2001
From: next-autumn <73510229+next-autumn@users.noreply.github.com>
Date: Mon, 14 Nov 2022 09:42:12 +0800
Subject: [PATCH 01/14] =?UTF-8?q?=E5=BF=99...=20=E8=BF=91=E6=9C=9F?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index b87fceb..4847c7a 100644
--- a/README.md
+++ b/README.md
@@ -111,6 +111,7 @@ Microsoft [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-fram
在使用遇到问题时,请先看一下[常见问题集锦](https://github.com/proxysu/windows/wiki/CommonError),如果还不能解决,可以到以上平台询问,个人精力有限,尽力解答。
+忙... 近期更新。
From 13e5edf50d299f4b0a01f4d6fe90b979cd1bb610 Mon Sep 17 00:00:00 2001
From: 123 <123@github.com>
Date: Tue, 15 Nov 2022 09:59:46 +0800
Subject: [PATCH 02/14] update packages
---
ProxySuper.Core/ProxySuper.Core.csproj | 29 ++++++++++++++++++-----
ProxySuper.Core/app.config | 15 ++++++++++++
ProxySuper.Core/packages.config | 11 ++++++---
ProxySuper.WPF/App.config | 16 +++++++++++--
ProxySuper.WPF/ProxySuper.WPF.csproj | 32 +++++++++++++++++++-------
ProxySuper.WPF/packages.config | 13 +++++++----
6 files changed, 93 insertions(+), 23 deletions(-)
create mode 100644 ProxySuper.Core/app.config
diff --git a/ProxySuper.Core/ProxySuper.Core.csproj b/ProxySuper.Core/ProxySuper.Core.csproj
index 2b7140f..7ceeb44 100644
--- a/ProxySuper.Core/ProxySuper.Core.csproj
+++ b/ProxySuper.Core/ProxySuper.Core.csproj
@@ -32,8 +32,11 @@
4
-
- ..\packages\MvvmCross.7.1.2\lib\net461\MvvmCross.dll
+
+ ..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
+
+
+ ..\packages\MvvmCross.8.0.2\lib\net461\MvvmCross.dll
False
@@ -41,17 +44,30 @@
-
- ..\packages\QRCoder.1.4.1\lib\net40\QRCoder.dll
+
+ ..\packages\QRCoder.1.4.3\lib\net40\QRCoder.dll
-
- ..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll
+
+ ..\packages\SSH.NET.2020.0.2\lib\net40\Renci.SshNet.dll
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
..\packages\System.Console.4.3.1\lib\net46\System.Console.dll
+
+ ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll
+
+
+
+ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
+
@@ -123,6 +139,7 @@
+
diff --git a/ProxySuper.Core/app.config b/ProxySuper.Core/app.config
new file mode 100644
index 0000000..0703d68
--- /dev/null
+++ b/ProxySuper.Core/app.config
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProxySuper.Core/packages.config b/ProxySuper.Core/packages.config
index 7880216..3943ce6 100644
--- a/ProxySuper.Core/packages.config
+++ b/ProxySuper.Core/packages.config
@@ -1,7 +1,12 @@
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ProxySuper.WPF/App.config b/ProxySuper.WPF/App.config
index ecdcf8a..66da88e 100644
--- a/ProxySuper.WPF/App.config
+++ b/ProxySuper.WPF/App.config
@@ -1,6 +1,18 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj
index bc4d57b..b1cbbdd 100644
--- a/ProxySuper.WPF/ProxySuper.WPF.csproj
+++ b/ProxySuper.WPF/ProxySuper.WPF.csproj
@@ -32,19 +32,25 @@
ProxySuper.WPF.App
-
- ..\packages\MvvmCross.7.1.2\lib\net461\MvvmCross.dll
+
+ ..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
-
- ..\packages\MvvmCross.Platforms.Wpf.7.1.2\lib\net461\MvvmCross.Platforms.Wpf.dll
+
+ ..\packages\MvvmCross.8.0.2\lib\net461\MvvmCross.dll
-
- ..\packages\QRCoder.1.4.1\lib\net40\QRCoder.dll
+
+ ..\packages\MvvmCross.Platforms.Wpf.8.0.2\lib\net461\MvvmCross.Platforms.Wpf.dll
-
- ..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll
+
+ ..\packages\QRCoder.1.4.3\lib\net40\QRCoder.dll
+
+
+ ..\packages\SSH.NET.2020.0.2\lib\net40\Renci.SshNet.dll
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
@@ -52,6 +58,16 @@
+
+ ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll
+
+
+
+ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
+
..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll
diff --git a/ProxySuper.WPF/packages.config b/ProxySuper.WPF/packages.config
index 2d3989c..85b846b 100644
--- a/ProxySuper.WPF/packages.config
+++ b/ProxySuper.WPF/packages.config
@@ -1,10 +1,15 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 89649d136fca13821d7b0b124455088c0ef1d215 Mon Sep 17 00:00:00 2001
From: autumn
Date: Sun, 20 Nov 2022 23:00:16 +0800
Subject: [PATCH 03/14] update ...
---
ProxySuper.WPF/App.xaml | 1 +
ProxySuper.WPF/App.xaml.cs | 2 +-
.../Controls/XraySettingsControl.xaml | 392 +++++++++---------
ProxySuper.WPF/ProxySuper.WPF.csproj | 1 +
ProxySuper.WPF/Resources/Languages/en.xaml | 5 +-
ProxySuper.WPF/Resources/Languages/tw_cn.xaml | 5 +-
ProxySuper.WPF/Resources/Languages/zh_cn.xaml | 5 +-
ProxySuper.WPF/Setup.cs | 23 +
ProxySuper.WPF/Views/HomeView.xaml.cs | 7 +-
ProxySuper.WPF/Views/Xray/XrayConfigView.xaml | 7 -
10 files changed, 236 insertions(+), 212 deletions(-)
create mode 100644 ProxySuper.WPF/Setup.cs
diff --git a/ProxySuper.WPF/App.xaml b/ProxySuper.WPF/App.xaml
index 1a171b3..ff48f9e 100644
--- a/ProxySuper.WPF/App.xaml
+++ b/ProxySuper.WPF/App.xaml
@@ -6,6 +6,7 @@
xmlns:ui="http://schemas.modernwpf.com/2019"
StartupUri="MainWindow.xaml">
+
diff --git a/ProxySuper.WPF/App.xaml.cs b/ProxySuper.WPF/App.xaml.cs
index 52c5e57..1eb4bc6 100644
--- a/ProxySuper.WPF/App.xaml.cs
+++ b/ProxySuper.WPF/App.xaml.cs
@@ -11,7 +11,7 @@ namespace ProxySuper.WPF
{
protected override void RegisterSetup()
{
- this.RegisterSetupType>();
+ this.RegisterSetupType();
}
}
}
diff --git a/ProxySuper.WPF/Controls/XraySettingsControl.xaml b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
index 236503a..5754f42 100644
--- a/ProxySuper.WPF/Controls/XraySettingsControl.xaml
+++ b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
@@ -47,7 +47,7 @@
VerticalContentAlignment="Center"
Foreground="LimeGreen"
IsChecked="{Binding Path=Checked_VLESS_gRPC}">
-
+
@@ -98,107 +98,116 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+ Padding="12,3"
+ Command="{Binding Path=RandomUuid}"
+ Content="{DynamicResource Random}" />
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj
index b1cbbdd..16e36ae 100644
--- a/ProxySuper.WPF/ProxySuper.WPF.csproj
+++ b/ProxySuper.WPF/ProxySuper.WPF.csproj
@@ -136,6 +136,7 @@
MainWindow.xaml
+
BrookConfigView.xaml
diff --git a/ProxySuper.WPF/Resources/Languages/en.xaml b/ProxySuper.WPF/Resources/Languages/en.xaml
index 50a5e08..c22dc99 100644
--- a/ProxySuper.WPF/Resources/Languages/en.xaml
+++ b/ProxySuper.WPF/Resources/Languages/en.xaml
@@ -67,9 +67,10 @@
- VLESS over TCP With XTLS
Preferred
- VLESS over TCP with TLS
XTLS is Preferred
+ VLESS over TCP With XTLS
+ VLESS over TCP with TLS
VLESS over WS with TLS
Support CDN
+ VLESS gRPC
http2,multiplexing。
VLESS mKCP
low delay,without Domain
VMESS over WS with TLS
Support CDN
VMESS mKCP
low delay,without Domian
diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
index 48c8c5f..f7bd196 100644
--- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
@@ -65,9 +65,10 @@
Socks5
- VLESS Over TCP With XTLS
性能數倍,首選方式。
- VLESS over TCP with TLS
仍推薦XTLS。
+ VLESS Over TCP With XTLS
安全隱患,謹慎。
+ VLESS over TCP with TLS
VLESS over WS with TLS
推薦,支持CDN。
+ VLESS gRPC
基於http2,多路複用。
VLESS mKCP
遊戲推薦,延遲低,免域名。
VMESS over WS with TLS
推薦,支持CDN。
VMESS mKCP
遊戲推薦,延遲低,免域名。
diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
index c33beca..8257ef0 100644
--- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
@@ -66,9 +66,10 @@
Socks5
- VLESS Over TCP With XTLS
性能数倍,首选方式。
- VLESS over TCP with TLS
仍推荐XTLS。
+ VLESS Over TCP With XTLS
安全隐患,谨慎。
+ VLESS over TCP with TLS
推荐,主流。
VLESS over WS with TLS
推荐,支持CDN。
+ VLESS gRPC
基于http2,多路复用。
VLESS mKCP
游戏推荐,延迟低,免域名。
VMESS over WS with TLS
推荐,支持CDN。
VMESS mKCP
游戏推荐,延迟低,免域名。
diff --git a/ProxySuper.WPF/Setup.cs b/ProxySuper.WPF/Setup.cs
new file mode 100644
index 0000000..47fc9bc
--- /dev/null
+++ b/ProxySuper.WPF/Setup.cs
@@ -0,0 +1,23 @@
+using Microsoft.Extensions.Logging;
+using MvvmCross.Platforms.Wpf.Core;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ProxySuper.WPF
+{
+ public class Setup : MvxWpfSetup
+ {
+ protected override ILoggerProvider CreateLogProvider()
+ {
+ return null;
+ }
+
+ protected override ILoggerFactory CreateLogFactory()
+ {
+ return null;
+ }
+ }
+}
diff --git a/ProxySuper.WPF/Views/HomeView.xaml.cs b/ProxySuper.WPF/Views/HomeView.xaml.cs
index 2d3fe84..bd23852 100644
--- a/ProxySuper.WPF/Views/HomeView.xaml.cs
+++ b/ProxySuper.WPF/Views/HomeView.xaml.cs
@@ -1,6 +1,8 @@
using MvvmCross;
using MvvmCross.Navigation;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.ViewModels;
using ProxySuper.Core.Models;
using ProxySuper.Core.ViewModels;
using System;
@@ -10,9 +12,8 @@ using System.Windows;
namespace ProxySuper.WPF.Views
{
- ///
- /// HomeView.xaml 的交互逻辑
- ///
+ [MvxContentPresentation]
+ [MvxViewFor(typeof(HomeViewModel))]
public partial class HomeView : MvxWpfView
{
diff --git a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml
index eeca787..a9a9625 100644
--- a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml
+++ b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml
@@ -59,13 +59,6 @@
-
-
Date: Mon, 21 Nov 2022 15:24:48 +0800
Subject: [PATCH 04/14] update xray editor ui
---
.../Controls/XraySettingsControl.xaml | 385 +++++++++---------
ProxySuper.WPF/Resources/Languages/en.xaml | 23 +-
ProxySuper.WPF/Resources/Languages/tw_cn.xaml | 22 +-
ProxySuper.WPF/Resources/Languages/zh_cn.xaml | 24 +-
ProxySuper.WPF/Views/Xray/XrayEditorView.xaml | 67 ++-
5 files changed, 267 insertions(+), 254 deletions(-)
diff --git a/ProxySuper.WPF/Controls/XraySettingsControl.xaml b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
index 5754f42..86543c9 100644
--- a/ProxySuper.WPF/Controls/XraySettingsControl.xaml
+++ b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
@@ -11,203 +11,205 @@
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
+
-
-
+
+
-
-
+
-
-
+
+
-
-
+
-
-
+
+
-
-
+
-
-
+
+
+
-
-
-
-
-
+
+
-
-
+
+
-
-
+
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
-
+ }">
+
+
+
-
-
+
-
-
-
+ }">
+
+
+
-
-
+
-
-
+
-
-
+
+
-
-
+
-
-
-
+
+
+
-
-
+
-
-
-
+ }">
+
+
+
-
-
-
-
+
+
+
-
-
-
+
-
-
+
-
+ Width="260" />
+
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
+
-
-
-
+
+
+
-
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
-
diff --git a/ProxySuper.WPF/Resources/Languages/en.xaml b/ProxySuper.WPF/Resources/Languages/en.xaml
index c22dc99..c0bd5c3 100644
--- a/ProxySuper.WPF/Resources/Languages/en.xaml
+++ b/ProxySuper.WPF/Resources/Languages/en.xaml
@@ -64,18 +64,21 @@
None
Http
Socks5
-
+
+
+ Proxy Type
+ Params
- VLESS over TCP With XTLS
- VLESS over TCP with TLS
- VLESS over WS with TLS
Support CDN
- VLESS gRPC
http2,multiplexing。
- VLESS mKCP
low delay,without Domain
- VMESS over WS with TLS
Support CDN
- VMESS mKCP
low delay,without Domian
- ShadowSocks
Support UDP,without Domain
- Trojan over TCP with TLS
Trojan
+ VLESS XTLS
+ VLESS TCP
+ VLESS WS
+ VLESS gRPC
+ VLESS mKCP
+ VMESS WS
+ VMESS mKCP
+ ShadowSocks
+ Trojan
Domain/IP
Redir Url
diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
index f7bd196..249cfa1 100644
--- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
@@ -64,16 +64,20 @@
Http
Socks5
+
+ 節點類型
+ 節點參數
+
- VLESS Over TCP With XTLS
安全隱患,謹慎。
- VLESS over TCP with TLS
- VLESS over WS with TLS
推薦,支持CDN。
- VLESS gRPC
基於http2,多路複用。
- VLESS mKCP
遊戲推薦,延遲低,免域名。
- VMESS over WS with TLS
推薦,支持CDN。
- VMESS mKCP
遊戲推薦,延遲低,免域名。
- ShadowSocks
SS,支持udp,免域名。
- Trojan over TCP with TLS
Trojan。
+ VLESS TCP XTLS
+ VLESS TCP
+ VLESS WS
+ VLESS gRPC
+ VLESS mKCP
+ VMESS WS
+ VMESS mKCP
+ ShadowSocks
+ Trojan
域名/IP
diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
index 8257ef0..89dbfee 100644
--- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
@@ -65,16 +65,20 @@
Http
Socks5
+
+ 节点类型
+ 节点参数
+
- VLESS Over TCP With XTLS
安全隐患,谨慎。
- VLESS over TCP with TLS
推荐,主流。
- VLESS over WS with TLS
推荐,支持CDN。
- VLESS gRPC
基于http2,多路复用。
- VLESS mKCP
游戏推荐,延迟低,免域名。
- VMESS over WS with TLS
推荐,支持CDN。
- VMESS mKCP
游戏推荐,延迟低,免域名。
- ShadowSocks
SS,支持udp,免域名。
- Trojan over TCP with TLS
Trojan。
+ VLESS TCP XTLS
+ VLESS TCP
+ VLESS WS
+ VLESS gRPC
+ VLESS mKCP
+ VMESS WS
+ VMESS mKCP
+ ShadowSocks
+ Trojan
域名/IP
@@ -133,5 +137,5 @@
域名/IP
端口
加密前字符
- 密钥
+ 密钥
\ No newline at end of file
diff --git a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
index 4089f44..a548ca9 100644
--- a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
+++ b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
@@ -11,7 +11,7 @@
Icon="/Resources/ProxySU.ico"
BorderThickness="0,1,0,0"
BorderBrush="#EEE"
- Title="Xray编辑配置" Height="610" Width="1015">
+ Title="Xray编辑配置" Height="640" Width="1015">
@@ -26,41 +26,40 @@
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
From db6a399ca9b96adbb731434cc92a41540f1014cc Mon Sep 17 00:00:00 2001
From: autumn
Date: Mon, 21 Nov 2022 16:42:47 +0800
Subject: [PATCH 05/14] add uTLS settings.
---
.../Models/Projects/XraySettings.cs | 4 +
.../ViewModels/XrayEditorViewModel.cs | 13 ++
.../Controls/XraySettingsControl.xaml | 186 +++++++++---------
3 files changed, 109 insertions(+), 94 deletions(-)
diff --git a/ProxySuper.Core/Models/Projects/XraySettings.cs b/ProxySuper.Core/Models/Projects/XraySettings.cs
index e1ed4cc..50292a5 100644
--- a/ProxySuper.Core/Models/Projects/XraySettings.cs
+++ b/ProxySuper.Core/Models/Projects/XraySettings.cs
@@ -9,6 +9,10 @@ namespace ProxySuper.Core.Models.Projects
{
public class XraySettings : V2raySettings
{
+ public static List UTLSList = new List { "", "chrome", "firefox", "safari", "randomized" };
+
+ public string UTLS { get; set; } = UTLSList[1];
+
///
/// vless xtls shareLink
///
diff --git a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs
index d9c281d..7b8e5a0 100644
--- a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs
+++ b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs
@@ -87,6 +87,19 @@ namespace ProxySuper.Core.ViewModels
}
}
+
+ public List UTLSList { get => XraySettings.UTLSList; }
+
+ public string UTLS
+ {
+ get => Settings.UTLS;
+ set
+ {
+ Settings.UTLS = value;
+ RaisePropertyChanged(nameof(UTLS));
+ }
+ }
+
public int VLESS_KCP_Port
{
get => Settings.VLESS_KCP_Port;
diff --git a/ProxySuper.WPF/Controls/XraySettingsControl.xaml b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
index 86543c9..99890f2 100644
--- a/ProxySuper.WPF/Controls/XraySettingsControl.xaml
+++ b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
@@ -108,23 +108,35 @@
Width="260" />
+ Padding="12,3"
+ Command="{Binding Path=RandomUuid}"
+ Content="{DynamicResource Random}" />
-
+
+
+
+
+
+
+
+
+
@@ -143,33 +155,33 @@
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VLESS_WS,
+ Converter={StaticResource VisibleConverter}
+ }">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VLESS_KCP,
+ Converter={StaticResource VisibleConverter}
+ }">
-
+ Visibility="{
+ Binding Path=Checked_VLESS_KCP,
+ Converter={StaticResource VisibleConverter}
+ }"
+ Orientation="Horizontal">
+ Visibility="{
+ Binding Path=Checked_VLESS_KCP,
+ Converter={StaticResource VisibleConverter}
+ }"
+ Orientation="Horizontal">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VLESS_gRPC,
+ Converter={StaticResource VisibleConverter}
+ }">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VLESS_gRPC,
+ Converter={StaticResource VisibleConverter}
+ }">
-
-
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VMESS_WS,
+ Converter={StaticResource VisibleConverter}
+ }">
+ VerticalAlignment="Bottom"
+ Width="260" />
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VMESS_KCP,
+ Converter={StaticResource VisibleConverter}
+ }">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VMESS_KCP,
+ Converter={StaticResource VisibleConverter}
+ }">
+ VerticalAlignment="Bottom"
+ ItemsSource="{Binding Path=KcpTypes}"
+ SelectedValue="{Binding VMESS_KCP_Type,Mode=TwoWay}">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_VMESS_KCP,
+ Converter={StaticResource VisibleConverter}
+ }">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=CheckedShadowSocks,
+ Converter={StaticResource VisibleConverter}
+ }">
-
+
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=CheckedShadowSocks,
+ Converter={StaticResource VisibleConverter}
+ }">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=CheckedShadowSocks,
+ Converter={StaticResource VisibleConverter}
+ }">
+ Orientation="Horizontal"
+ Visibility="{
+ Binding Path=Checked_Trojan_TCP,
+ Converter={StaticResource VisibleConverter}
+ }">
From 4c0d3a0cf435bc76284ccdc7b67c7d36a3a0c01c Mon Sep 17 00:00:00 2001
From: autumn
Date: Mon, 21 Nov 2022 23:39:25 +0800
Subject: [PATCH 06/14] update ui
---
ProxySuper.Core/ProxySuper.Core.csproj | 1 +
.../Controls/V2raySettingsControl.xaml | 594 +++++++++---------
.../Controls/XraySettingsControl.xaml | 5 +-
.../Views/TrojanGo/TrojanGoEditorView.xaml | 76 +--
.../Views/V2ray/V2rayEditorView.xaml | 66 +-
.../Views/V2ray/V2rayEditorView.xaml.cs | 4 +-
.../Views/Xray/XrayConfigView.xaml.cs | 14 +-
ProxySuper.WPF/Views/Xray/XrayEditorView.xaml | 2 +-
.../Views/Xray/XrayEditorView.xaml.cs | 2 +-
.../Views/Xray/XrayInstallView.xaml.cs | 4 +-
10 files changed, 382 insertions(+), 386 deletions(-)
diff --git a/ProxySuper.Core/ProxySuper.Core.csproj b/ProxySuper.Core/ProxySuper.Core.csproj
index 7ceeb44..091ab17 100644
--- a/ProxySuper.Core/ProxySuper.Core.csproj
+++ b/ProxySuper.Core/ProxySuper.Core.csproj
@@ -65,6 +65,7 @@
..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+
..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
diff --git a/ProxySuper.WPF/Controls/V2raySettingsControl.xaml b/ProxySuper.WPF/Controls/V2raySettingsControl.xaml
index 5c63f27..270237a 100644
--- a/ProxySuper.WPF/Controls/V2raySettingsControl.xaml
+++ b/ProxySuper.WPF/Controls/V2raySettingsControl.xaml
@@ -11,322 +11,314 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
+
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/ProxySuper.WPF/Controls/XraySettingsControl.xaml b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
index 99890f2..c7fb4a5 100644
--- a/ProxySuper.WPF/Controls/XraySettingsControl.xaml
+++ b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
@@ -94,14 +94,13 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
+
+
-
-
-
+
+
-
-
-
+
diff --git a/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml b/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml
index 5d2a0f3..4dcd993 100644
--- a/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml
+++ b/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml
@@ -11,7 +11,7 @@
Icon="/Resources/ProxySU.ico"
BorderThickness="0,1,0,0"
BorderBrush="#EEE"
- Title="V2ray编辑配置" Height="610" Width="1015">
+ Title="V2ray编辑配置" Height="640" Width="1015">
@@ -25,41 +25,39 @@
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
diff --git a/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml.cs b/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml.cs
index fefde04..a437829 100644
--- a/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml.cs
+++ b/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -18,6 +19,7 @@ namespace ProxySuper.WPF.Views.V2ray
///
/// V2rayEditorView.xaml 的交互逻辑
///
+ [MvxWindowPresentation]
public partial class V2rayEditorView : MvxWindow
{
public V2rayEditorView()
diff --git a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs
index 0386632..f734678 100644
--- a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs
+++ b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs
@@ -1,4 +1,5 @@
using Microsoft.Win32;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
using ProxySuper.Core.Models.Projects;
using ProxySuper.Core.ViewModels;
@@ -15,6 +16,7 @@ namespace ProxySuper.WPF.Views
///
/// XrayInfoView.xaml 的交互逻辑
///
+ [MvxWindowPresentation()]
public partial class XrayConfigView : MvxWindow
{
public XrayConfigView()
@@ -116,16 +118,16 @@ namespace ProxySuper.WPF.Views
}
- QRCodeGenerator qrGenerator = new QRCodeGenerator();
- QRCodeData qrCodeData = qrGenerator.CreateQrCode(shareLink, QRCodeGenerator.ECCLevel.Q);
- QRCode qrCode = new QRCode(qrCodeData);
+ var qrGenerator = new QRCodeGenerator();
+ var qrCodeData = qrGenerator.CreateQrCode(shareLink, QRCodeGenerator.ECCLevel.Q);
+ var qrCode = new QRCode(qrCodeData);
- Bitmap qrCodeImage = qrCode.GetGraphic(20);
- MemoryStream ms = new MemoryStream();
+ var qrCodeImage = qrCode.GetGraphic(20);
+ var ms = new MemoryStream();
qrCodeImage.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
byte[] bytes = ms.GetBuffer();
ms.Close();
- BitmapImage image = new BitmapImage();
+ var image = new BitmapImage();
image.BeginInit();
image.StreamSource = new MemoryStream(bytes);
image.EndInit();
diff --git a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
index a548ca9..5c4d594 100644
--- a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
+++ b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
@@ -34,8 +34,8 @@
diff --git a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml.cs b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml.cs
index 6c0e57e..d36a828 100644
--- a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml.cs
+++ b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml.cs
@@ -7,7 +7,7 @@ namespace ProxySuper.WPF.Views
///
/// XrayEditorView.xaml 的交互逻辑
///
- [MvxWindowPresentation(Identifier = nameof(XrayEditorView), Modal = false)]
+ [MvxWindowPresentation()]
public partial class XrayEditorView : MvxWindow
{
public XrayEditorView()
diff --git a/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs b/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs
index b24bfec..2c426ce 100644
--- a/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs
+++ b/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using MvvmCross.ViewModels;
using ProxySuper.Core.ViewModels;
using System;
@@ -20,6 +21,7 @@ namespace ProxySuper.WPF.Views
///
/// XrayInstallView.xaml 的交互逻辑
///
+ [MvxWindowPresentation()]
public partial class XrayInstallView : MvxWindow
{
public XrayInstallView()
From e86db631c50e0c35b2a14334cb76073455100e87 Mon Sep 17 00:00:00 2001
From: autumn
Date: Wed, 23 Nov 2022 22:06:09 +0800
Subject: [PATCH 07/14] add quic
---
ProxySuper.Core/Models/Projects/RayType.cs | 4 +-
.../Models/Projects/V2raySettings.cs | 19 +-
.../Models/Projects/V2raySettings_SS.cs | 3 +
.../Models/Projects/V2raySettings_VLESS.cs | 34 +++
.../Models/Projects/V2raySettings_VMESS.cs | 31 +++
.../Models/Projects/XraySettings.cs | 3 +
ProxySuper.Core/Services/ShareLink.cs | 5 +-
ProxySuper.Core/Services/XrayConfigBuilder.cs | 6 +-
.../ViewModels/V2rayEditorViewModel.cs | 189 +++++++++++---
.../ViewModels/XrayConfigViewModel.cs | 10 +
.../ViewModels/XrayEditorViewModel.cs | 201 ++++++++++++---
.../Controls/V2raySettingsControl.xaml | 154 +++++++++++-
.../Controls/VLESS_XTLS_Control.xaml | 7 +-
.../Controls/XraySettingsControl.xaml | 234 +++++++++++++++---
ProxySuper.WPF/Resources/Languages/en.xaml | 13 +
ProxySuper.WPF/Resources/Languages/tw_cn.xaml | 15 +-
ProxySuper.WPF/Resources/Languages/zh_cn.xaml | 15 +-
.../Views/Brook/BrookConfigView.xaml.cs | 7 +-
.../Views/Brook/BrookEditorView.xaml | 87 ++++---
.../Views/Brook/BrookEditorView.xaml.cs | 5 +-
.../Views/Brook/BrookInstallView.xaml.cs | 7 +-
ProxySuper.WPF/Views/EnableRootView.xaml.cs | 7 +-
.../MTProxyGo/MTProxyGoConfigView.xaml.cs | 7 +-
.../Views/MTProxyGo/MTProxyGoEditorView.xaml | 61 ++---
.../MTProxyGo/MTProxyGoEditorView.xaml.cs | 7 +-
.../MTProxyGo/MTProxyGoInstallView.xaml.cs | 7 +-
.../NaiveProxy/NaiveProxyConfigView.xaml.cs | 7 +-
.../NaiveProxy/NaiveProxyEditorView.xaml | 57 ++---
.../NaiveProxy/NaiveProxyEditorView.xaml.cs | 7 +-
.../NaiveProxy/NaiveProxyInstallView.xaml.cs | 7 +-
ProxySuper.WPF/Views/ShareLinkView.xaml.cs | 7 +-
.../Views/TrojanGo/TrojanGoConfigView.xaml.cs | 7 +-
.../Views/TrojanGo/TrojanGoEditorView.xaml | 1 -
.../Views/TrojanGo/TrojanGoEditorView.xaml.cs | 5 +-
.../TrojanGo/TrojanGoInstallView.xaml.cs | 7 +-
.../Views/V2ray/V2rayConfigView.xaml.cs | 5 +-
.../Views/V2ray/V2rayEditorView.xaml | 2 +-
.../Views/V2ray/V2rayEditorView.xaml.cs | 3 -
.../Views/V2ray/V2rayInstallView.xaml.cs | 7 +-
.../Views/Xray/XrayConfigView.xaml.cs | 5 +-
ProxySuper.WPF/Views/Xray/XrayEditorView.xaml | 2 +-
.../Views/Xray/XrayEditorView.xaml.cs | 5 +-
.../Views/Xray/XrayInstallView.xaml.cs | 5 +-
43 files changed, 984 insertions(+), 293 deletions(-)
diff --git a/ProxySuper.Core/Models/Projects/RayType.cs b/ProxySuper.Core/Models/Projects/RayType.cs
index 5f73e69..5ae31f4 100644
--- a/ProxySuper.Core/Models/Projects/RayType.cs
+++ b/ProxySuper.Core/Models/Projects/RayType.cs
@@ -10,6 +10,7 @@
VLESS_WS = 102,
VLESS_H2 = 103,
VLESS_KCP = 104,
+ VLESS_QUIC = 105,
VLESS_gRPC = 110,
// VMESS 201开头
@@ -17,6 +18,7 @@
VMESS_WS = 202,
VMESS_H2 = 203,
VMESS_KCP = 204,
+ VMESS_QUIC = 205,
// Trojan 301开头
Trojan_TCP = 301,
@@ -26,5 +28,5 @@
ShadowsocksAEAD = 401
}
-
+
}
diff --git a/ProxySuper.Core/Models/Projects/V2raySettings.cs b/ProxySuper.Core/Models/Projects/V2raySettings.cs
index fa0bf1c..a57f250 100644
--- a/ProxySuper.Core/Models/Projects/V2raySettings.cs
+++ b/ProxySuper.Core/Models/Projects/V2raySettings.cs
@@ -9,6 +9,15 @@ namespace ProxySuper.Core.Models.Projects
{
public partial class V2raySettings : IProjectSettings
{
+ public static List DisguiseTypes = new List {
+ "none",
+ "srtp",
+ "utp",
+ "wechat-video",
+ "dtls",
+ "wireguard",
+ };
+
public V2raySettings()
{
WithTLS = true;
@@ -16,8 +25,11 @@ namespace ProxySuper.Core.Models.Projects
var guid = Guid.NewGuid().ToString();
Port = 443;
VLESS_KCP_Port = 2001;
- VLESS_gRPC_Port = 2002;
+ VLESS_QUIC_Port = 2002;
+ VLESS_gRPC_Port = 2003;
+
VMESS_KCP_Port = 3001;
+ VMESS_QUIC_Port = 3002;
ShadowSocksPort = 4001;
UUID = guid;
@@ -26,12 +38,17 @@ namespace ProxySuper.Core.Models.Projects
VLESS_WS_Path = "/" + Utils.RandomString(6);
VLESS_KCP_Type = "none";
VLESS_KCP_Seed = guid;
+ VLESS_QUIC_Type = "none";
+ VLESS_QUIC_Security = "none";
+ VLESS_QUIC_Type = "none";
VLESS_gRPC_ServiceName = "/" + Utils.RandomString(7);
VMESS_WS_Path = "/" + Utils.RandomString(8);
VMESS_TCP_Path = "/" + Utils.RandomString(9);
VMESS_KCP_Seed = guid;
VMESS_KCP_Type = "none";
+ VMESS_QUIC_Security = "none";
+ VMESS_QUIC_Type = "none";
TrojanPassword = guid;
diff --git a/ProxySuper.Core/Models/Projects/V2raySettings_SS.cs b/ProxySuper.Core/Models/Projects/V2raySettings_SS.cs
index 945cadf..4ff476b 100644
--- a/ProxySuper.Core/Models/Projects/V2raySettings_SS.cs
+++ b/ProxySuper.Core/Models/Projects/V2raySettings_SS.cs
@@ -19,6 +19,9 @@ namespace ProxySuper.Core.Models.Projects
///
public int ShadowSocksPort { get; set; }
+ ///
+ /// share link
+ ///
public string ShadowSocksShareLink
{
get
diff --git a/ProxySuper.Core/Models/Projects/V2raySettings_VLESS.cs b/ProxySuper.Core/Models/Projects/V2raySettings_VLESS.cs
index 8bb677b..0d34927 100644
--- a/ProxySuper.Core/Models/Projects/V2raySettings_VLESS.cs
+++ b/ProxySuper.Core/Models/Projects/V2raySettings_VLESS.cs
@@ -1,4 +1,7 @@
using ProxySuper.Core.Services;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Documents;
namespace ProxySuper.Core.Models.Projects
{
@@ -57,6 +60,37 @@ namespace ProxySuper.Core.Models.Projects
}
}
+ ///
+ /// vless quic security
+ ///
+ public string VLESS_QUIC_Security { get; set; }
+
+ ///
+ /// vless quic type
+ ///
+ public string VLESS_QUIC_Type { get; set; }
+
+ ///
+ /// vless quic port
+ ///
+ public int VLESS_QUIC_Port { get; set; }
+
+ ///
+ /// vless quic key
+ ///
+ public string VLESS_QUIC_Key { get; set; }
+
+ ///
+ /// vless quic ShareLink
+ ///
+ public string VLESS_QUIC_ShareLink
+ {
+ get
+ {
+ return ShareLink.Build(RayType.VLESS_QUIC, this);
+ }
+ }
+
///
/// grpc port
///
diff --git a/ProxySuper.Core/Models/Projects/V2raySettings_VMESS.cs b/ProxySuper.Core/Models/Projects/V2raySettings_VMESS.cs
index d0e2e21..7475494 100644
--- a/ProxySuper.Core/Models/Projects/V2raySettings_VMESS.cs
+++ b/ProxySuper.Core/Models/Projects/V2raySettings_VMESS.cs
@@ -61,5 +61,36 @@ namespace ProxySuper.Core.Models.Projects
return ShareLink.Build(RayType.VMESS_KCP, this);
}
}
+
+ ///
+ /// vmess quic security
+ ///
+ public string VMESS_QUIC_Security { get; set; }
+
+ ///
+ /// vmess quic type
+ ///
+ public string VMESS_QUIC_Type { get; set; }
+
+ ///
+ /// vmess quic port
+ ///
+ public int VMESS_QUIC_Port { get; set; }
+
+ ///
+ /// vmess quic key
+ ///
+ public string VMESS_QUIC_Key { get; set; }
+
+ ///
+ /// vmess quic ShareLink
+ ///
+ public string VMESS_QUIC_ShareLink
+ {
+ get
+ {
+ return ShareLink.Build(RayType.VMESS_QUIC, this);
+ }
+ }
}
}
diff --git a/ProxySuper.Core/Models/Projects/XraySettings.cs b/ProxySuper.Core/Models/Projects/XraySettings.cs
index 50292a5..2abc078 100644
--- a/ProxySuper.Core/Models/Projects/XraySettings.cs
+++ b/ProxySuper.Core/Models/Projects/XraySettings.cs
@@ -9,10 +9,13 @@ namespace ProxySuper.Core.Models.Projects
{
public class XraySettings : V2raySettings
{
+ public static List FlowList = new List { "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443", "xtls-rprx-splice", "xtls-rprx-splice-udp443" };
public static List UTLSList = new List { "", "chrome", "firefox", "safari", "randomized" };
public string UTLS { get; set; } = UTLSList[1];
+ public string Flow { get; set; } = FlowList[2];
+
///
/// vless xtls shareLink
///
diff --git a/ProxySuper.Core/Services/ShareLink.cs b/ProxySuper.Core/Services/ShareLink.cs
index b892100..326df69 100644
--- a/ProxySuper.Core/Services/ShareLink.cs
+++ b/ProxySuper.Core/Services/ShareLink.cs
@@ -222,9 +222,10 @@ namespace ProxySuper.Core.Services
}
// 4.4 TLS 相关段
- if (xrayType == RayType.VLESS_TCP_XTLS)
+ if (settings is XraySettings)
{
- parametersURL += "&flow=xtls-rprx-direct";
+ var xraySettings = settings as XraySettings;
+ parametersURL += $"&flow={xraySettings.Flow}";
}
diff --git a/ProxySuper.Core/Services/XrayConfigBuilder.cs b/ProxySuper.Core/Services/XrayConfigBuilder.cs
index 752fdef..c7d5096 100644
--- a/ProxySuper.Core/Services/XrayConfigBuilder.cs
+++ b/ProxySuper.Core/Services/XrayConfigBuilder.cs
@@ -91,7 +91,7 @@ namespace ProxySuper.Core.Services
return caddyStr;
}
- private static void SetClients(dynamic bound, List uuidList, bool withXtls = false)
+ private static void SetClients(dynamic bound, List uuidList, bool withXtls = false, string flow = "")
{
bound.settings.clients.Clear();
uuidList.ForEach(id =>
@@ -103,7 +103,7 @@ namespace ProxySuper.Core.Services
}
else
{
- obj = new { id = id, flow = "xtls-rprx-direct" };
+ obj = new { id = id, flow = flow };
}
bound.settings.clients.Add(JToken.FromObject(obj));
@@ -126,7 +126,7 @@ namespace ProxySuper.Core.Services
dest = FullbackPort
}));
xrayConfig.inbounds.Add(baseBound);
- SetClients(baseBound, uuidList, withXtls: true);
+ SetClients(baseBound, uuidList, withXtls: true, flow: parameters.Flow);
#region Fullbacks
diff --git a/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs b/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs
index dc490d9..f0d0181 100644
--- a/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs
+++ b/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs
@@ -64,12 +64,34 @@ namespace ProxySuper.Core.ViewModels
}
}
-
-
-
-
public partial class V2rayEditorViewModel
{
+ public List KcpTypes => V2raySettings.DisguiseTypes;
+
+ public List QuicTypes => V2raySettings.DisguiseTypes;
+
+ ///
+ /// https://www.v2ray.com/chapter_02/transport/quic.html
+ ///
+ public List QuicSecurities => new List {
+ "none",
+ "aes-128-gcm",
+ "chacha20-poly1305"
+ };
+
+ ///
+ /// https://www.v2ray.com/chapter_02/protocols/shadowsocks.html
+ ///
+ public List ShadowSocksMethods => new List {
+ "aes-256-cfb",
+ "aes-128-cfb",
+ "chacha20",
+ "chacha20-ietf",
+ "aes-256-gcm",
+ "aes-128-gcm",
+ "chacha20-poly1305"
+ };
+
public IMvxCommand RandomUuid => new MvxCommand(() => GetUuid());
public bool WithTLS
@@ -112,17 +134,6 @@ namespace ProxySuper.Core.ViewModels
}
}
- public int ShadowSocksPort
- {
- get => Settings.ShadowSocksPort;
- set
- {
- Settings.ShadowSocksPort = value;
- RaisePropertyChanged("ShadowSocksPort");
- }
- }
-
-
public string UUID
{
get => Settings.UUID;
@@ -166,12 +177,12 @@ namespace ProxySuper.Core.ViewModels
}
}
+ #region Torjan
public string TrojanPassword
{
get => Settings.TrojanPassword;
set => Settings.TrojanPassword = value;
}
-
public bool Checked_Trojan_TCP
{
get
@@ -196,9 +207,18 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.Trojan_TCP, Settings);
}
+ #endregion
- private List _ssMethods = new List { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305" };
- public List ShadowSocksMethods => _ssMethods;
+ #region ShadowSocks
+ public int ShadowSocksPort
+ {
+ get => Settings.ShadowSocksPort;
+ set
+ {
+ Settings.ShadowSocksPort = value;
+ RaisePropertyChanged("ShadowSocksPort");
+ }
+ }
public bool CheckedShadowSocks
{
@@ -209,6 +229,7 @@ namespace ProxySuper.Core.ViewModels
RaisePropertyChanged("CheckedShadowSocks");
}
}
+
public string ShadowSocksPassword
{
get => Settings.ShadowSocksPassword;
@@ -230,6 +251,7 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.ShadowsocksAEAD, Settings);
}
+ #endregion
private void CheckBoxChanged(bool value, RayType type)
@@ -258,11 +280,11 @@ namespace ProxySuper.Core.ViewModels
}
///
- /// VMESS
+ /// VMESS SETTINGS
///
public partial class V2rayEditorViewModel
{
- // vmess tcp
+ #region VMESS TCP
public bool Checked_VMESS_TCP
{
get => Settings.Types.Contains(RayType.VMESS_TCP);
@@ -281,8 +303,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VMESS_TCP, Settings);
}
+ #endregion
- // vmess ws
+ #region VMESS WS
public bool Checked_VMESS_WS
{
get => Settings.Types.Contains(RayType.VMESS_WS);
@@ -301,8 +324,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VMESS_WS, Settings);
}
+ #endregion
- // vmess kcp
+ #region VMESS KCP
public string VMESS_KCP_Seed
{
get => Settings.VMESS_KCP_Seed;
@@ -333,18 +357,69 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VMESS_KCP, Settings);
}
+ #endregion
+ #region VMESS QUIC
+ public bool Checked_VMESS_QUIC
+ {
+ get => Settings.Types.Contains(RayType.VMESS_QUIC);
+ set
+ {
+ CheckBoxChanged(value, RayType.VMESS_QUIC);
+ RaisePropertyChanged(nameof(Checked_VMESS_QUIC));
+ }
+ }
+ public string VMESS_QUIC_Key
+ {
+ get => Settings.VMESS_QUIC_Key;
+ set
+ {
+ Settings.VMESS_QUIC_Key = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Key));
+ }
+ }
+ public string VMESS_QUIC_Security
+ {
+ get => Settings.VMESS_QUIC_Security;
+ set
+ {
+ Settings.VMESS_QUIC_Security = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Security));
+ }
+ }
+ public string VMESS_QUIC_Type
+ {
+ get => Settings.VMESS_QUIC_Type;
+ set
+ {
+ Settings.VMESS_QUIC_Type = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Type));
+ }
+ }
+ public int VMESS_QUIC_Port
+ {
+ get => Settings.VMESS_QUIC_Port;
+ set
+ {
+ Settings.VMESS_QUIC_Port = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Port));
+ }
+ }
+ public string VMESS_QUIC_ShareLink
+ {
+ get => ShareLink.Build(RayType.VMESS_QUIC, Settings);
+ }
+ #endregion
- private List _kcpTypes = new List { "none", "srtp", "utp", "wechat-video", "dtls", "wireguard", };
- public List KcpTypes => _kcpTypes;
}
+
///
- /// VLESS
+ /// VLESS SETTINGS
///
public partial class V2rayEditorViewModel
{
- // vless tcp
+ #region VLESS TCP
public bool Checked_VLESS_TCP
{
get => Settings.Types.Contains(RayType.VLESS_TCP);
@@ -358,9 +433,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_TCP, Settings);
}
+ #endregion
-
- // vless ws
+ #region VLESS WS
public string VLESS_WS_Path
{
get => Settings.VLESS_WS_Path;
@@ -382,8 +457,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_WS, Settings);
}
+ #endregion
- // vless kcp
+ #region VLESS KCP
public string VLESS_KCP_Seed
{
get => Settings.VLESS_KCP_Seed;
@@ -414,8 +490,60 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_KCP, Settings);
}
+ #endregion
- // vless grpc
+ #region VLESS QUIC
+ public bool Checked_VLESS_QUIC
+ {
+ get => Settings.Types.Contains(RayType.VLESS_QUIC);
+ set
+ {
+ CheckBoxChanged(value, RayType.VLESS_QUIC);
+ RaisePropertyChanged(nameof(Checked_VLESS_QUIC));
+ }
+ }
+ public string VLESS_QUIC_Key
+ {
+ get => Settings.VLESS_QUIC_Key; set
+ {
+ Settings.VLESS_QUIC_Key = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Key));
+ }
+ }
+ public string VLESS_QUIC_Security
+ {
+ get => Settings.VLESS_QUIC_Security;
+ set
+ {
+ Settings.VLESS_QUIC_Security = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Security));
+ }
+ }
+ public string VLESS_QUIC_Type
+ {
+ get => Settings.VLESS_QUIC_Type;
+ set
+ {
+ Settings.VLESS_QUIC_Type = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Type));
+ }
+ }
+ public int VLESS_QUIC_Port
+ {
+ get => Settings.VLESS_QUIC_Port;
+ set
+ {
+ Settings.VLESS_QUIC_Port = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Port));
+ }
+ }
+ public string VLESS_QUIC_ShareLink
+ {
+ get => ShareLink.Build(RayType.VLESS_QUIC, Settings);
+ }
+ #endregion
+
+ #region VLESS gRPC
public string VLESS_gRPC_ServiceName
{
get => Settings.VLESS_gRPC_ServiceName;
@@ -439,5 +567,6 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_gRPC, Settings);
}
+ #endregion
}
}
diff --git a/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs b/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs
index 57d19aa..a12d890 100644
--- a/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs
+++ b/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs
@@ -13,6 +13,16 @@ namespace ProxySuper.Core.ViewModels
Settings = parameter;
}
+ public string Flow
+ {
+ get { return Settings.Flow; }
+ }
+
+ public string UTLS
+ {
+ get { return Settings.UTLS; }
+ }
+
public bool Checked_VLESS_TCP_XTLS
{
get
diff --git a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs
index 7b8e5a0..963dc91 100644
--- a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs
+++ b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs
@@ -65,6 +65,30 @@ namespace ProxySuper.Core.ViewModels
public partial class XrayEditorViewModel
{
+ public List UTLSList { get => XraySettings.UTLSList; }
+
+ public List KcpTypes => V2raySettings.DisguiseTypes;
+
+ public List QuicTypes => V2raySettings.DisguiseTypes;
+
+ public List QuicSecurities => new List
+ {
+ "none",
+ "aes-128-gcm",
+ "chacha20-poly1305"
+ };
+
+ public List ShadowSocksMethods => new List
+ {
+ "2022-blake3-aes-128-gcm",
+ "2022-blake3-aes-256-gcm",
+ "2022-blake3-chacha20-poly1305",
+ "aes-256-gcm",
+ "aes-128-gcm",
+ "chacha20-poly1305",
+ "none"
+ };
+
public IMvxCommand RandomUuid => new MvxCommand(() => GetUuid());
public bool WithTLS
@@ -88,8 +112,6 @@ namespace ProxySuper.Core.ViewModels
}
- public List UTLSList { get => XraySettings.UTLSList; }
-
public string UTLS
{
get => Settings.UTLS;
@@ -120,17 +142,6 @@ namespace ProxySuper.Core.ViewModels
}
}
- public int ShadowSocksPort
- {
- get => Settings.ShadowSocksPort;
- set
- {
- Settings.ShadowSocksPort = value;
- RaisePropertyChanged("ShadowSocksPort");
- }
- }
-
-
public string UUID
{
get => Settings.UUID;
@@ -174,6 +185,7 @@ namespace ProxySuper.Core.ViewModels
}
}
+ #region Trojan
public string TrojanPassword
{
get => Settings.TrojanPassword;
@@ -204,9 +216,18 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.Trojan_TCP, Settings);
}
+ #endregion
- private List _ssMethods = new List { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305" };
- public List ShadowSocksMethods => _ssMethods;
+ #region ShadowSocks
+ public int ShadowSocksPort
+ {
+ get => Settings.ShadowSocksPort;
+ set
+ {
+ Settings.ShadowSocksPort = value;
+ RaisePropertyChanged("ShadowSocksPort");
+ }
+ }
public bool CheckedShadowSocks
{
@@ -238,7 +259,7 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.ShadowsocksAEAD, Settings);
}
-
+ #endregion
private void CheckBoxChanged(bool value, RayType type)
{
@@ -255,8 +276,6 @@ namespace ProxySuper.Core.ViewModels
}
}
-
-
private void GetUuid()
{
UUID = Guid.NewGuid().ToString();
@@ -270,7 +289,7 @@ namespace ProxySuper.Core.ViewModels
///
public partial class XrayEditorViewModel
{
- // vmess tcp
+ #region VMESS TCP
public bool Checked_VMESS_TCP
{
get => Settings.Types.Contains(RayType.VMESS_TCP);
@@ -289,8 +308,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VMESS_TCP, Settings);
}
+ #endregion
- // vmess ws
+ #region VMESS WS
public bool Checked_VMESS_WS
{
get => Settings.Types.Contains(RayType.VMESS_WS);
@@ -309,8 +329,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VMESS_WS, Settings);
}
+ #endregion
- // vmess kcp
+ #region VMESS KCP
public string VMESS_KCP_Seed
{
get => Settings.VMESS_KCP_Seed;
@@ -341,10 +362,60 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VMESS_KCP, Settings);
}
+ #endregion
+ #region VMESS QUIC
+ public bool Checked_VMESS_QUIC
+ {
+ get => Settings.Types.Contains(RayType.VMESS_QUIC);
+ set
+ {
+ CheckBoxChanged(value, RayType.VMESS_QUIC);
+ RaisePropertyChanged(nameof(Checked_VMESS_QUIC));
+ }
+ }
+ public string VMESS_QUIC_Key
+ {
+ get => Settings.VMESS_QUIC_Key;
+ set
+ {
+ Settings.VMESS_QUIC_Key = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Key));
+ }
+ }
+ public string VMESS_QUIC_Security
+ {
+ get => Settings.VMESS_QUIC_Security;
+ set
+ {
+ Settings.VMESS_QUIC_Security = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Security));
+ }
+ }
+ public string VMESS_QUIC_Type
+ {
+ get => Settings.VMESS_QUIC_Type;
+ set
+ {
+ Settings.VMESS_QUIC_Type = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Type));
+ }
+ }
+ public int VMESS_QUIC_Port
+ {
+ get => Settings.VMESS_QUIC_Port;
+ set
+ {
+ Settings.VMESS_QUIC_Port = value;
+ RaisePropertyChanged(nameof(VMESS_QUIC_Port));
+ }
+ }
+ public string VMESS_QUIC_ShareLink
+ {
+ get => ShareLink.Build(RayType.VMESS_QUIC, Settings);
+ }
+ #endregion
- private List _kcpTypes = new List { "none", "srtp", "utp", "wechat-video", "dtls", "wireguard", };
- public List KcpTypes => _kcpTypes;
}
///
@@ -352,8 +423,19 @@ namespace ProxySuper.Core.ViewModels
///
public partial class XrayEditorViewModel
{
+ #region VLESS XTLS
- // vless xtls
+ public List FlowList { get => XraySettings.FlowList; }
+
+ public string Flow
+ {
+ get => Settings.Flow;
+ set
+ {
+ Settings.Flow = value;
+ RaisePropertyChanged(nameof(Flow));
+ }
+ }
public bool Checked_VLESS_TCP_XTLS
{
get => Settings.Types.Contains(RayType.VLESS_TCP_XTLS);
@@ -367,8 +449,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_TCP_XTLS, Settings);
}
+ #endregion
- // vless tcp
+ #region VLESS TCP
public bool Checked_VLESS_TCP
{
get => Settings.Types.Contains(RayType.VLESS_TCP);
@@ -382,9 +465,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_TCP, Settings);
}
+ #endregion
-
- // vless ws
+ #region VLESS WS
public string VLESS_WS_Path
{
get => Settings.VLESS_WS_Path;
@@ -406,12 +489,68 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_WS, Settings);
}
+ #endregion
- // vless kcp
+ #region VLESS QUIC
+ public string VLESS_QUIC_Key
+ {
+ get => Settings.VLESS_QUIC_Key; set
+ {
+ Settings.VLESS_QUIC_Key = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Key));
+ }
+ }
+ public bool Checked_VLESS_QUIC
+ {
+ get => Settings.Types.Contains(RayType.VLESS_QUIC);
+ set
+ {
+ CheckBoxChanged(value, RayType.VLESS_QUIC);
+ RaisePropertyChanged(nameof(Checked_VLESS_QUIC));
+ }
+ }
+ public string VLESS_QUIC_Security
+ {
+ get => Settings.VLESS_QUIC_Security;
+ set
+ {
+ Settings.VLESS_QUIC_Security = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Security));
+ }
+ }
+ public string VLESS_QUIC_Type
+ {
+ get => Settings.VLESS_QUIC_Type;
+ set
+ {
+ Settings.VLESS_QUIC_Type = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Type));
+ }
+ }
+ public int VLESS_QUIC_Port
+ {
+ get => Settings.VLESS_QUIC_Port;
+ set
+ {
+ Settings.VLESS_QUIC_Port = value;
+ RaisePropertyChanged(nameof(VLESS_QUIC_Port));
+ }
+ }
+ public string VLESS_QUIC_ShareLink
+ {
+ get => ShareLink.Build(RayType.VLESS_QUIC, Settings);
+ }
+ #endregion
+
+ #region VLESS KCP
public string VLESS_KCP_Seed
{
get => Settings.VLESS_KCP_Seed;
- set => Settings.VLESS_KCP_Seed = value;
+ set
+ {
+ Settings.VLESS_KCP_Seed = value;
+ RaisePropertyChanged(nameof(VLESS_KCP_Seed));
+ }
}
public string VLESS_KCP_Type
{
@@ -438,8 +577,9 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_KCP, Settings);
}
+ #endregion
- // vless grpc
+ #region VLESS gRPC
public string VLESS_gRPC_ServiceName
{
get => Settings.VLESS_gRPC_ServiceName;
@@ -463,6 +603,7 @@ namespace ProxySuper.Core.ViewModels
{
get => ShareLink.Build(RayType.VLESS_gRPC, Settings);
}
+ #endregion
}
}
diff --git a/ProxySuper.WPF/Controls/V2raySettingsControl.xaml b/ProxySuper.WPF/Controls/V2raySettingsControl.xaml
index 270237a..3043116 100644
--- a/ProxySuper.WPF/Controls/V2raySettingsControl.xaml
+++ b/ProxySuper.WPF/Controls/V2raySettingsControl.xaml
@@ -15,6 +15,7 @@
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
@@ -87,6 +109,7 @@
+
@@ -110,6 +133,7 @@
Command="{Binding Path=RandomUuid}"
Content="{DynamicResource Random}" />
+
@@ -119,6 +143,7 @@
+
@@ -127,7 +152,9 @@
VerticalContentAlignment="Center"
VerticalAlignment="Center" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
@@ -314,6 +461,7 @@
+
diff --git a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml
index 902dcf1..290e5e2 100644
--- a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml
+++ b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml
@@ -23,7 +23,12 @@
-
+
+
+
+
+
+
diff --git a/ProxySuper.WPF/Controls/XraySettingsControl.xaml b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
index c7fb4a5..cabed7c 100644
--- a/ProxySuper.WPF/Controls/XraySettingsControl.xaml
+++ b/ProxySuper.WPF/Controls/XraySettingsControl.xaml
@@ -15,61 +15,82 @@
+
+ VerticalContentAlignment="Center"
+ IsChecked="{Binding Path=Checked_VLESS_TCP_XTLS}">
+ VerticalContentAlignment="Center"
+ IsChecked="{Binding Path=Checked_VLESS_TCP}">
+ VerticalContentAlignment="Center"
+ IsChecked="{Binding Path=Checked_VLESS_WS}">
+
+
+
+
+
+ VerticalContentAlignment="Center"
+ Foreground="LimeGreen"
+ IsChecked="{Binding Path=Checked_VLESS_gRPC}">
+
+
-
+ VerticalContentAlignment="Center"
+ IsChecked="{Binding Path=Checked_VMESS_WS}">
+
-
+ VerticalContentAlignment="Center"
+ IsChecked="{Binding Path=Checked_VMESS_KCP}">
+
+
+
+
+
+
+
+
-
+
+
@@ -118,32 +140,47 @@
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Content="{DynamicResource XrayWithTLSDesc}"
+ VerticalContentAlignment="Center"
+ VerticalAlignment="Center" />
@@ -151,18 +188,22 @@
+
+
+ }">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }">
@@ -215,11 +311,13 @@
Visibility="{
Binding Path=Checked_VLESS_gRPC,
Converter={StaticResource VisibleConverter}
- }">
+ }">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -327,11 +486,12 @@
TextWrapping="Wrap"
Width="260" />
-
+
+
diff --git a/ProxySuper.WPF/Resources/Languages/en.xaml b/ProxySuper.WPF/Resources/Languages/en.xaml
index c0bd5c3..ab1de59 100644
--- a/ProxySuper.WPF/Resources/Languages/en.xaml
+++ b/ProxySuper.WPF/Resources/Languages/en.xaml
@@ -75,8 +75,10 @@
VLESS WS
VLESS gRPC
VLESS mKCP
+ VLESS QUIC
VMESS WS
VMESS mKCP
+ VMESS QUIC
ShadowSocks
Trojan
@@ -85,23 +87,34 @@
With TLS
Unchecked means upload your own TLS.
UUID
+ Flow
+ uTLS
Multi User
Multi Id split with ","
VLESS WS Path
VLESS KCP Seed
VLESS KCP Type
VLESS KCP Port
+ VLESS QUIC Port
+ VLESS QUIC Key
+ VLESS QUIC Security
+ VLESS QUIC Type
gRPC Service Name
gRPC Port
VMESS WS Path
VMESS KCP Seed
VMESS KCP Type
VMESS KCP Port
+ VMESS QUIC Key
+ VMESS QUIC Port
+ VMESS QUIC Security
+ VMESS QUIC Type
SS Pwd
SS Method
SS Port
Trojan Pwd
Trojan Port
+ v2ray Port
xray Port
default port is 443
diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
index 249cfa1..4bdf7b2 100644
--- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
@@ -74,8 +74,10 @@
VLESS WS
VLESS gRPC
VLESS mKCP
+ VLESS QUIC
VMESS WS
VMESS mKCP
+ VMESS QUIC
ShadowSocks
Trojan
@@ -85,24 +87,35 @@
自動申請證書
如上傳自有證書,則取消對勾。
UUID
+ 流控
+ uTLS
多用戶
多個UUID用“,”分隔
VLESS WS路徑
VLESS KCP Seed
VLESS KCP偽裝
VLESS KCP端口
+ VLESS QUIC Key
+ VLESS QUIC端口
+ VLESS QUIC加密
+ VLESS QUIC僞裝
gRPC路徑
gRPC端口
VMESS WS路徑
VMESS KCP Seed
VMESS KCP偽裝
VMESS KCP端口
+ VMESS QUIC Key
+ VMESS QUIC端口
+ VMESS QUIC加密
+ VMESS QUIC僞裝
SS密碼
SS加密方式
SS端口
Trojan密碼
Trojan端口
- xray端口
+ V2ray端口
+ XRAY端口
默認端口443,不建議修改
diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
index 89dbfee..b1e6d5f 100644
--- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
@@ -75,8 +75,10 @@
VLESS WS
VLESS gRPC
VLESS mKCP
+ VLESS QUIC
VMESS WS
VMESS mKCP
+ VMESS QUIC
ShadowSocks
Trojan
@@ -86,24 +88,35 @@
自动申请证书
如上传自有证书,则取消对勾。
UUID
+ 流控
+ uTLS
多用户
多个UUID用“,”分隔
VLESS WS路径
VLESS KCP Seed
VLESS KCP伪装
VLESS KCP端口
+ VLESS QUIC Key
+ VLESS QUIC端口
+ VLESS QUIC加密
+ VLESS QUIC伪装
gRPC路径
gRPC端口
VMESS WS路径
VMESS KCP Seed
VMESS KCP伪装
VMESS KCP端口
+ VMESS QUIC Key
+ VMESS QUIC端口
+ VMESS QUIC加密
+ VMESS QUIC伪装
SS密码
SS加密方式
SS端口
Trojan密码
Trojan端口
- xray端口
+ V2ray端口
+ XRAY端口
默认端口443,不建议修改
diff --git a/ProxySuper.WPF/Views/Brook/BrookConfigView.xaml.cs b/ProxySuper.WPF/Views/Brook/BrookConfigView.xaml.cs
index 67c7452..7847e25 100644
--- a/ProxySuper.WPF/Views/Brook/BrookConfigView.xaml.cs
+++ b/ProxySuper.WPF/Views/Brook/BrookConfigView.xaml.cs
@@ -1,10 +1,9 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
namespace ProxySuper.WPF.Views
{
- ///
- /// BrookConfigView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class BrookConfigView : MvxWindow
{
public BrookConfigView()
diff --git a/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml b/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml
index dacf2ed..c371f43 100644
--- a/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml
+++ b/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml
@@ -24,61 +24,60 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
-
+
+ HorizontalAlignment="Right">
+ Command="{Binding SaveCommand}"
+ HorizontalAlignment="Right"
+ VerticalAlignment="Center"
+ Padding="10,5" />
+ Command="{Binding SaveAndInstallCommand}"
+ HorizontalAlignment="Right"
+ VerticalAlignment="Center"
+ Padding="10,5"
+ Margin="20,0,40,0" />
-
+
diff --git a/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml.cs b/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml.cs
index 00d4726..3bbf08c 100644
--- a/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml.cs
+++ b/ProxySuper.WPF/Views/Brook/BrookEditorView.xaml.cs
@@ -3,10 +3,7 @@ using MvvmCross.Platforms.Wpf.Views;
namespace ProxySuper.WPF.Views
{
- ///
- /// BrookEditorView.xaml 的交互逻辑
- ///
- [MvxWindowPresentation(Identifier = nameof(XrayEditorView), Modal = false)]
+ [MvxWindowPresentation]
public partial class BrookEditorView : MvxWindow
{
public BrookEditorView()
diff --git a/ProxySuper.WPF/Views/Brook/BrookInstallView.xaml.cs b/ProxySuper.WPF/Views/Brook/BrookInstallView.xaml.cs
index 6e78418..8f46ed1 100644
--- a/ProxySuper.WPF/Views/Brook/BrookInstallView.xaml.cs
+++ b/ProxySuper.WPF/Views/Brook/BrookInstallView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,9 +16,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.Brook
{
- ///
- /// BrookInstallView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class BrookInstallView : MvxWindow
{
public BrookInstallView()
diff --git a/ProxySuper.WPF/Views/EnableRootView.xaml.cs b/ProxySuper.WPF/Views/EnableRootView.xaml.cs
index acf18fe..12b3e02 100644
--- a/ProxySuper.WPF/Views/EnableRootView.xaml.cs
+++ b/ProxySuper.WPF/Views/EnableRootView.xaml.cs
@@ -1,10 +1,9 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
namespace ProxySuper.WPF.Views
{
- ///
- /// EnableRootView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class EnableRootView : MvxWindow
{
public EnableRootView()
diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs
index 243d354..511a713 100644
--- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs
+++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoConfigView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,9 +16,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.MTProtoGo
{
- ///
- /// MTProtoGoConfigView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class MTProtoGoConfigView : MvxWindow
{
public MTProtoGoConfigView()
diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml
index b410ee2..4aa4dcc 100644
--- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml
+++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml
@@ -24,49 +24,50 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
-
+ Command="{Binding SaveCommand}"
+ HorizontalAlignment="Right"
+ VerticalAlignment="Center"
+ Padding="10,5" />
+ Command="{Binding SaveAndInstallCommand}"
+ HorizontalAlignment="Right"
+ VerticalAlignment="Center"
+ Padding="10,5"
+ Margin="20,0,40,0" />
-
+
diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs
index 231813a..b56ca8a 100644
--- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs
+++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoEditorView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,9 +16,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.MTProtoGo
{
- ///
- /// MTProtoGoEditorView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class MTProtoGoEditorView : MvxWindow
{
public MTProtoGoEditorView()
diff --git a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs
index 5f7af9c..1537434 100644
--- a/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs
+++ b/ProxySuper.WPF/Views/MTProxyGo/MTProxyGoInstallView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,9 +16,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.MTProtoGo
{
- ///
- /// MTProtoInstallView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class MTProtoGoInstallView : MvxWindow
{
public MTProtoGoInstallView()
diff --git a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyConfigView.xaml.cs b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyConfigView.xaml.cs
index bcd9f4d..5981fc3 100644
--- a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyConfigView.xaml.cs
+++ b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyConfigView.xaml.cs
@@ -1,10 +1,9 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
namespace ProxySuper.WPF.Views
{
- ///
- /// NaiveProxyConfigView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class NaiveProxyConfigView : MvxWindow
{
public NaiveProxyConfigView()
diff --git a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml
index b764166..2a51884 100644
--- a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml
+++ b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml
@@ -22,42 +22,43 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
-
+
+ HorizontalAlignment="Right">
-
+
diff --git a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml.cs b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml.cs
index 4a948bd..bf03f4f 100644
--- a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml.cs
+++ b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyEditorView.xaml.cs
@@ -1,10 +1,9 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
namespace ProxySuper.WPF.Views
{
- ///
- /// NaiveProxyEditorView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class NaiveProxyEditorView : MvxWindow
{
public NaiveProxyEditorView()
diff --git a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyInstallView.xaml.cs b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyInstallView.xaml.cs
index da77f21..b82563b 100644
--- a/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyInstallView.xaml.cs
+++ b/ProxySuper.WPF/Views/NaiveProxy/NaiveProxyInstallView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,9 +16,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.NaiveProxy
{
- ///
- /// NaiveProxyInstallViewModel.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class NaiveProxyInstallView : MvxWindow
{
public NaiveProxyInstallView()
diff --git a/ProxySuper.WPF/Views/ShareLinkView.xaml.cs b/ProxySuper.WPF/Views/ShareLinkView.xaml.cs
index ea49557..35d9f0e 100644
--- a/ProxySuper.WPF/Views/ShareLinkView.xaml.cs
+++ b/ProxySuper.WPF/Views/ShareLinkView.xaml.cs
@@ -1,10 +1,9 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
namespace ProxySuper.WPF.Views
{
- ///
- /// ShareLinkView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class ShareLinkView : MvxWindow
{
public ShareLinkView()
diff --git a/ProxySuper.WPF/Views/TrojanGo/TrojanGoConfigView.xaml.cs b/ProxySuper.WPF/Views/TrojanGo/TrojanGoConfigView.xaml.cs
index 31a572a..f7fcfde 100644
--- a/ProxySuper.WPF/Views/TrojanGo/TrojanGoConfigView.xaml.cs
+++ b/ProxySuper.WPF/Views/TrojanGo/TrojanGoConfigView.xaml.cs
@@ -1,11 +1,10 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using ProxySuper.Core.ViewModels;
namespace ProxySuper.WPF.Views
{
- ///
- /// TrojanGoConfigView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class TrojanGoConfigView : MvxWindow
{
public TrojanGoConfigView()
diff --git a/ProxySuper.WPF/Views/TrojanGo/TrojanGoEditorView.xaml b/ProxySuper.WPF/Views/TrojanGo/TrojanGoEditorView.xaml
index 35b8366..4ecee5b 100644
--- a/ProxySuper.WPF/Views/TrojanGo/TrojanGoEditorView.xaml
+++ b/ProxySuper.WPF/Views/TrojanGo/TrojanGoEditorView.xaml
@@ -70,7 +70,6 @@
BorderBrush="#eee"
BorderThickness="0,1,0,0">
- /// TrojanEditorView.xaml 的交互逻辑
- ///
- [MvxWindowPresentation(Identifier = nameof(TrojanGoEditorView), Modal = false)]
+ [MvxWindowPresentation]
public partial class TrojanGoEditorView : MvxWindow
{
public TrojanGoEditorView()
diff --git a/ProxySuper.WPF/Views/TrojanGo/TrojanGoInstallView.xaml.cs b/ProxySuper.WPF/Views/TrojanGo/TrojanGoInstallView.xaml.cs
index 3474a36..62698f2 100644
--- a/ProxySuper.WPF/Views/TrojanGo/TrojanGoInstallView.xaml.cs
+++ b/ProxySuper.WPF/Views/TrojanGo/TrojanGoInstallView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,9 +16,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.TrojanGo
{
- ///
- /// TrojanGoInstallView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class TrojanGoInstallView : MvxWindow
{
public TrojanGoInstallView()
diff --git a/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml.cs b/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml.cs
index 0a4b3e1..db7d817 100644
--- a/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml.cs
+++ b/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml.cs
@@ -1,4 +1,5 @@
using Microsoft.Win32;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
using ProxySuper.Core.Models.Projects;
using ProxySuper.Core.ViewModels;
@@ -21,9 +22,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.V2ray
{
- ///
- /// V2rayConfigView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class V2rayConfigView : MvxWindow
{
public V2rayConfigView()
diff --git a/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml b/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml
index 4dcd993..23a3f83 100644
--- a/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml
+++ b/ProxySuper.WPF/Views/V2ray/V2rayEditorView.xaml
@@ -43,7 +43,7 @@
-
+
- /// V2rayEditorView.xaml 的交互逻辑
- ///
[MvxWindowPresentation]
public partial class V2rayEditorView : MvxWindow
{
diff --git a/ProxySuper.WPF/Views/V2ray/V2rayInstallView.xaml.cs b/ProxySuper.WPF/Views/V2ray/V2rayInstallView.xaml.cs
index 0b57535..b6906b1 100644
--- a/ProxySuper.WPF/Views/V2ray/V2rayInstallView.xaml.cs
+++ b/ProxySuper.WPF/Views/V2ray/V2rayInstallView.xaml.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Platforms.Wpf.Views;
+using MvvmCross.Platforms.Wpf.Presenters.Attributes;
+using MvvmCross.Platforms.Wpf.Views;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,9 +16,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views.V2ray
{
- ///
- /// V2rayInstallView.xaml 的交互逻辑
- ///
+ [MvxWindowPresentation]
public partial class V2rayInstallView : MvxWindow
{
public V2rayInstallView()
diff --git a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs
index f734678..f180ff1 100644
--- a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs
+++ b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml.cs
@@ -13,10 +13,7 @@ using System.Windows.Media.Imaging;
namespace ProxySuper.WPF.Views
{
- ///
- /// XrayInfoView.xaml 的交互逻辑
- ///
- [MvxWindowPresentation()]
+ [MvxWindowPresentation]
public partial class XrayConfigView : MvxWindow
{
public XrayConfigView()
diff --git a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
index 5c4d594..bc89714 100644
--- a/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
+++ b/ProxySuper.WPF/Views/Xray/XrayEditorView.xaml
@@ -44,7 +44,7 @@
-
+
- /// XrayEditorView.xaml 的交互逻辑
- ///
- [MvxWindowPresentation()]
+ [MvxWindowPresentation]
public partial class XrayEditorView : MvxWindow
{
public XrayEditorView()
diff --git a/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs b/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs
index 2c426ce..0077f97 100644
--- a/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs
+++ b/ProxySuper.WPF/Views/Xray/XrayInstallView.xaml.cs
@@ -18,10 +18,7 @@ using System.Windows.Shapes;
namespace ProxySuper.WPF.Views
{
- ///
- /// XrayInstallView.xaml 的交互逻辑
- ///
- [MvxWindowPresentation()]
+ [MvxWindowPresentation]
public partial class XrayInstallView : MvxWindow
{
public XrayInstallView()
From 433883c3bf66816bcafbca034645045cd76c8891 Mon Sep 17 00:00:00 2001
From: autumn
Date: Thu, 24 Nov 2022 21:07:34 +0800
Subject: [PATCH 08/14] update quic
---
.../Models/Projects/V2raySettings.cs | 6 +-
ProxySuper.Core/Services/ShareLink.cs | 43 ++++++++++---
.../Services/V2rayConfigBuilder.cs | 34 ++++++++++
ProxySuper.Core/Services/XrayConfigBuilder.cs | 35 ++++++++++-
.../ViewModels/V2rayConfigViewModel.cs | 16 +++++
.../ViewModels/XrayConfigViewModel.cs | 16 +++++
.../Controls/VLESS_QUIC_Control.xaml | 61 ++++++++++++++++++
.../Controls/VLESS_QUIC_Control.xaml.cs | 28 +++++++++
.../Controls/VMESS_QUIC_Control.xaml | 62 +++++++++++++++++++
.../Controls/VMESS_QUIC_Control.xaml.cs | 28 +++++++++
ProxySuper.WPF/Properties/AssemblyInfo.cs | 4 +-
ProxySuper.WPF/ProxySuper.WPF.csproj | 26 ++++++++
.../v2ray/server/05_inbounds/VLESS_QUIC.json | 31 ++++++++++
.../v2ray/server/05_inbounds/VMESS_QUIC.json | 31 ++++++++++
.../xray/server/05_inbounds/VLESS_QUIC.json | 31 ++++++++++
.../xray/server/05_inbounds/VMESS_QUIC.json | 31 ++++++++++
ProxySuper.WPF/Views/Xray/XrayConfigView.xaml | 14 +++++
.../Views/Xray/XrayConfigView.xaml.cs | 6 ++
18 files changed, 489 insertions(+), 14 deletions(-)
create mode 100644 ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml
create mode 100644 ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml.cs
create mode 100644 ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml
create mode 100644 ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml.cs
create mode 100644 ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_QUIC.json
create mode 100644 ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_QUIC.json
create mode 100644 ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_QUIC.json
create mode 100644 ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_QUIC.json
diff --git a/ProxySuper.Core/Models/Projects/V2raySettings.cs b/ProxySuper.Core/Models/Projects/V2raySettings.cs
index a57f250..ed95c10 100644
--- a/ProxySuper.Core/Models/Projects/V2raySettings.cs
+++ b/ProxySuper.Core/Models/Projects/V2raySettings.cs
@@ -38,14 +38,16 @@ namespace ProxySuper.Core.Models.Projects
VLESS_WS_Path = "/" + Utils.RandomString(6);
VLESS_KCP_Type = "none";
VLESS_KCP_Seed = guid;
+ VLESS_QUIC_Key = "";
VLESS_QUIC_Type = "none";
VLESS_QUIC_Security = "none";
VLESS_QUIC_Type = "none";
- VLESS_gRPC_ServiceName = "/" + Utils.RandomString(7);
+ VLESS_gRPC_ServiceName = Utils.RandomString(7);
VMESS_WS_Path = "/" + Utils.RandomString(8);
VMESS_TCP_Path = "/" + Utils.RandomString(9);
VMESS_KCP_Seed = guid;
+ VMESS_QUIC_Key = "";
VMESS_KCP_Type = "none";
VMESS_QUIC_Security = "none";
VMESS_QUIC_Type = "none";
@@ -98,8 +100,6 @@ namespace ProxySuper.Core.Models.Projects
}
}
- //public ProjectType Type { get; set; } = ProjectType.Xray;
-
///
/// 是否安装证书,
/// 上传自有证书时选False,则不会自动安装证书。
diff --git a/ProxySuper.Core/Services/ShareLink.cs b/ProxySuper.Core/Services/ShareLink.cs
index 326df69..4edf80e 100644
--- a/ProxySuper.Core/Services/ShareLink.cs
+++ b/ProxySuper.Core/Services/ShareLink.cs
@@ -78,12 +78,14 @@ namespace ProxySuper.Core.Services
case RayType.VLESS_TCP_XTLS:
case RayType.VLESS_WS:
case RayType.VLESS_KCP:
+ case RayType.VLESS_QUIC:
case RayType.VLESS_gRPC:
case RayType.Trojan_TCP:
return BuildVlessShareLink(xrayType, settings);
case RayType.VMESS_TCP:
case RayType.VMESS_WS:
case RayType.VMESS_KCP:
+ case RayType.VMESS_QUIC:
return BuildVmessShareLink(xrayType, settings);
case RayType.ShadowsocksAEAD:
return BuildShadowSocksShareLink(settings);
@@ -142,6 +144,15 @@ namespace ProxySuper.Core.Services
vmess.path = settings.VMESS_KCP_Seed;
vmess.tls = "";
break;
+ case RayType.VMESS_QUIC:
+ vmess.ps = "vmess-quic";
+ vmess.port = settings.VMESS_QUIC_Port.ToString();
+ vmess.net = "quic";
+ vmess.type = settings.VMESS_QUIC_Type;
+ vmess.path = settings.VMESS_QUIC_Key;
+ vmess.host = settings.VMESS_QUIC_Security;
+ vmess.tls = "tls";
+ break;
default:
return string.Empty;
}
@@ -162,8 +173,6 @@ namespace ProxySuper.Core.Services
var _path = "/";
var _host = settings.Domain;
var _descriptiveText = string.Empty;
- var _headerType = "none";
- var _seed = string.Empty;
switch (xrayType)
{
@@ -187,12 +196,17 @@ namespace ProxySuper.Core.Services
case RayType.VLESS_KCP:
_protocol = "vless";
_type = "kcp";
- _headerType = settings.VLESS_KCP_Type;
- _seed = settings.VLESS_KCP_Seed;
_port = settings.VLESS_KCP_Port;
_security = "none";
_descriptiveText = "vless-mKCP";
break;
+ case RayType.VLESS_QUIC:
+ _protocol = "vless";
+ _port = settings.VLESS_QUIC_Port;
+ _type = "quic";
+ _security = "tls";
+ _descriptiveText = "vless-quic";
+ break;
case RayType.VLESS_gRPC:
_protocol = "vless";
_type = "grpc";
@@ -213,19 +227,32 @@ namespace ProxySuper.Core.Services
if (xrayType != RayType.Trojan_TCP)
{
// 4.3 传输层相关段
- parametersURL = $"?type={_type}&encryption={_encryption}&security={_security}&path={HttpUtility.UrlEncode(_path)}&headerType={_headerType}";
+ parametersURL = $"?type={_type}&encryption={_encryption}&security={_security}&path={HttpUtility.UrlEncode(_path)}";
// kcp
if (xrayType == RayType.VLESS_KCP)
{
- parametersURL += $"&seed={_seed}";
+ parametersURL += $"&seed={settings.VLESS_KCP_Seed}&headerType={settings.VLESS_KCP_Type}";
+ }
+
+ if (xrayType == RayType.VLESS_QUIC)
+ {
+ parametersURL += $"&quicSecurity={settings.VLESS_QUIC_Security}";
+ if (settings.VLESS_QUIC_Security != "none")
+ {
+ parametersURL += $"&key={HttpUtility.UrlEncode(settings.VLESS_QUIC_Key)}";
+ }
+ parametersURL += $"&headerType={settings.VLESS_QUIC_Type}";
}
// 4.4 TLS 相关段
if (settings is XraySettings)
{
- var xraySettings = settings as XraySettings;
- parametersURL += $"&flow={xraySettings.Flow}";
+ if (xrayType == RayType.VLESS_TCP_XTLS)
+ {
+ var xraySettings = settings as XraySettings;
+ parametersURL += $"&flow={xraySettings.Flow}";
+ }
}
diff --git a/ProxySuper.Core/Services/V2rayConfigBuilder.cs b/ProxySuper.Core/Services/V2rayConfigBuilder.cs
index c450b5f..9a54e55 100644
--- a/ProxySuper.Core/Services/V2rayConfigBuilder.cs
+++ b/ProxySuper.Core/Services/V2rayConfigBuilder.cs
@@ -187,6 +187,7 @@ namespace ProxySuper.Core.Services
}
#endregion
+ #region VLESS GRPC
if (parameters.Types.Contains(RayType.VLESS_gRPC))
{
var gRPCInBound = GetBound("VLESS_gRPC.json");
@@ -196,7 +197,9 @@ namespace ProxySuper.Core.Services
gRPCInBound.streamSettings.tlsSettings.serverName = parameters.Domain;
xrayConfig.inbounds.Add(JToken.FromObject(gRPCInBound));
}
+ #endregion
+ #region VLESS KCP
if (parameters.Types.Contains(RayType.VLESS_KCP))
{
var kcpBound = GetBound("VLESS_KCP.json");
@@ -206,7 +209,22 @@ namespace ProxySuper.Core.Services
kcpBound.streamSettings.kcpSettings.seed = parameters.VLESS_KCP_Seed;
xrayConfig.inbounds.Add(JToken.FromObject(kcpBound));
}
+ #endregion
+ #region VLESS QUIC
+ if (parameters.Types.Contains(RayType.VLESS_QUIC))
+ {
+ var quicBound = GetBound("VLESS_QUIC.json");
+ quicBound.port = parameters.VLESS_QUIC_Port;
+ SetClients(quicBound, uuidList);
+ quicBound.streamSettings.quicSettings.security = parameters.VLESS_QUIC_Security;
+ quicBound.streamSettings.quicSettings.key = parameters.VLESS_QUIC_Key;
+ quicBound.streamSettings.quicSettings.header.type = parameters.VLESS_QUIC_Type;
+ xrayConfig.inbounds.Add(JToken.FromObject(quicBound));
+ }
+ #endregion
+
+ #region VMESS KCP
if (parameters.Types.Contains(RayType.VMESS_KCP))
{
var kcpBound = GetBound("VMESS_KCP.json");
@@ -216,7 +234,22 @@ namespace ProxySuper.Core.Services
kcpBound.streamSettings.kcpSettings.seed = parameters.VMESS_KCP_Seed;
xrayConfig.inbounds.Add(JToken.FromObject(kcpBound));
}
+ #endregion
+ #region VMESS QUIC
+ if (parameters.Types.Contains(RayType.VMESS_QUIC))
+ {
+ var quicBound = GetBound("VMESS_QUIC.json");
+ quicBound.port = parameters.VMESS_QUIC_Port;
+ SetClients(quicBound, uuidList);
+ quicBound.streamSettings.quicSettings.security = parameters.VMESS_QUIC_Security;
+ quicBound.streamSettings.quicSettings.key = parameters.VMESS_QUIC_Key;
+ quicBound.streamSettings.quicSettings.header.type = parameters.VMESS_QUIC_Type;
+ xrayConfig.inbounds.Add(JToken.FromObject(quicBound));
+ }
+ #endregion
+
+ #region Shadowsocks
if (parameters.Types.Contains(RayType.ShadowsocksAEAD))
{
var ssBound = GetBound("Shadowsocks-AEAD.json");
@@ -225,6 +258,7 @@ namespace ProxySuper.Core.Services
ssBound.settings.method = parameters.ShadowSocksMethod;
xrayConfig.inbounds.Add(JToken.FromObject(ssBound));
}
+ #endregion
return JsonConvert.SerializeObject(
xrayConfig,
diff --git a/ProxySuper.Core/Services/XrayConfigBuilder.cs b/ProxySuper.Core/Services/XrayConfigBuilder.cs
index c7d5096..83fd110 100644
--- a/ProxySuper.Core/Services/XrayConfigBuilder.cs
+++ b/ProxySuper.Core/Services/XrayConfigBuilder.cs
@@ -110,7 +110,6 @@ namespace ProxySuper.Core.Services
});
}
-
public static string BuildXrayConfig(XraySettings parameters)
{
var uuidList = new List();
@@ -190,6 +189,7 @@ namespace ProxySuper.Core.Services
}
#endregion
+ #region VLESS GRPC
if (parameters.Types.Contains(RayType.VLESS_gRPC))
{
var gRPCInBound = GetBound("VLESS_gRPC.json");
@@ -199,7 +199,9 @@ namespace ProxySuper.Core.Services
gRPCInBound.streamSettings.tlsSettings.serverName = parameters.Domain;
xrayConfig.inbounds.Add(JToken.FromObject(gRPCInBound));
}
+ #endregion
+ #region VLESS KCP
if (parameters.Types.Contains(RayType.VLESS_KCP))
{
var kcpBound = GetBound("VLESS_KCP.json");
@@ -209,7 +211,22 @@ namespace ProxySuper.Core.Services
kcpBound.streamSettings.kcpSettings.seed = parameters.VLESS_KCP_Seed;
xrayConfig.inbounds.Add(JToken.FromObject(kcpBound));
}
+ #endregion
+ #region VLESS QUIC
+ if (parameters.Types.Contains(RayType.VLESS_QUIC))
+ {
+ var quicBound = GetBound("VLESS_QUIC.json");
+ quicBound.port = parameters.VLESS_QUIC_Port;
+ SetClients(quicBound, uuidList);
+ quicBound.streamSettings.quicSettings.security = parameters.VLESS_QUIC_Security;
+ quicBound.streamSettings.quicSettings.key = parameters.VLESS_QUIC_Key;
+ quicBound.streamSettings.quicSettings.header.type = parameters.VLESS_QUIC_Type;
+ xrayConfig.inbounds.Add(JToken.FromObject(quicBound));
+ }
+ #endregion
+
+ #region VMESS KCP
if (parameters.Types.Contains(RayType.VMESS_KCP))
{
var kcpBound = GetBound("VMESS_KCP.json");
@@ -219,7 +236,22 @@ namespace ProxySuper.Core.Services
kcpBound.streamSettings.kcpSettings.seed = parameters.VMESS_KCP_Seed;
xrayConfig.inbounds.Add(JToken.FromObject(kcpBound));
}
+ #endregion
+ #region VMESS QUIC
+ if (parameters.Types.Contains(RayType.VMESS_QUIC))
+ {
+ var quicBound = GetBound("VMESS_QUIC.json");
+ quicBound.port = parameters.VMESS_QUIC_Port;
+ SetClients(quicBound, uuidList);
+ quicBound.streamSettings.quicSettings.security = parameters.VMESS_QUIC_Security;
+ quicBound.streamSettings.quicSettings.key = parameters.VMESS_QUIC_Key;
+ quicBound.streamSettings.quicSettings.header.type = parameters.VMESS_QUIC_Type;
+ xrayConfig.inbounds.Add(JToken.FromObject(quicBound));
+ }
+ #endregion
+
+ #region Shadowsocks
if (parameters.Types.Contains(RayType.ShadowsocksAEAD))
{
var ssBound = GetBound("Shadowsocks-AEAD.json");
@@ -228,6 +260,7 @@ namespace ProxySuper.Core.Services
ssBound.settings.method = parameters.ShadowSocksMethod;
xrayConfig.inbounds.Add(JToken.FromObject(ssBound));
}
+ #endregion
return JsonConvert.SerializeObject(
xrayConfig,
diff --git a/ProxySuper.Core/ViewModels/V2rayConfigViewModel.cs b/ProxySuper.Core/ViewModels/V2rayConfigViewModel.cs
index f381366..6dc287d 100644
--- a/ProxySuper.Core/ViewModels/V2rayConfigViewModel.cs
+++ b/ProxySuper.Core/ViewModels/V2rayConfigViewModel.cs
@@ -42,6 +42,14 @@ namespace ProxySuper.Core.ViewModels
}
}
+ public bool Checked_VLESS_QUIC
+ {
+ get
+ {
+ return Settings.Types.Contains(RayType.VLESS_QUIC);
+ }
+ }
+
public bool Checked_VLESS_gRPC
{
get
@@ -74,6 +82,14 @@ namespace ProxySuper.Core.ViewModels
}
}
+ public bool Checked_VMESS_QUIC
+ {
+ get
+ {
+ return Settings.Types.Contains(RayType.VMESS_QUIC);
+ }
+ }
+
public bool Checked_Trojan_TCP
{
get
diff --git a/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs b/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs
index a12d890..7d25e5e 100644
--- a/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs
+++ b/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs
@@ -55,6 +55,14 @@ namespace ProxySuper.Core.ViewModels
}
}
+ public bool Checked_VLESS_QUIC
+ {
+ get
+ {
+ return Settings.Types.Contains(RayType.VLESS_QUIC);
+ }
+ }
+
public bool Checked_VLESS_gRPC
{
get
@@ -87,6 +95,14 @@ namespace ProxySuper.Core.ViewModels
}
}
+ public bool Checked_VMESS_QUIC
+ {
+ get
+ {
+ return Settings.Types.Contains(RayType.VMESS_QUIC);
+ }
+ }
+
public bool Checked_Trojan_TCP
{
get
diff --git a/ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml b/ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml
new file mode 100644
index 0000000..c768db8
--- /dev/null
+++ b/ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml.cs b/ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml.cs
new file mode 100644
index 0000000..ad59f4f
--- /dev/null
+++ b/ProxySuper.WPF/Controls/VLESS_QUIC_Control.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace ProxySuper.WPF.Controls
+{
+ ///
+ /// VLESS_QUIC_Control.xaml 的交互逻辑
+ ///
+ public partial class VLESS_QUIC_Control : UserControl
+ {
+ public VLESS_QUIC_Control()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml b/ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml
new file mode 100644
index 0000000..9258605
--- /dev/null
+++ b/ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml.cs b/ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml.cs
new file mode 100644
index 0000000..c0e0fcd
--- /dev/null
+++ b/ProxySuper.WPF/Controls/VMESS_QUIC_Control.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace ProxySuper.WPF.Controls
+{
+ ///
+ /// VMESS_QUIC_Control.xaml 的交互逻辑
+ ///
+ public partial class VMESS_QUIC_Control : UserControl
+ {
+ public VMESS_QUIC_Control()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/ProxySuper.WPF/Properties/AssemblyInfo.cs b/ProxySuper.WPF/Properties/AssemblyInfo.cs
index b463edc..69453d3 100644
--- a/ProxySuper.WPF/Properties/AssemblyInfo.cs
+++ b/ProxySuper.WPF/Properties/AssemblyInfo.cs
@@ -49,5 +49,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.0.4.0")]
-[assembly: AssemblyFileVersion("4.0.4.0")]
+[assembly: AssemblyVersion("4.1.6.0")]
+[assembly: AssemblyFileVersion("4.1.6.0")]
diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj
index 16e36ae..af10d5b 100644
--- a/ProxySuper.WPF/ProxySuper.WPF.csproj
+++ b/ProxySuper.WPF/ProxySuper.WPF.csproj
@@ -112,6 +112,9 @@
VLESS_KCP_Control.xaml
+
+ VLESS_QUIC_Control.xaml
+
VLESS_TCP_TLS_Control.xaml
@@ -124,6 +127,9 @@
VMESS_KCP_Control.xaml
+
+ VMESS_QUIC_Control.xaml
+
VMESS_TCP_TLS_Control.xaml
@@ -228,6 +234,10 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -244,6 +254,10 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -479,6 +493,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -491,6 +508,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -587,6 +607,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -599,6 +622,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
diff --git a/ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_QUIC.json b/ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_QUIC.json
new file mode 100644
index 0000000..4003ae5
--- /dev/null
+++ b/ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VLESS_QUIC.json
@@ -0,0 +1,31 @@
+{
+ "port": 2000,
+ "protocol": "vless",
+ "settings": {
+ "clients": [
+ {
+ "id": ""
+ }
+ ],
+ "decryption": "none"
+ },
+ "streamSettings": {
+ "network": "quic",
+ "quicSettings": {
+ "security": "none",
+ "key": "",
+ "header": {
+ "type": "none"
+ }
+ },
+ "security": "tls",
+ "tlsSettings": {
+ "certificates": [
+ {
+ "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt",
+ "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_QUIC.json b/ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_QUIC.json
new file mode 100644
index 0000000..15fcea1
--- /dev/null
+++ b/ProxySuper.WPF/Templates/v2ray/server/05_inbounds/VMESS_QUIC.json
@@ -0,0 +1,31 @@
+{
+ "port": 3000,
+ "protocol": "vmess",
+ "settings": {
+ "clients": [
+ {
+ "id": ""
+ }
+ ],
+ "decryption": "none"
+ },
+ "streamSettings": {
+ "network": "quic",
+ "quicSettings": {
+ "security": "none",
+ "key": "",
+ "header": {
+ "type": "none"
+ }
+ },
+ "security": "tls",
+ "tlsSettings": {
+ "certificates": [
+ {
+ "certificateFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.crt",
+ "keyFile": "/usr/local/etc/v2ray/ssl/v2ray_ssl.key"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_QUIC.json b/ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_QUIC.json
new file mode 100644
index 0000000..5ee61b5
--- /dev/null
+++ b/ProxySuper.WPF/Templates/xray/server/05_inbounds/VLESS_QUIC.json
@@ -0,0 +1,31 @@
+{
+ "port": 2000,
+ "protocol": "vless",
+ "settings": {
+ "clients": [
+ {
+ "id": ""
+ }
+ ],
+ "decryption": "none"
+ },
+ "streamSettings": {
+ "network": "quic",
+ "quicSettings": {
+ "security": "none",
+ "key": "",
+ "header": {
+ "type": "none"
+ }
+ },
+ "security": "tls",
+ "tlsSettings": {
+ "certificates": [
+ {
+ "certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt",
+ "keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_QUIC.json b/ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_QUIC.json
new file mode 100644
index 0000000..3722cc6
--- /dev/null
+++ b/ProxySuper.WPF/Templates/xray/server/05_inbounds/VMESS_QUIC.json
@@ -0,0 +1,31 @@
+{
+ "port": 3000,
+ "protocol": "vmess",
+ "settings": {
+ "clients": [
+ {
+ "id": ""
+ }
+ ],
+ "decryption": "none"
+ },
+ "streamSettings": {
+ "network": "quic",
+ "quicSettings": {
+ "security": "none",
+ "key": "",
+ "header": {
+ "type": "none"
+ }
+ },
+ "security": "tls",
+ "tlsSettings": {
+ "certificates": [
+ {
+ "certificateFile": "/usr/local/etc/xray/ssl/xray_ssl.crt",
+ "keyFile": "/usr/local/etc/xray/ssl/xray_ssl.key"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml
index a9a9625..c90dcd4 100644
--- a/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml
+++ b/ProxySuper.WPF/Views/Xray/XrayConfigView.xaml
@@ -52,6 +52,13 @@
+
+
+
+
+
+
+
+
Date: Thu, 24 Nov 2022 21:54:52 +0800
Subject: [PATCH 09/14] update v4.1.7
---
ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml | 14 ++++++++++++++
ProxySuper.WPF/Views/Xray/XrayConfigView.xaml | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml b/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml
index 728e2ab..c6355a4 100644
--- a/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml
+++ b/ProxySuper.WPF/Views/V2ray/V2rayConfigView.xaml
@@ -45,6 +45,13 @@
+
+
+
+
+
+
+
+
+ Header="VLESS-QUIC">
@@ -83,7 +83,7 @@
+ Header="VMESS-QUIC">
From ac003d476ba46d7dc5d73b6e50d67b92b7b91459 Mon Sep 17 00:00:00 2001
From: next-autumn <73510229+next-autumn@users.noreply.github.com>
Date: Sun, 27 Nov 2022 10:23:25 +0800
Subject: [PATCH 10/14] =?UTF-8?q?=E4=B8=8B=E7=89=88=E6=9C=AC=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=20=E3=80=90Hysteria=E3=80=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
下版本添加 【Hysteria】
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4847c7a..a32d956 100644
--- a/README.md
+++ b/README.md
@@ -111,7 +111,7 @@ Microsoft [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-fram
在使用遇到问题时,请先看一下[常见问题集锦](https://github.com/proxysu/windows/wiki/CommonError),如果还不能解决,可以到以上平台询问,个人精力有限,尽力解答。
-忙... 近期更新。
+下版本添加 【Hysteria】
From 5db61a02b5ccdb96184a5972e650edf316558b04 Mon Sep 17 00:00:00 2001
From: 123 <123@github.com>
Date: Sat, 17 Dec 2022 10:41:46 +0800
Subject: [PATCH 11/14] hysterial model
---
.../Models/Projects/HysteriaSettings.cs | 23 +++++++
.../Models/Projects/ProjectType.cs | 1 +
ProxySuper.Core/Models/Record.cs | 5 ++
ProxySuper.Core/ProxySuper.Core.csproj | 3 +
.../ViewModels/HysteriaEditorViewModel.cs | 63 +++++++++++++++++++
.../ViewModels/HysteriaInstallViewModel.cs | 25 ++++++++
6 files changed, 120 insertions(+)
create mode 100644 ProxySuper.Core/Models/Projects/HysteriaSettings.cs
create mode 100644 ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs
create mode 100644 ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs
diff --git a/ProxySuper.Core/Models/Projects/HysteriaSettings.cs b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
new file mode 100644
index 0000000..087884f
--- /dev/null
+++ b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ProxySuper.Core.Models.Projects
+{
+ public class HysteriaSettings
+ {
+ public string Domain { get; set; } = "";
+
+ public string Obfs { get; set; } = "";
+
+ public string Email { get; set; } = "";
+
+ public int Port { get; set; } = 36712;
+
+ public int UpMbps { get; set; } = 300;
+
+ public int DownMbps { get; set; } = 300;
+ }
+}
diff --git a/ProxySuper.Core/Models/Projects/ProjectType.cs b/ProxySuper.Core/Models/Projects/ProjectType.cs
index 15b3e48..ec2a37d 100644
--- a/ProxySuper.Core/Models/Projects/ProjectType.cs
+++ b/ProxySuper.Core/Models/Projects/ProjectType.cs
@@ -8,5 +8,6 @@
Brook = 3,
V2ray = 4,
MTProtoGo = 5,
+ Hysteria = 6,
}
}
diff --git a/ProxySuper.Core/Models/Record.cs b/ProxySuper.Core/Models/Record.cs
index b48001e..54629f5 100644
--- a/ProxySuper.Core/Models/Record.cs
+++ b/ProxySuper.Core/Models/Record.cs
@@ -51,6 +51,9 @@ namespace ProxySuper.Core.Models
[JsonProperty("mtProtoGoSettings")]
public MTProtoGoSettings MTProtoGoSettings { get; set; }
+ [JsonProperty]
+ public HysteriaSettings HysteriaSettings { get; set; }
+
[JsonIgnore]
public ProjectType Type
@@ -67,6 +70,8 @@ namespace ProxySuper.Core.Models
if (MTProtoGoSettings != null) return ProjectType.MTProtoGo;
+ if (HysteriaSettings != null) return ProjectType.Hysteria;
+
return ProjectType.Brook;
}
}
diff --git a/ProxySuper.Core/ProxySuper.Core.csproj b/ProxySuper.Core/ProxySuper.Core.csproj
index 091ab17..d181519 100644
--- a/ProxySuper.Core/ProxySuper.Core.csproj
+++ b/ProxySuper.Core/ProxySuper.Core.csproj
@@ -90,6 +90,7 @@
+
@@ -122,6 +123,8 @@
+
+
diff --git a/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs b/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs
new file mode 100644
index 0000000..7de577a
--- /dev/null
+++ b/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs
@@ -0,0 +1,63 @@
+using MvvmCross.Navigation;
+using MvvmCross.ViewModels;
+using ProxySuper.Core.Models;
+using ProxySuper.Core.Models.Hosts;
+using ProxySuper.Core.Models.Projects;
+using ProxySuper.Core.Services;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Navigation;
+
+namespace ProxySuper.Core.ViewModels
+{
+ public class HysteriaEditorViewModel : MvxViewModel
+ {
+ public string Id { get; set; }
+
+ public Host Host { get; set; }
+
+ public HysteriaSettings Settings { get; set; }
+
+ public IMvxNavigationService NavigationService { get; }
+
+ public HysteriaEditorViewModel(IMvxNavigationService mvxNavigationService)
+ {
+ NavigationService = mvxNavigationService;
+ }
+
+ public override void Prepare(Record parameter)
+ {
+ var record = Utils.DeepClone(parameter);
+
+ Id = record.Id;
+ Host = record.Host;
+ Settings = record.HysteriaSettings;
+ }
+
+ public void Save()
+ {
+ NavigationService.Close(this, new Record
+ {
+ Id = Id,
+ Host = Host,
+ HysteriaSettings = Settings,
+ });
+ }
+
+ public void SaveAndInstall()
+ {
+ var record = new Record
+ {
+ Id = Id,
+ Host = Host,
+ HysteriaSettings = Settings,
+ };
+
+ NavigationService.Close(this, record);
+ NavigationService.Navigate(record);
+ }
+ }
+}
diff --git a/ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs b/ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs
new file mode 100644
index 0000000..ec0d49d
--- /dev/null
+++ b/ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs
@@ -0,0 +1,25 @@
+using MvvmCross.ViewModels;
+using ProxySuper.Core.Models;
+using ProxySuper.Core.Models.Hosts;
+using ProxySuper.Core.Models.Projects;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ProxySuper.Core.ViewModels
+{
+ public class HysteriaInstallViewModel : MvxViewModel
+ {
+ public Host Host { get; set; }
+
+ public HysteriaSettings Settings { get; set; }
+
+ public override void Prepare(Record parameter)
+ {
+ Host = parameter.Host;
+ Settings = parameter.HysteriaSettings;
+ }
+ }
+}
From 1a5a7219e39bc081efaec1750155005dcd26e375 Mon Sep 17 00:00:00 2001
From: 123 <123@github.com>
Date: Sat, 17 Dec 2022 11:25:09 +0800
Subject: [PATCH 12/14] update
---
.../Models/Projects/HysteriaSettings.cs | 2 +
.../ViewModels/HysteriaEditorViewModel.cs | 7 +-
ProxySuper.WPF/ProxySuper.WPF.csproj | 7 ++
ProxySuper.WPF/Resources/Languages/en.xaml | 8 ++
ProxySuper.WPF/Resources/Languages/tw_cn.xaml | 8 ++
ProxySuper.WPF/Resources/Languages/zh_cn.xaml | 9 ++
.../Views/Hysteria/HysteriaEditorView.xaml | 87 +++++++++++++++++++
.../Views/Hysteria/HysteriaEditorView.xaml.cs | 27 ++++++
8 files changed, 154 insertions(+), 1 deletion(-)
create mode 100644 ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml
create mode 100644 ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml.cs
diff --git a/ProxySuper.Core/Models/Projects/HysteriaSettings.cs b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
index 087884f..9363741 100644
--- a/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
+++ b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
@@ -14,6 +14,8 @@ namespace ProxySuper.Core.Models.Projects
public string Email { get; set; } = "";
+ public string Protocol { get; set; } = "udp";
+
public int Port { get; set; } = 36712;
public int UpMbps { get; set; } = 300;
diff --git a/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs b/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs
index 7de577a..7bd40c4 100644
--- a/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs
+++ b/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs
@@ -1,4 +1,5 @@
-using MvvmCross.Navigation;
+using MvvmCross.Commands;
+using MvvmCross.Navigation;
using MvvmCross.ViewModels;
using ProxySuper.Core.Models;
using ProxySuper.Core.Models.Hosts;
@@ -23,6 +24,10 @@ namespace ProxySuper.Core.ViewModels
public IMvxNavigationService NavigationService { get; }
+ public IMvxCommand SaveCommand => new MvxCommand(() => Save());
+
+ public IMvxCommand SaveAndInstallCommand => new MvxCommand(SaveAndInstall);
+
public HysteriaEditorViewModel(IMvxNavigationService mvxNavigationService)
{
NavigationService = mvxNavigationService;
diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj
index af10d5b..a167206 100644
--- a/ProxySuper.WPF/ProxySuper.WPF.csproj
+++ b/ProxySuper.WPF/ProxySuper.WPF.csproj
@@ -158,6 +158,9 @@
HomeView.xaml
+
+ HysteriaEditorView.xaml
+
MTProxyGoConfigView.xaml
@@ -318,6 +321,10 @@
MSBuild:Compile
PreserveNewest
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/ProxySuper.WPF/Resources/Languages/en.xaml b/ProxySuper.WPF/Resources/Languages/en.xaml
index ab1de59..411ba68 100644
--- a/ProxySuper.WPF/Resources/Languages/en.xaml
+++ b/ProxySuper.WPF/Resources/Languages/en.xaml
@@ -149,4 +149,12 @@
Port
Cleantext
Secret
+
+
+ Address
+ Port
+ OBFS
+ Email
+ UpMbps
+ DownMbps
\ No newline at end of file
diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
index 4bdf7b2..5c61fff 100644
--- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
@@ -150,4 +150,12 @@
端口
加密前字符
密鑰
+
+
+ 域名
+ 端口
+ 加密字符
+ 郵箱
+ 上傳限速
+ 下載限速
\ No newline at end of file
diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
index b1e6d5f..48fe1a3 100644
--- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml
@@ -151,4 +151,13 @@
端口
加密前字符
密钥
+
+
+ 域名
+ 端口
+ 加密字符
+ 协议
+ 邮箱
+ 上传限速
+ 下载限速
\ No newline at end of file
diff --git a/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml b/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml
new file mode 100644
index 0000000..1d1b65a
--- /dev/null
+++ b/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml.cs b/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml.cs
new file mode 100644
index 0000000..66e790c
--- /dev/null
+++ b/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace ProxySuper.WPF.Views.Hysteria
+{
+ ///
+ /// HysteriaEditorView.xaml 的交互逻辑
+ ///
+ public partial class HysteriaEditorView : Window
+ {
+ public HysteriaEditorView()
+ {
+ InitializeComponent();
+ }
+ }
+}
From 07c8d9bb2b5d225ac0816c99ba3e65bedfe0cc5a Mon Sep 17 00:00:00 2001
From: 123 <123@github.com>
Date: Sat, 17 Dec 2022 11:25:22 +0800
Subject: [PATCH 13/14] .
---
ProxySuper.WPF/Resources/Languages/en.xaml | 1 +
ProxySuper.WPF/Resources/Languages/tw_cn.xaml | 1 +
2 files changed, 2 insertions(+)
diff --git a/ProxySuper.WPF/Resources/Languages/en.xaml b/ProxySuper.WPF/Resources/Languages/en.xaml
index 411ba68..a126fac 100644
--- a/ProxySuper.WPF/Resources/Languages/en.xaml
+++ b/ProxySuper.WPF/Resources/Languages/en.xaml
@@ -154,6 +154,7 @@
Address
Port
OBFS
+ Protocol
Email
UpMbps
DownMbps
diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
index 5c61fff..478ce1c 100644
--- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
+++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml
@@ -156,6 +156,7 @@
端口
加密字符
郵箱
+ 協議
上傳限速
下載限速
\ No newline at end of file
From f37127736243be5270b443435788ef8b43ac6584 Mon Sep 17 00:00:00 2001
From: test
Date: Mon, 27 Feb 2023 17:26:55 +0800
Subject: [PATCH 14/14] add hysteria editor
---
.../Models/Projects/HysteriaSettings.cs | 10 +-
ProxySuper.Core/ProxySuper.Core.csproj | 1 +
ProxySuper.Core/Services/HysteriaService.cs | 168 ++++++++++++++++++
ProxySuper.Core/ViewModels/HomeViewModel.cs | 17 ++
.../ViewModels/HysteriaInstallViewModel.cs | 51 +++++-
ProxySuper.WPF/ProxySuper.WPF.csproj | 3 +
ProxySuper.WPF/Templates/Hysteria/config.json | 10 ++
ProxySuper.WPF/Views/HomeView.xaml | 1 +
.../Views/Hysteria/HysteriaEditorView.xaml | 17 +-
.../Views/Hysteria/HysteriaEditorView.xaml.cs | 10 +-
10 files changed, 269 insertions(+), 19 deletions(-)
create mode 100644 ProxySuper.Core/Services/HysteriaService.cs
create mode 100644 ProxySuper.WPF/Templates/Hysteria/config.json
diff --git a/ProxySuper.Core/Models/Projects/HysteriaSettings.cs b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
index 9363741..4f7f9ed 100644
--- a/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
+++ b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace ProxySuper.Core.Models.Projects
{
- public class HysteriaSettings
+ public class HysteriaSettings : IProjectSettings
{
public string Domain { get; set; } = "";
@@ -21,5 +21,13 @@ namespace ProxySuper.Core.Models.Projects
public int UpMbps { get; set; } = 300;
public int DownMbps { get; set; } = 300;
+
+ public List FreePorts
+ {
+ get
+ {
+ return new List { Port };
+ }
+ }
}
}
diff --git a/ProxySuper.Core/ProxySuper.Core.csproj b/ProxySuper.Core/ProxySuper.Core.csproj
index d181519..5f54766 100644
--- a/ProxySuper.Core/ProxySuper.Core.csproj
+++ b/ProxySuper.Core/ProxySuper.Core.csproj
@@ -108,6 +108,7 @@
+
diff --git a/ProxySuper.Core/Services/HysteriaService.cs b/ProxySuper.Core/Services/HysteriaService.cs
new file mode 100644
index 0000000..3c5b48b
--- /dev/null
+++ b/ProxySuper.Core/Services/HysteriaService.cs
@@ -0,0 +1,168 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using ProxySuper.Core.Models.Hosts;
+using ProxySuper.Core.Models.Projects;
+using Renci.SshNet.Messages;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace ProxySuper.Core.Services
+{
+ public class HysteriaService : ServiceBase
+ {
+ public HysteriaService(Host host, HysteriaSettings settings) : base(host, settings)
+ {
+ }
+
+
+ public void Install()
+ {
+ try
+ {
+ Progress.Step = "安装Hysteria";
+ Progress.Percentage = 0;
+
+
+ Progress.Desc = "检测系统环境";
+ EnsureRootUser();
+ EnsureSystemEnv();
+ Progress.Percentage = 20;
+
+ Progress.Desc = "安装必要的系统工具";
+ InstallSystemTools();
+ Progress.Percentage = 40;
+
+ Progress.Desc = "配置防火墙";
+ ConfigFirewalld();
+ Progress.Percentage = 50;
+
+ Progress.Step = "检测网络环境";
+ EnsureNetwork();
+ Progress.Percentage = 60;
+
+
+ Progress.Desc = "检测域名是否绑定本机IP";
+ ValidateDomain();
+ Progress.Percentage = 80;
+
+ Progress.Step = "上传Hysteria配置文件";
+ UploadConfigFile();
+ Progress.Step = "安装Hysteria服务";
+ InstallHysteria();
+
+ Progress.Percentage = 100;
+ Progress.Step = "安装Hysteria成功";
+ Progress.Desc = "安装Hysteria成功";
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message);
+ }
+ }
+
+ public void Uninstall()
+ {
+ Task.Factory.StartNew(() =>
+ {
+ try
+ {
+ Progress.Step = "卸载Hysteria";
+ Progress.Percentage = 0;
+
+ Progress.Desc = "停止Hysteria服务";
+ RunCmd("systemctl stop Hysteria");
+ RunCmd("systemctl disable Hysteria");
+ Progress.Percentage = 30;
+
+ Progress.Desc = "删除Hysteria相关文件";
+ RunCmd("rm -rf /etc/systemd/system/Hysteria.service");
+ RunCmd("rm -rf /usr/bin/Hysteria");
+ Progress.Percentage = 80;
+
+ Progress.Desc = "重置防火墙设置";
+ ResetFirewalld();
+
+ Progress.Percentage = 100;
+ Progress.Desc = "卸载完成";
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message);
+ }
+ });
+ }
+
+ private string HysteriaServiceTemp = @"
+ [Unit]
+ Description=hysteria service
+ After=network.target syslog.target
+ Wants=network.target
+
+ [Service]
+ Type=simple
+ ExecStart=##run_cmd##
+
+ [Install]
+ WantedBy=multi-user.target";
+
+ private void InstallHysteria()
+ {
+ Progress.Desc = "执行Hysteria安装文件";
+ string url = "https://github.com/apernet/hysteria/releases/download/v1.3.3/hysteria-linux-386";
+ string targetPath = "/user/bin/hysteria/hysteria-linux-386";
+
+ if (ArchType == ArchType.arm)
+ {
+ url = url.Replace("hysteria-linux-386", "hysteria-linux-arm");
+ targetPath = targetPath.Replace("hysteria-linux-386", "hysteria-linux-arm");
+ }
+
+ RunCmd($"curl -L {url} -o /usr/bin/hysteria");
+ RunCmd("chmod +x /usr/bin/hysteria");
+
+ Progress.Desc = "设置Hysteria服务";
+ var cmd = targetPath + " server";
+ var hysteriaService = HysteriaServiceTemp.Replace("##run_cmd##", cmd);
+
+ RunCmd("rm -rf /etc/systemd/system/hysteria.service");
+ RunCmd("touch /etc/systemd/system/hysteria.service");
+
+ RunCmd($"echo \"{hysteriaService}\" > /etc/systemd/system/hysteria.service");
+ RunCmd("sudo chmod 777 /etc/systemd/system/hysteria.service");
+
+
+ Progress.Desc = "启动Hysteria服务";
+ RunCmd("systemctl enable hysteria");
+ RunCmd("systemctl restart hysteria");
+ }
+
+ private const string ConfigFilePath = @"Templates\Hysteria\config.json";
+ private void UploadConfigFile()
+ {
+ var text = File.ReadAllText(ConfigFilePath, Encoding.UTF8);
+ var json = JsonConvert.DeserializeObject(text);
+ var obj = JToken.FromObject(json) as dynamic;
+
+
+ obj["listen"] = Settings.Port;
+ obj["acme"]["domains"][0] = Settings.Domain;
+ obj["email"] = Settings.Email;
+ obj["obfs"] = Settings.Obfs;
+
+ var configJson = JsonConvert.SerializeObject(
+ obj,
+ Formatting.Indented,
+ new JsonSerializerSettings()
+ {
+ NullValueHandling = NullValueHandling.Ignore
+ });
+
+ WriteToFile(configJson, "/user/bin/hysteria/config.json");
+ }
+ }
+}
diff --git a/ProxySuper.Core/ViewModels/HomeViewModel.cs b/ProxySuper.Core/ViewModels/HomeViewModel.cs
index 2ba60a8..5c5c1ec 100644
--- a/ProxySuper.Core/ViewModels/HomeViewModel.cs
+++ b/ProxySuper.Core/ViewModels/HomeViewModel.cs
@@ -108,6 +108,8 @@ namespace ProxySuper.Core.ViewModels
public IMvxCommand AddBrookCommand => new MvxAsyncCommand(AddBrookRecord);
+ public IMvxCommand AddHysteriaCommand => new MvxAsyncCommand(AddHysteriaRecord);
+
public IMvxCommand RemoveCommand => new MvxAsyncCommand(DeleteRecord);
public IMvxCommand EditCommand => new MvxAsyncCommand(EditRecord);
@@ -204,6 +206,21 @@ namespace ProxySuper.Core.ViewModels
SaveToJson();
}
+ public async Task AddHysteriaRecord()
+ {
+ Record record = new Record();
+ record.Id = Utils.GetTickID();
+ record.Host = new Host();
+ record.HysteriaSettings = new HysteriaSettings();
+
+ var result = await _navigationService.Navigate(record);
+ if (result == null) return;
+
+ Records.Add(result);
+
+ SaveToJson();
+ }
+
public async Task EditRecord(string id)
{
diff --git a/ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs b/ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs
index ec0d49d..3977e0d 100644
--- a/ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs
+++ b/ProxySuper.Core/ViewModels/HysteriaInstallViewModel.cs
@@ -1,9 +1,12 @@
-using MvvmCross.ViewModels;
+using MvvmCross.Commands;
+using MvvmCross.ViewModels;
using ProxySuper.Core.Models;
using ProxySuper.Core.Models.Hosts;
using ProxySuper.Core.Models.Projects;
+using ProxySuper.Core.Services;
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -12,14 +15,52 @@ namespace ProxySuper.Core.ViewModels
{
public class HysteriaInstallViewModel : MvxViewModel
{
- public Host Host { get; set; }
+ public Host _host { get; set; }
- public HysteriaSettings Settings { get; set; }
+ public HysteriaSettings _settings { get; set; }
+
+ public HysteriaService _service { get; set; }
public override void Prepare(Record parameter)
{
- Host = parameter.Host;
- Settings = parameter.HysteriaSettings;
+ _host = parameter.Host;
+ _settings = parameter.HysteriaSettings;
+ }
+
+ public override Task Initialize()
+ {
+ _service = new HysteriaService(_host, _settings);
+ _service.Progress.StepUpdate = () => RaisePropertyChanged("Progress");
+ _service.Progress.LogsUpdate = () => RaisePropertyChanged("Logs");
+ _service.Connect();
+ return base.Initialize();
+ }
+
+ public override void ViewDestroy(bool viewFinishing = true)
+ {
+ _service.Disconnect();
+ this.SaveInstallLog();
+ base.ViewDestroy(viewFinishing);
+ }
+
+ public ProjectProgress Progress => _service.Progress;
+
+ public string Logs => _service.Progress.Logs;
+
+ public IMvxCommand InstallCommand => new MvxCommand(_service.Install);
+
+ public IMvxCommand UninstallCommand => new MvxCommand(_service.Uninstall);
+
+
+ private void SaveInstallLog()
+ {
+ if (!Directory.Exists("Logs"))
+ {
+ Directory.CreateDirectory("Logs");
+ }
+
+ var fileName = System.IO.Path.Combine("Logs", DateTime.Now.ToString("yyyy-MM-dd hh-mm") + ".hysteria.txt");
+ File.WriteAllText(fileName, Logs);
}
}
}
diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj
index a167206..aab901b 100644
--- a/ProxySuper.WPF/ProxySuper.WPF.csproj
+++ b/ProxySuper.WPF/ProxySuper.WPF.csproj
@@ -413,6 +413,9 @@
SettingsSingleFileGenerator
Settings.Designer.cs
+
+ PreserveNewest
+
PreserveNewest
diff --git a/ProxySuper.WPF/Templates/Hysteria/config.json b/ProxySuper.WPF/Templates/Hysteria/config.json
new file mode 100644
index 0000000..a25268b
--- /dev/null
+++ b/ProxySuper.WPF/Templates/Hysteria/config.json
@@ -0,0 +1,10 @@
+{
+ "listen": ":36712",
+ "acme": {
+ "domains": [
+ "your.domain.com"
+ ],
+ "email": "your@email.com"
+ },
+ "obfs": "8ZuA2Zpqhuk8yakXvMjDqEXBwY"
+}
\ No newline at end of file
diff --git a/ProxySuper.WPF/Views/HomeView.xaml b/ProxySuper.WPF/Views/HomeView.xaml
index 34c5ff3..1e64f25 100644
--- a/ProxySuper.WPF/Views/HomeView.xaml
+++ b/ProxySuper.WPF/Views/HomeView.xaml
@@ -21,6 +21,7 @@
+