From 5494d63878c65cc9c0dbb7772d66ba467eaee5f4 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:58:56 +0800 Subject: [PATCH 1/4] Remove v2fly-core UI operation support --- v2rayN/ServiceLib/Enums/ECoreType.cs | 2 -- v2rayN/ServiceLib/Global.cs | 3 +-- v2rayN/ServiceLib/Handler/AppHandler.cs | 12 ++---------- .../Views/AddServerWindow.axaml.cs | 16 +++------------- v2rayN/v2rayN/Views/AddServerWindow.xaml.cs | 16 +++------------- 5 files changed, 9 insertions(+), 40 deletions(-) diff --git a/v2rayN/ServiceLib/Enums/ECoreType.cs b/v2rayN/ServiceLib/Enums/ECoreType.cs index de29b55c..cd93e7b9 100644 --- a/v2rayN/ServiceLib/Enums/ECoreType.cs +++ b/v2rayN/ServiceLib/Enums/ECoreType.cs @@ -5,9 +5,7 @@ v2fly = 1, Xray = 2, v2fly_v5 = 4, - mihomo = 13, - hysteria = 21, naiveproxy = 22, tuic = 23, diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index c0518b42..1dbff452 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -182,8 +182,7 @@ public static readonly List Flows = new() { "", "xtls-rprx-vision", "xtls-rprx-vision-udp443" }; public static readonly List Networks = new() { "tcp", "kcp", "ws", "httpupgrade", "xhttp", "h2", "quic", "grpc" }; public static readonly List KcpHeaderTypes = new() { "srtp", "utp", "wechat-video", "dtls", "wireguard" }; - public static readonly List CoreTypes = new() { "v2fly", "Xray", "sing_box" }; - public static readonly List CoreTypes4VLESS = new() { "Xray", "sing_box" }; + public static readonly List CoreTypes = new() { "Xray", "sing_box" }; public static readonly List DomainStrategies = new() { "AsIs", "IPIfNonMatch", "IPOnDemand" }; public static readonly List DomainStrategies4Singbox = new() { "ipv4_only", "ipv6_only", "prefer_ipv4", "prefer_ipv6", "" }; public static readonly List DomainMatchers = new() { "linear", "mph", "" }; diff --git a/v2rayN/ServiceLib/Handler/AppHandler.cs b/v2rayN/ServiceLib/Handler/AppHandler.cs index 447c31f9..ddc72d06 100644 --- a/v2rayN/ServiceLib/Handler/AppHandler.cs +++ b/v2rayN/ServiceLib/Handler/AppHandler.cs @@ -264,16 +264,8 @@ return (ECoreType)profileItem.CoreType; } - if (_config.CoreTypeItem == null) - { - return ECoreType.Xray; - } - var item = _config.CoreTypeItem.FirstOrDefault(it => it.ConfigType == eConfigType); - if (item == null) - { - return ECoreType.Xray; - } - return item.CoreType; + var item = _config.CoreTypeItem?.FirstOrDefault(it => it.ConfigType == eConfigType); + return item?.CoreType ?? ECoreType.Xray; } #endregion Core Type diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs index e9f00be9..008d6e6b 100644 --- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs @@ -26,20 +26,10 @@ namespace v2rayN.Desktop.Views ViewModel = new AddServerViewModel(profileItem, UpdateViewHandler); - if (profileItem.ConfigType == EConfigType.VLESS) + Global.CoreTypes.ForEach(it => { - Global.CoreTypes4VLESS.ForEach(it => - { - cmbCoreType.Items.Add(it); - }); - } - else - { - Global.CoreTypes.ForEach(it => - { - cmbCoreType.Items.Add(it); - }); - } + cmbCoreType.Items.Add(it); + }); cmbCoreType.Items.Add(string.Empty); cmbStreamSecurity.Items.Add(string.Empty); diff --git a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs index 80b26896..11c68424 100644 --- a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs @@ -20,20 +20,10 @@ namespace v2rayN.Views ViewModel = new AddServerViewModel(profileItem, UpdateViewHandler); - if (profileItem.ConfigType == EConfigType.VLESS) + Global.CoreTypes.ForEach(it => { - Global.CoreTypes4VLESS.ForEach(it => - { - cmbCoreType.Items.Add(it); - }); - } - else - { - Global.CoreTypes.ForEach(it => - { - cmbCoreType.Items.Add(it); - }); - } + cmbCoreType.Items.Add(it); + }); cmbCoreType.Items.Add(string.Empty); cmbStreamSecurity.Items.Add(string.Empty); From ccacda9bf5d9df01b7973928b3041751afe8f3cd Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:01:36 +0800 Subject: [PATCH 2/4] Using mixed local listening ports --- v2rayN/ServiceLib/Enums/EInboundProtocol.cs | 3 +-- v2rayN/ServiceLib/Global.cs | 2 +- .../Handler/SysProxy/SysProxyHandler.cs | 9 ++++----- v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 4 ++-- v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx | 4 ++-- v2rayN/ServiceLib/Resx/ResUI.resx | 4 ++-- v2rayN/ServiceLib/Resx/ResUI.ru.resx | 4 ++-- v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 4 ++-- v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 4 ++-- .../CoreConfig/CoreConfigClashService.cs | 6 ++---- .../CoreConfig/CoreConfigSingboxService.cs | 16 +++------------- .../CoreConfig/CoreConfigV2rayService.cs | 18 +++--------------- v2rayN/ServiceLib/Services/DownloadService.cs | 2 +- .../ViewModels/StatusBarViewModel.cs | 8 ++------ 14 files changed, 29 insertions(+), 59 deletions(-) diff --git a/v2rayN/ServiceLib/Enums/EInboundProtocol.cs b/v2rayN/ServiceLib/Enums/EInboundProtocol.cs index c1ff81ea..2d7c3034 100644 --- a/v2rayN/ServiceLib/Enums/EInboundProtocol.cs +++ b/v2rayN/ServiceLib/Enums/EInboundProtocol.cs @@ -3,12 +3,11 @@ public enum EInboundProtocol { socks = 0, - http, socks2, - http2, pac, api, api2, + mixed, speedtest = 21 } } \ No newline at end of file diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 1dbff452..70e85556 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -198,7 +198,7 @@ public static readonly List Languages = new() { "zh-Hans", "zh-Hant", "en", "fa-Ir", "ru" }; public static readonly List Alpns = new() { "h3", "h2", "http/1.1", "h3,h2", "h2,http/1.1", "h3,h2,http/1.1", "" }; public static readonly List LogLevels = new() { "debug", "info", "warning", "error", "none" }; - public static readonly List InboundTags = new() { "socks", "http", "socks2", "http2" }; + public static readonly List InboundTags = new() { "socks", "socks2" }; public static readonly List RuleProtocols = new() { "http", "tls", "bittorrent" }; public static readonly List RuleNetworks = new() { "", "tcp", "udp", "tcp,udp" }; public static readonly List destOverrideProtocols = ["http", "tls", "quic", "fakedns", "fakedns+others"]; diff --git a/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs b/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs index 8f1a0446..0230b0a4 100644 --- a/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs +++ b/v2rayN/ServiceLib/Handler/SysProxy/SysProxyHandler.cs @@ -13,8 +13,7 @@ try { - var port = AppHandler.Instance.GetLocalPort(EInboundProtocol.http); - var portSocks = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks); + var port = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks); if (port <= 0) { return false; @@ -23,7 +22,7 @@ { case ESysProxyType.ForcedChange when Utils.IsWindows(): { - GetWindowsProxyString(config, port, portSocks, out var strProxy, out var strExceptions); + GetWindowsProxyString(config, port, out var strProxy, out var strExceptions); ProxySettingWindows.SetProxy(strProxy, strExceptions, 2); break; } @@ -64,7 +63,7 @@ return true; } - private static void GetWindowsProxyString(Config config, int port, int portSocks, out string strProxy, out string strExceptions) + private static void GetWindowsProxyString(Config config, int port, out string strProxy, out string strExceptions) { strExceptions = $"{config.ConstItem.DefIEProxyExceptions};{config.SystemProxyItem.SystemProxyExceptions}"; if (config.SystemProxyItem.NotProxyLocalAddress) @@ -82,7 +81,7 @@ strProxy = config.SystemProxyItem.SystemProxyAdvancedProtocol .Replace("{ip}", Global.Loopback) .Replace("{http_port}", port.ToString()) - .Replace("{socks_port}", portSocks.ToString()); + .Replace("{socks_port}", port.ToString()); } } diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index 87415bd1..49a08c2a 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -3311,7 +3311,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 SOCKS Port 的本地化字符串。 + /// 查找类似 Mixed Port 的本地化字符串。 /// public static string TbSettingsSocksPort { get { @@ -3320,7 +3320,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 http port = +1; Pac port = +4; *ray API port = +5; mihomo API port = +6; 的本地化字符串。 + /// 查找类似 Pac port = +2; Xray API port = +3; mihomo API port = +4; 的本地化字符串。 /// public static string TbSettingsSocksPortTip { get { diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx index 830cefe5..37d4d93c 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx @@ -752,7 +752,7 @@ Turn on Sniffing - ساکس Port + Mixed Port درهنگام راه ائدازی شروع شود @@ -1244,7 +1244,7 @@ Copy the font TTF/TTC file to the directory guiFonts, restart the settings - http port = +1; Pac port = +4; *ray API port = +5; mihomo API port = +6; + Pac port = +2; Xray API port = +3; mihomo API port = +4; Set this with admin privileges, get admin privileges after startup diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index 3f006a0b..0b24b483 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -755,7 +755,7 @@ Turn on Sniffing - SOCKS Port + Mixed Port Start on boot @@ -992,7 +992,7 @@ Copy the font TTF/TTC file to the directory guiFonts, restart the settings - http port = +1; Pac port = +4; *ray API port = +5; mihomo API port = +6; + Pac port = +2; Xray API port = +3; mihomo API port = +4; Set this with admin privileges, get admin privileges after startup diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx index 493fb702..9134409b 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx @@ -761,7 +761,7 @@ Включить сниффинг - Порт Socks + Mixed Port Автозапуск @@ -1310,7 +1310,7 @@ Move up and down - http port = +1; Pac port = +4; *ray API port = +5; mihomo API port = +6; + Pac port = +2; Xray API port = +3; mihomo API port = +4; Install the font to the system and restart the settings diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index d5fd572e..c1f3426c 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -755,7 +755,7 @@ 开启流量探测 - 本地socks监听端口 + 本地混合监听端口 开机启动(可能会不成功) @@ -992,7 +992,7 @@ 拷贝字体TTF/TTC文件到目录guiFonts,重启设置 - http端口= +1;Pac端口= +4;*ray API端口= +5;mihomo API端口= +6; + Pac端口= +2;Xray API端口= +3;mihomo API端口= +4; 以管理员权限设置此项,在启动后获得管理员权限 diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index 87e5be51..30b605c6 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -755,7 +755,7 @@ 開啟流量探測 - 本機SOCKS偵聽埠 + 本機混合偵聽埠 開機啟動(可能會不成功) @@ -992,7 +992,7 @@ 複製字型TTF/TTC檔案到目錄guiFonts,重啟設定 - http連接埠= +1;Pac連接埠= +4;*ray API連接埠= +5;mihomo API連接埠= +6; + Pac連接埠= +2;Xray API連接埠= +3;mihomo API連接埠= +4; 以管理員權限設定此項,在啟動後獲得管理員權限 diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigClashService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigClashService.cs index ca820d91..e48f3a5f 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigClashService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigClashService.cs @@ -78,10 +78,8 @@ namespace ServiceLib.Services.CoreConfig return ret; } - //port - fileContent["port"] = AppHandler.Instance.GetLocalPort(EInboundProtocol.http); - //socks-port - fileContent["socks-port"] = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks); + //mixed-port + fileContent["mixed-port"] = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks); //log-level fileContent["log-level"] = GetLogLevel(_config.CoreBasicItem.Loglevel); diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs index 4ee4ff71..4170db6c 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigSingboxService.cs @@ -174,7 +174,7 @@ namespace ServiceLib.Services.CoreConfig { listen = Global.Loopback, listen_port = port, - type = EInboundProtocol.http.ToString(), + type = EInboundProtocol.mixed.ToString(), }; inbound.tag = inbound.type + inbound.listen_port.ToString(); singboxConfig.inbounds.Add(inbound); @@ -488,7 +488,7 @@ namespace ServiceLib.Services.CoreConfig { var inbound = new Inbound4Sbox() { - type = EInboundProtocol.socks.ToString(), + type = EInboundProtocol.mixed.ToString(), tag = EInboundProtocol.socks.ToString(), listen = Global.Loopback, }; @@ -505,10 +505,6 @@ namespace ServiceLib.Services.CoreConfig inbound.domain_strategy = routing.DomainStrategy4Singbox; } - //http - var inbound2 = GetInbound(inbound, EInboundProtocol.http, false); - singboxConfig.inbounds.Add(inbound2); - if (_config.Inbound.First().AllowLANConn) { if (_config.Inbound.First().NewPort4LAN) @@ -517,21 +513,15 @@ namespace ServiceLib.Services.CoreConfig inbound3.listen = listen; singboxConfig.inbounds.Add(inbound3); - var inbound4 = GetInbound(inbound, EInboundProtocol.http2, false); - inbound4.listen = listen; - singboxConfig.inbounds.Add(inbound4); - //auth if (Utils.IsNotEmpty(_config.Inbound.First().User) && Utils.IsNotEmpty(_config.Inbound.First().Pass)) { inbound3.users = new() { new() { username = _config.Inbound.First().User, password = _config.Inbound.First().Pass } }; - inbound4.users = new() { new() { username = _config.Inbound.First().User, password = _config.Inbound.First().Pass } }; } } else { inbound.listen = listen; - inbound2.listen = listen; } } } @@ -574,7 +564,7 @@ namespace ServiceLib.Services.CoreConfig var inbound = JsonUtils.DeepCopy(inItem); inbound.tag = protocol.ToString(); inbound.listen_port = inItem.listen_port + (int)protocol; - inbound.type = bSocks ? EInboundProtocol.socks.ToString() : EInboundProtocol.http.ToString(); + inbound.type = EInboundProtocol.mixed.ToString(); return inbound; } diff --git a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs index ca7e53b6..c55a5930 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/CoreConfigV2rayService.cs @@ -322,7 +322,7 @@ namespace ServiceLib.Services.CoreConfig { listen = Global.Loopback, port = port, - protocol = EInboundProtocol.http.ToString(), + protocol = EInboundProtocol.socks.ToString(), }; inbound.tag = inbound.protocol + inbound.port.ToString(); v2rayConfig.inbounds.Add(inbound); @@ -391,13 +391,9 @@ namespace ServiceLib.Services.CoreConfig var listen = "0.0.0.0"; v2rayConfig.inbounds = []; - Inbounds4Ray? inbound = GetInbound(_config.Inbound.First(), EInboundProtocol.socks, true); + var inbound = GetInbound(_config.Inbound.First(), EInboundProtocol.socks, true); v2rayConfig.inbounds.Add(inbound); - //http - Inbounds4Ray? inbound2 = GetInbound(_config.Inbound.First(), EInboundProtocol.http, false); - v2rayConfig.inbounds.Add(inbound2); - if (_config.Inbound.First().AllowLANConn) { if (_config.Inbound.First().NewPort4LAN) @@ -406,24 +402,16 @@ namespace ServiceLib.Services.CoreConfig inbound3.listen = listen; v2rayConfig.inbounds.Add(inbound3); - var inbound4 = GetInbound(_config.Inbound.First(), EInboundProtocol.http2, false); - inbound4.listen = listen; - v2rayConfig.inbounds.Add(inbound4); - //auth if (Utils.IsNotEmpty(_config.Inbound.First().User) && Utils.IsNotEmpty(_config.Inbound.First().Pass)) { inbound3.settings.auth = "password"; inbound3.settings.accounts = new List { new AccountsItem4Ray() { user = _config.Inbound.First().User, pass = _config.Inbound.First().Pass } }; - - inbound4.settings.auth = "password"; - inbound4.settings.accounts = new List { new AccountsItem4Ray() { user = _config.Inbound.First().User, pass = _config.Inbound.First().Pass } }; } } else { inbound.listen = listen; - inbound2.listen = listen; } } } @@ -449,7 +437,7 @@ namespace ServiceLib.Services.CoreConfig } inbound.tag = protocol.ToString(); inbound.port = inItem.LocalPort + (int)protocol; - inbound.protocol = bSocks ? EInboundProtocol.socks.ToString() : EInboundProtocol.http.ToString(); + inbound.protocol = EInboundProtocol.socks.ToString(); inbound.settings.udp = inItem.UdpEnabled; inbound.sniffing.enabled = inItem.SniffingEnabled; inbound.sniffing.destOverride = inItem.DestOverride; diff --git a/v2rayN/ServiceLib/Services/DownloadService.cs b/v2rayN/ServiceLib/Services/DownloadService.cs index d27732b5..2a076c41 100644 --- a/v2rayN/ServiceLib/Services/DownloadService.cs +++ b/v2rayN/ServiceLib/Services/DownloadService.cs @@ -280,7 +280,7 @@ namespace ServiceLib.Services { return null; } - var httpPort = AppHandler.Instance.GetLocalPort(EInboundProtocol.http); + var httpPort = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks); if (await SocketCheck(Global.Loopback, httpPort) == false) { return null; diff --git a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs index 656f74c0..e999576f 100644 --- a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs @@ -451,9 +451,7 @@ namespace ServiceLib.ViewModels public async Task InboundDisplayStatus() { StringBuilder sb = new(); - sb.Append($"[{EInboundProtocol.socks}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}]"); - sb.Append(" | "); - sb.Append($"[{EInboundProtocol.http}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.http)}]"); + sb.Append($"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks)}]"); InboundDisplay = $"{ResUI.LabLocal}:{sb}"; if (_config.Inbound.First().AllowLANConn) @@ -461,9 +459,7 @@ namespace ServiceLib.ViewModels if (_config.Inbound.First().NewPort4LAN) { StringBuilder sb2 = new(); - sb2.Append($"[{EInboundProtocol.socks}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks2)}]"); - sb2.Append(" | "); - sb2.Append($"[{EInboundProtocol.http}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.http2)}]"); + sb2.Append($"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks2)}]"); InboundLanDisplay = $"{ResUI.LabLAN}:{sb2}"; } else From 246f1d7df04ad80fa592e04daaba101d99667088 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:54:13 +0800 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34bda29c..bb75367c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # v2rayN -A GUI client for Windows and Linux, support [Xray core](https://github.com/XTLS/Xray-core) and [others](https://github.com/2dust/v2rayN/wiki/List-of-supported-cores) +A GUI client for Windows and Linux, support [Xray core](https://github.com/XTLS/Xray-core) and [sing-box-core](https://github.com/SagerNet/sing-box/releases) and [others](https://github.com/2dust/v2rayN/wiki/List-of-supported-cores) [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/2dust/v2rayN)](https://github.com/2dust/v2rayN/commits/master) From fd8f863c5bf7aab1f915c98416d33dae3f26ca42 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 3 Dec 2024 18:00:55 +0800 Subject: [PATCH 4/4] Add stream-one for xhttp mode --- v2rayN/ServiceLib/Global.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 70e85556..4edaa855 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -188,7 +188,7 @@ public static readonly List DomainMatchers = new() { "linear", "mph", "" }; public static readonly List Fingerprints = new() { "chrome", "firefox", "safari", "ios", "android", "edge", "360", "qq", "random", "randomized", "" }; public static readonly List UserAgent = new() { "chrome", "firefox", "safari", "edge", "none" }; - public static readonly List XhttpMode = new() { "auto", "packet-up", "stream-up" }; + public static readonly List XhttpMode = new() { "auto", "packet-up", "stream-up", "stream-one" }; public static readonly List AllowInsecure = new() { "true", "false", "" }; public static readonly List DomainStrategy4Freedoms = new() { "AsIs", "UseIP", "UseIPv4", "UseIPv6", "" };