From db6a399ca9b96adbb731434cc92a41540f1014cc Mon Sep 17 00:00:00 2001 From: autumn Date: Mon, 21 Nov 2022 16:42:47 +0800 Subject: [PATCH] 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" />