From 332f54224ffea1e92bacf09116c9cf98762d6042 Mon Sep 17 00:00:00 2001 From: MisCusi2023 Date: Sun, 7 May 2023 20:17:03 -0700 Subject: [PATCH] update flow control --- ProxySuper.Core/Models/Projects/XraySettings.cs | 8 +++++--- ProxySuper.Core/Services/ShareLink.cs | 2 +- ProxySuper.Core/Services/XrayConfigBuilder.cs | 1 + ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml | 2 +- ProxySuper.WPF/Controls/XraySettingsControl.xaml | 2 +- ProxySuper.WPF/MainWindow.xaml | 2 +- .../xray/server/05_inbounds/VLESS_TCP_XTLS.json | 12 +++++------- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ProxySuper.Core/Models/Projects/XraySettings.cs b/ProxySuper.Core/Models/Projects/XraySettings.cs index 2abc078..eb72388 100644 --- a/ProxySuper.Core/Models/Projects/XraySettings.cs +++ b/ProxySuper.Core/Models/Projects/XraySettings.cs @@ -9,12 +9,14 @@ 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 static List UTLSList = new List { "", "chrome", "firefox", "safari", "ios", "android", "edge", "360", "qq", "random", "randomized" }; + + //流控参数在服务端只有两种 "none", "xtls-rprx-vision",客户端可以选择三种:"none", "xtls-rprx-vision", "xtls-rprx-vision-udp443",但是选择了XTLS模式就是默认flow不为空或者"none",所以这里不再填加"none"这一项。 + public static List FlowList = new List { "xtls-rprx-vision", "xtls-rprx-vision-udp443" }; //{ "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443", "xtls-rprx-splice", "xtls-rprx-splice-udp443" }; public string UTLS { get; set; } = UTLSList[1]; - public string Flow { get; set; } = FlowList[2]; + public string Flow { get; set; } = FlowList[0]; /// /// vless xtls shareLink diff --git a/ProxySuper.Core/Services/ShareLink.cs b/ProxySuper.Core/Services/ShareLink.cs index 4edf80e..f644f76 100644 --- a/ProxySuper.Core/Services/ShareLink.cs +++ b/ProxySuper.Core/Services/ShareLink.cs @@ -184,7 +184,7 @@ namespace ProxySuper.Core.Services case RayType.VLESS_TCP_XTLS: _protocol = "vless"; _type = "tcp"; - _security = "xtls"; + _security = "tls"; _descriptiveText = "vless-tcp-xtls"; break; case RayType.VLESS_WS: diff --git a/ProxySuper.Core/Services/XrayConfigBuilder.cs b/ProxySuper.Core/Services/XrayConfigBuilder.cs index 83fd110..87d04a0 100644 --- a/ProxySuper.Core/Services/XrayConfigBuilder.cs +++ b/ProxySuper.Core/Services/XrayConfigBuilder.cs @@ -103,6 +103,7 @@ namespace ProxySuper.Core.Services } else { + flow = "xtls-rprx-vision,none";//兼容普通tls与xtls obj = new { id = id, flow = flow }; } diff --git a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml index 290e5e2..6047338 100644 --- a/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml +++ b/ProxySuper.WPF/Controls/VLESS_XTLS_Control.xaml @@ -58,7 +58,7 @@ diff --git a/ProxySuper.WPF/Controls/XraySettingsControl.xaml b/ProxySuper.WPF/Controls/XraySettingsControl.xaml index 666f892..3632aa6 100644 --- a/ProxySuper.WPF/Controls/XraySettingsControl.xaml +++ b/ProxySuper.WPF/Controls/XraySettingsControl.xaml @@ -167,7 +167,7 @@ Binding Path=Checked_VLESS_TCP_XTLS, Converter={StaticResource VisibleConverter} }"> -