diff --git a/ProxySU_Core/Models/XraySettings.cs b/ProxySU_Core/Models/XraySettings.cs index 56dbda9..d045e2c 100644 --- a/ProxySU_Core/Models/XraySettings.cs +++ b/ProxySU_Core/Models/XraySettings.cs @@ -21,9 +21,12 @@ namespace ProxySU_Core.Models Types = new List(); VLESS_WS_Path = "/vlessws"; VLESS_TCP_Path = "/vlesstcp"; + VLESS_H2_Path = "/vlessh2"; VMESS_WS_Path = "/vmessws"; VMESS_TCP_Path = "/vmesstcp"; + VMESS_H2_Path = "/vmessh2"; TrojanPassword = guid; + Trojan_WS_Path = "/trojanws"; } /// @@ -69,7 +72,7 @@ namespace ProxySU_Core.Models /// /// vmess http2 path /// - public string VMESS_HTTP2_Path { get; set; } + public string VMESS_H2_Path { get; set; } /// /// vmess mKcp seed diff --git a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs index 54d1435..f11d618 100644 --- a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs +++ b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs @@ -50,6 +50,12 @@ namespace ProxySU_Core.ViewModels set => settings.VLESS_WS_Path = value; } + public string VLESS_H2_Path + { + get => settings.VLESS_H2_Path; + set => settings.VLESS_H2_Path = value; + } + public string VMESS_TCP_Path { get => settings.VMESS_TCP_Path; @@ -62,6 +68,12 @@ namespace ProxySU_Core.ViewModels set => settings.VMESS_WS_Path = value; } + public string VMESS_H2_Path + { + get => settings.VMESS_H2_Path; + set => settings.VMESS_H2_Path = value; + } + public string TrojanPassword { get => settings.TrojanPassword; @@ -134,6 +146,25 @@ namespace ProxySU_Core.ViewModels } } + public bool Checked_VLESS_H2 + { + get => settings.Types.Contains(XrayType.VLESS_H2_TLS); + set + { + if (value == true) + { + if (!settings.Types.Contains(XrayType.VLESS_H2_TLS)) + settings.Types.Add(XrayType.VLESS_H2_TLS); + } + else + { + settings.Types.Remove(XrayType.VLESS_H2_TLS); + } + Notify("Checked_VLESS_H2"); + Notify("VLESS_H2_Path_Visibility"); + } + } + public bool Checked_VMESS_TCP { get @@ -178,6 +209,24 @@ namespace ProxySU_Core.ViewModels } } + public bool Checked_VMESS_H2 + { + get => settings.Types.Contains(XrayType.VMESS_H2_TLS); + set + { + if (value == true) + { + if (!settings.Types.Contains(XrayType.VMESS_H2_TLS)) + settings.Types.Add(XrayType.VMESS_H2_TLS); + } + else + { + settings.Types.Remove(XrayType.VMESS_H2_TLS); + } + Notify("Checked_VMESS_H2"); + Notify("VMESS_H2_Path_Visibility"); + } + } public bool Checked_Trojan_TCP { get @@ -214,6 +263,14 @@ namespace ProxySU_Core.ViewModels return Checked_VLESS_WS ? Visibility.Visible : Visibility.Hidden; } } + public Visibility VLESS_H2_Path_Visibility + { + get + { + return Checked_VLESS_H2 ? Visibility.Visible : Visibility.Hidden; + } + } + public Visibility VMESS_TCP_Path_Visibility { get @@ -228,6 +285,13 @@ namespace ProxySU_Core.ViewModels return Checked_VMESS_WS ? Visibility.Visible : Visibility.Hidden; } } + public Visibility VMESS_H2_Path_Visibility + { + get + { + return Checked_VMESS_H2 ? Visibility.Visible : Visibility.Hidden; + } + } public Visibility Trojan_TCP_Pwd_Visibility { get @@ -248,6 +312,10 @@ namespace ProxySU_Core.ViewModels { get => ShareLink.Build(XrayType.VLESS_WS_TLS, settings); } + public string VLESS_H2_TLS_ShareLink + { + get => ShareLink.Build(XrayType.VLESS_H2_TLS, settings); + } public string VMESS_TCP_TLS_ShareLink { get => ShareLink.Build(XrayType.VMESS_TCP_TLS, settings); @@ -256,6 +324,10 @@ namespace ProxySU_Core.ViewModels { get => ShareLink.Build(XrayType.VMESS_WS_TLS, settings); } + public string VMESS_H2_TLS_ShareLink + { + get => ShareLink.Build(XrayType.VMESS_H2_TLS, settings); + } public string Trojan_TCP_TLS_ShareLink { get => ShareLink.Build(XrayType.Trojan_TCP_TLS, settings); diff --git a/ProxySU_Core/Views/MainWindow.xaml b/ProxySU_Core/Views/MainWindow.xaml index 2649b91..af4e8e0 100644 --- a/ProxySU_Core/Views/MainWindow.xaml +++ b/ProxySU_Core/Views/MainWindow.xaml @@ -26,6 +26,7 @@