From 7e1b4b7e8f7e5a8a9c02f2c314589f86446d2217 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Sun, 25 Aug 2024 18:08:03 +0800 Subject: [PATCH] Correct the capitalization of protocol names --- v2rayN/ServiceLib/Common/HttpClientHelper.cs | 2 +- v2rayN/ServiceLib/Enums/EConfigType.cs | 8 ++-- v2rayN/ServiceLib/Global.cs | 14 +++---- v2rayN/ServiceLib/Handler/ConfigHandler.cs | 24 +++++------ .../Handler/CoreConfig/CoreConfigSingbox.cs | 10 ++--- .../Handler/CoreConfig/CoreConfigV2ray.cs | 14 +++---- v2rayN/ServiceLib/Handler/CoreHandler.cs | 6 +-- v2rayN/ServiceLib/Handler/DownloadHandler.cs | 2 +- v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs | 12 +++--- v2rayN/ServiceLib/Handler/Fmt/SocksFmt.cs | 8 ++-- v2rayN/ServiceLib/Handler/Fmt/TuicFmt.cs | 4 +- v2rayN/ServiceLib/Handler/Fmt/WireguardFmt.cs | 4 +- v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 10 ++--- v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx | 19 +++++---- v2rayN/ServiceLib/Resx/ResUI.resx | 25 ++++++----- v2rayN/ServiceLib/Resx/ResUI.ru.resx | 21 ++++++---- v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 25 ++++++----- v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 23 +++++++---- .../ViewModels/AddServerViewModel.cs | 4 +- .../ViewModels/MainWindowViewModel.cs | 8 ++-- v2rayN/v2rayN/Views/AddServerWindow.xaml.cs | 16 ++++---- v2rayN/v2rayN/Views/DNSSettingWindow.xaml | 4 +- v2rayN/v2rayN/Views/MainWindow.xaml | 41 ++++++++++++------- v2rayN/v2rayN/Views/OptionSettingWindow.xaml | 5 ++- 24 files changed, 174 insertions(+), 135 deletions(-) diff --git a/v2rayN/ServiceLib/Common/HttpClientHelper.cs b/v2rayN/ServiceLib/Common/HttpClientHelper.cs index dd730dbf..ae5314e0 100644 --- a/v2rayN/ServiceLib/Common/HttpClientHelper.cs +++ b/v2rayN/ServiceLib/Common/HttpClientHelper.cs @@ -1,4 +1,4 @@ -using System.Net.Http.Headers; +using System.Net.HTTP.Headers; using System.Net.Mime; using System.Text; diff --git a/v2rayN/ServiceLib/Enums/EConfigType.cs b/v2rayN/ServiceLib/Enums/EConfigType.cs index b7005e4a..5c73e728 100644 --- a/v2rayN/ServiceLib/Enums/EConfigType.cs +++ b/v2rayN/ServiceLib/Enums/EConfigType.cs @@ -5,12 +5,12 @@ VMess = 1, Custom = 2, Shadowsocks = 3, - Socks = 4, + SOCKS = 4, VLESS = 5, Trojan = 6, Hysteria2 = 7, - Tuic = 8, - Wireguard = 9, - Http = 10 + TUIC = 8, + WireGuard = 9, + HTTP = 10 } } \ No newline at end of file diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 53b97a50..073da32a 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -135,25 +135,25 @@ { {EConfigType.VMess,"vmess://"}, {EConfigType.Shadowsocks,"ss://"}, - {EConfigType.Socks,"socks://"}, + {EConfigType.SOCKS,"socks://"}, {EConfigType.VLESS,"vless://"}, {EConfigType.Trojan,"trojan://"}, {EConfigType.Hysteria2,"hysteria2://"}, - {EConfigType.Tuic,"tuic://"}, - {EConfigType.Wireguard,"wireguard://"} + {EConfigType.TUIC,"tuic://"}, + {EConfigType.WireGuard,"wireguard://"} }; public static readonly Dictionary ProtocolTypes = new() { {EConfigType.VMess,"vmess"}, {EConfigType.Shadowsocks,"shadowsocks"}, - {EConfigType.Socks,"socks"}, - {EConfigType.Http,"http"}, + {EConfigType.SOCKS,"socks"}, + {EConfigType.HTTP,"http"}, {EConfigType.VLESS,"vless"}, {EConfigType.Trojan,"trojan"}, {EConfigType.Hysteria2,"hysteria2"}, - {EConfigType.Tuic,"tuic"}, - {EConfigType.Wireguard,"wireguard"} + {EConfigType.TUIC,"tuic"}, + {EConfigType.WireGuard,"wireguard"} }; public static readonly List VmessSecurities = new() { "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero" }; diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index 5b289ee4..3027a0fb 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -389,13 +389,13 @@ namespace ServiceLib.Handler { EConfigType.VMess => AddVMessServer(config, item), EConfigType.Shadowsocks => AddShadowsocksServer(config, item), - EConfigType.Socks => AddSocksServer(config, item), - EConfigType.Http => AddHttpServer(config, item), + EConfigType.SOCKS => AddSocksServer(config, item), + EConfigType.HTTP => AddHttpServer(config, item), EConfigType.Trojan => AddTrojanServer(config, item), EConfigType.VLESS => AddVlessServer(config, item), EConfigType.Hysteria2 => AddHysteria2Server(config, item), - EConfigType.Tuic => AddTuicServer(config, item), - EConfigType.Wireguard => AddWireguardServer(config, item), + EConfigType.TUIC => AddTuicServer(config, item), + EConfigType.WireGuard => AddWireguardServer(config, item), _ => -1, }; return ret; @@ -727,7 +727,7 @@ namespace ServiceLib.Handler /// public static int AddSocksServer(Config config, ProfileItem profileItem, bool toFile = true) { - profileItem.configType = EConfigType.Socks; + profileItem.configType = EConfigType.SOCKS; profileItem.address = profileItem.address.TrimEx(); @@ -744,7 +744,7 @@ namespace ServiceLib.Handler /// public static int AddHttpServer(Config config, ProfileItem profileItem, bool toFile = true) { - profileItem.configType = EConfigType.Http; + profileItem.configType = EConfigType.HTTP; profileItem.address = profileItem.address.TrimEx(); @@ -817,7 +817,7 @@ namespace ServiceLib.Handler /// public static int AddTuicServer(Config config, ProfileItem profileItem, bool toFile = true) { - profileItem.configType = EConfigType.Tuic; + profileItem.configType = EConfigType.TUIC; profileItem.coreType = ECoreType.sing_box; profileItem.address = profileItem.address.TrimEx(); @@ -856,7 +856,7 @@ namespace ServiceLib.Handler /// public static int AddWireguardServer(Config config, ProfileItem profileItem, bool toFile = true) { - profileItem.configType = EConfigType.Wireguard; + profileItem.configType = EConfigType.WireGuard; profileItem.coreType = ECoreType.sing_box; profileItem.address = profileItem.address.TrimEx(); @@ -1251,12 +1251,12 @@ namespace ServiceLib.Handler { EConfigType.VMess => AddVMessServer(config, profileItem, false), EConfigType.Shadowsocks => AddShadowsocksServer(config, profileItem, false), - EConfigType.Socks => AddSocksServer(config, profileItem, false), + EConfigType.SOCKS => AddSocksServer(config, profileItem, false), EConfigType.Trojan => AddTrojanServer(config, profileItem, false), EConfigType.VLESS => AddVlessServer(config, profileItem, false), EConfigType.Hysteria2 => AddHysteria2Server(config, profileItem, false), - EConfigType.Tuic => AddTuicServer(config, profileItem, false), - EConfigType.Wireguard => AddWireguardServer(config, profileItem, false), + EConfigType.TUIC => AddTuicServer(config, profileItem, false), + EConfigType.WireGuard => AddWireguardServer(config, profileItem, false), _ => -1, }; @@ -1818,7 +1818,7 @@ namespace ServiceLib.Handler { var item = new DNSItem() { - remarks = "V2ray", + remarks = "V2Ray", coreType = ECoreType.Xray, }; SaveDNSItems(config, item); diff --git a/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigSingbox.cs b/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigSingbox.cs index ba6fc69d..bb62f090 100644 --- a/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigSingbox.cs +++ b/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigSingbox.cs @@ -601,7 +601,7 @@ namespace ServiceLib.Handler.CoreConfig GenOutboundMux(node, outbound); break; } - case EConfigType.Socks: + case EConfigType.SOCKS: { outbound.version = "5"; if (!Utils.IsNullOrEmpty(node.security) @@ -612,7 +612,7 @@ namespace ServiceLib.Handler.CoreConfig } break; } - case EConfigType.Http: + case EConfigType.HTTP: { if (!Utils.IsNullOrEmpty(node.security) && !Utils.IsNullOrEmpty(node.id)) @@ -662,14 +662,14 @@ namespace ServiceLib.Handler.CoreConfig outbound.down_mbps = _config.hysteriaItem.down_mbps > 0 ? _config.hysteriaItem.down_mbps : null; break; } - case EConfigType.Tuic: + case EConfigType.TUIC: { outbound.uuid = node.id; outbound.password = node.security; outbound.congestion_control = node.headerType; break; } - case EConfigType.Wireguard: + case EConfigType.WireGuard: { outbound.private_key = node.id; outbound.peer_public_key = node.publicKey; @@ -1234,7 +1234,7 @@ namespace ServiceLib.Handler.CoreConfig } //Tun2SocksAddress - if (_config.tunModeItem.enableTun && node?.configType == EConfigType.Socks && Utils.IsDomain(node?.sni)) + if (_config.tunModeItem.enableTun && node?.configType == EConfigType.SOCKS && Utils.IsDomain(node?.sni)) { dns4Sbox.rules.Insert(0, new() { diff --git a/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigV2ray.cs b/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigV2ray.cs index 9e092ae3..e661ca62 100644 --- a/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigV2ray.cs +++ b/v2rayN/ServiceLib/Handler/CoreConfig/CoreConfigV2ray.cs @@ -110,7 +110,7 @@ namespace ServiceLib.Handler.CoreConfig { continue; } - if (it.configType is EConfigType.Hysteria2 or EConfigType.Tuic or EConfigType.Wireguard) + if (it.configType is EConfigType.Hysteria2 or EConfigType.TUIC or EConfigType.WireGuard) { continue; } @@ -642,8 +642,8 @@ namespace ServiceLib.Handler.CoreConfig outbound.settings.vnext = null; break; } - case EConfigType.Socks: - case EConfigType.Http: + case EConfigType.SOCKS: + case EConfigType.HTTP: { ServersItem4Ray serversItem; if (outbound.settings.servers.Count <= 0) @@ -1201,8 +1201,8 @@ namespace ServiceLib.Handler.CoreConfig if (prevNode is not null && prevNode.configType != EConfigType.Custom && prevNode.configType != EConfigType.Hysteria2 - && prevNode.configType != EConfigType.Tuic - && prevNode.configType != EConfigType.Wireguard) + && prevNode.configType != EConfigType.TUIC + && prevNode.configType != EConfigType.WireGuard) { var prevOutbound = JsonUtils.Deserialize(txtOutbound); GenOutbound(prevNode, prevOutbound); @@ -1220,8 +1220,8 @@ namespace ServiceLib.Handler.CoreConfig if (nextNode is not null && nextNode.configType != EConfigType.Custom && nextNode.configType != EConfigType.Hysteria2 - && nextNode.configType != EConfigType.Tuic - && nextNode.configType != EConfigType.Wireguard) + && nextNode.configType != EConfigType.TUIC + && nextNode.configType != EConfigType.WireGuard) { var nextOutbound = JsonUtils.Deserialize(txtOutbound); GenOutbound(nextNode, nextOutbound); diff --git a/v2rayN/ServiceLib/Handler/CoreHandler.cs b/v2rayN/ServiceLib/Handler/CoreHandler.cs index 6eddc956..1ab47fcd 100644 --- a/v2rayN/ServiceLib/Handler/CoreHandler.cs +++ b/v2rayN/ServiceLib/Handler/CoreHandler.cs @@ -66,7 +66,7 @@ namespace ServiceLib.Handler public int LoadCoreConfigSpeedtest(List selecteds) { int pid = -1; - var coreType = selecteds.Exists(t => t.configType == EConfigType.Hysteria2 || t.configType == EConfigType.Tuic || t.configType == EConfigType.Wireguard) ? ECoreType.sing_box : ECoreType.Xray; + var coreType = selecteds.Exists(t => t.configType == EConfigType.Hysteria2 || t.configType == EConfigType.TUIC || t.configType == EConfigType.WireGuard) ? ECoreType.sing_box : ECoreType.Xray; string configPath = Utils.GetConfigPath(Global.CoreSpeedtestConfigFileName); if (CoreConfigHandler.GenerateClientSpeedtestConfig(_config, configPath, selecteds, coreType, out string msg) != 0) { @@ -204,7 +204,7 @@ namespace ServiceLib.Handler itemSocks = new ProfileItem() { coreType = preCoreType, - configType = EConfigType.Socks, + configType = EConfigType.SOCKS, address = Global.Loopback, sni = node.address, //Tun2SocksAddress port = LazyConfig.Instance.GetLocalPort(EInboundProtocol.socks) @@ -216,7 +216,7 @@ namespace ServiceLib.Handler itemSocks = new ProfileItem() { coreType = preCoreType, - configType = EConfigType.Socks, + configType = EConfigType.SOCKS, address = Global.Loopback, port = node.preSocksPort }; diff --git a/v2rayN/ServiceLib/Handler/DownloadHandler.cs b/v2rayN/ServiceLib/Handler/DownloadHandler.cs index 1674232b..55399e3f 100644 --- a/v2rayN/ServiceLib/Handler/DownloadHandler.cs +++ b/v2rayN/ServiceLib/Handler/DownloadHandler.cs @@ -1,6 +1,6 @@ using System.Diagnostics; using System.Net; -using System.Net.Http.Headers; +using System.Net.HTTP.Headers; using System.Net.Sockets; namespace ServiceLib.Handler diff --git a/v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs b/v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs index 03e9bf96..95742f77 100644 --- a/v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs +++ b/v2rayN/ServiceLib/Handler/Fmt/FmtHandler.cs @@ -10,12 +10,12 @@ { EConfigType.VMess => VmessFmt.ToUri(item), EConfigType.Shadowsocks => ShadowsocksFmt.ToUri(item), - EConfigType.Socks => SocksFmt.ToUri(item), + EConfigType.SOCKS => SocksFmt.ToUri(item), EConfigType.Trojan => TrojanFmt.ToUri(item), EConfigType.VLESS => VLESSFmt.ToUri(item), EConfigType.Hysteria2 => Hysteria2Fmt.ToUri(item), - EConfigType.Tuic => TuicFmt.ToUri(item), - EConfigType.Wireguard => WireguardFmt.ToUri(item), + EConfigType.TUIC => TuicFmt.ToUri(item), + EConfigType.WireGuard => WireguardFmt.ToUri(item), _ => null, }; @@ -49,7 +49,7 @@ { return ShadowsocksFmt.Resolve(str, out msg); } - else if (str.StartsWith(Global.ProtocolShares[EConfigType.Socks])) + else if (str.StartsWith(Global.ProtocolShares[EConfigType.SOCKS])) { return SocksFmt.Resolve(str, out msg); } @@ -65,11 +65,11 @@ { return Hysteria2Fmt.Resolve(str, out msg); } - else if (str.StartsWith(Global.ProtocolShares[EConfigType.Tuic])) + else if (str.StartsWith(Global.ProtocolShares[EConfigType.TUIC])) { return TuicFmt.Resolve(str, out msg); } - else if (str.StartsWith(Global.ProtocolShares[EConfigType.Wireguard])) + else if (str.StartsWith(Global.ProtocolShares[EConfigType.WireGuard])) { return WireguardFmt.Resolve(str, out msg); } diff --git a/v2rayN/ServiceLib/Handler/Fmt/SocksFmt.cs b/v2rayN/ServiceLib/Handler/Fmt/SocksFmt.cs index de5ef5c8..6cd71f46 100644 --- a/v2rayN/ServiceLib/Handler/Fmt/SocksFmt.cs +++ b/v2rayN/ServiceLib/Handler/Fmt/SocksFmt.cs @@ -17,7 +17,7 @@ return null; } - item.configType = EConfigType.Socks; + item.configType = EConfigType.SOCKS; return item; } @@ -41,7 +41,7 @@ //new var pw = Utils.Base64Encode($"{item.security}:{item.id}"); url = $"{pw}@{GetIpv6(item.address)}:{item.port}"; - url = $"{Global.ProtocolShares[EConfigType.Socks]}{url}{remark}"; + url = $"{Global.ProtocolShares[EConfigType.SOCKS]}{url}{remark}"; return url; } @@ -49,9 +49,9 @@ { ProfileItem item = new() { - configType = EConfigType.Socks + configType = EConfigType.SOCKS }; - result = result[Global.ProtocolShares[EConfigType.Socks].Length..]; + result = result[Global.ProtocolShares[EConfigType.SOCKS].Length..]; //remark int indexRemark = result.IndexOf("#"); if (indexRemark > 0) diff --git a/v2rayN/ServiceLib/Handler/Fmt/TuicFmt.cs b/v2rayN/ServiceLib/Handler/Fmt/TuicFmt.cs index 2f473681..0d12d2f9 100644 --- a/v2rayN/ServiceLib/Handler/Fmt/TuicFmt.cs +++ b/v2rayN/ServiceLib/Handler/Fmt/TuicFmt.cs @@ -8,7 +8,7 @@ ProfileItem item = new() { - configType = EConfigType.Tuic + configType = EConfigType.TUIC }; Uri url = new(str); @@ -57,7 +57,7 @@ $"{item.id}:{item.security}", GetIpv6(item.address), item.port); - url = $"{Global.ProtocolShares[EConfigType.Tuic]}{url}{query}{remark}"; + url = $"{Global.ProtocolShares[EConfigType.TUIC]}{url}{query}{remark}"; return url; } } diff --git a/v2rayN/ServiceLib/Handler/Fmt/WireguardFmt.cs b/v2rayN/ServiceLib/Handler/Fmt/WireguardFmt.cs index 571a38ab..95f368a0 100644 --- a/v2rayN/ServiceLib/Handler/Fmt/WireguardFmt.cs +++ b/v2rayN/ServiceLib/Handler/Fmt/WireguardFmt.cs @@ -8,7 +8,7 @@ ProfileItem item = new() { - configType = EConfigType.Wireguard + configType = EConfigType.WireGuard }; Uri url = new(str); @@ -62,7 +62,7 @@ Utils.UrlEncode(item.id), GetIpv6(item.address), item.port); - url = $"{Global.ProtocolShares[EConfigType.Wireguard]}{url}/{query}{remark}"; + url = $"{Global.ProtocolShares[EConfigType.WireGuard]}{url}/{query}{remark}"; return url; } } diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index e962417b..c8ba85eb 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -592,7 +592,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 Add [Http] server 的本地化字符串。 + /// 查找类似 Add [HTTP] server 的本地化字符串。 /// public static string menuAddHttpServer { get { @@ -637,7 +637,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 Add [Socks] server 的本地化字符串。 + /// 查找类似 Add [SOCKS] server 的本地化字符串。 /// public static string menuAddSocksServer { get { @@ -655,7 +655,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 Add [Tuic] server 的本地化字符串。 + /// 查找类似 Add [TUIC] server 的本地化字符串。 /// public static string menuAddTuicServer { get { @@ -682,7 +682,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 Add [Wireguard] server 的本地化字符串。 + /// 查找类似 Add [WireGuard] server 的本地化字符串。 /// public static string menuAddWireguardServer { get { @@ -2600,7 +2600,7 @@ namespace ServiceLib.Resx { } /// - /// 查找类似 V2ray DNS settings 的本地化字符串。 + /// 查找类似 V2Ray DNS settings 的本地化字符串。 /// public static string TbSettingsCoreDns { get { diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx index f578f855..3da7f34e 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx @@ -22,8 +22,10 @@ [base64 mime encoded serialized .NET Framework object] - - [base64 mime encoded string representing a byte array form of the .NET Framework object] + + [base64 mime encoded string representing a byte array form of the .NET Framework + object] This is a comment @@ -59,7 +61,8 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -112,10 +115,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 Batch export share URL to clipboard successfully @@ -692,7 +697,7 @@ هسته: تنظیمات اولیه - V2ray DNS settings + V2Ray DNS settings هسته: تنظیمات KCP @@ -719,7 +724,7 @@ Exception. Do not use proxy server for addresses beginning with,Use semicolon (;) - پورت Http + پورت HTTP هنگام به‌روزرسانی هسته، فایل‌های Geo را نادیده بگیرید diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index d7c8b6c2..142e145e 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -22,8 +22,10 @@ [base64 mime encoded serialized .NET Framework object] - - [base64 mime encoded string representing a byte array form of the .NET Framework object] + + [base64 mime encoded string representing a byte array form of the .NET Framework + object] This is a comment @@ -59,7 +61,8 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -112,10 +115,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 Export Share Link to Clipboard Successfully @@ -536,7 +541,7 @@ Add [Shadowsocks] server - Add [Socks] server + Add [SOCKS] server Add [Trojan] server @@ -695,7 +700,7 @@ Core: basic settings - V2ray DNS settings + V2Ray DNS settings Core: KCP settings @@ -1094,7 +1099,7 @@ Use System Hosts - Add [Tuic] server + Add [TUIC] server Congestion control @@ -1115,7 +1120,7 @@ Enable IPv6 Address - Add [Wireguard] server + Add [WireGuard] server PrivateKey @@ -1148,7 +1153,7 @@ *grpc Authority - Add [Http] server + Add [HTTP] server Use Xray and enable non-Tun mode, which conflicts with the group previous proxy diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx index 7c9abbf2..292a3b5d 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx @@ -22,8 +22,10 @@ [base64 mime encoded serialized .NET Framework object] - - [base64 mime encoded string representing a byte array form of the .NET Framework object] + + [base64 mime encoded string representing a byte array form of the .NET Framework + object] This is a comment @@ -59,7 +61,8 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -112,10 +115,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 Экспортирование URL в буфер обмена успешно завершено @@ -536,7 +541,7 @@ Добавить сервер [Shadowsocks] - Добавить сервер [Socks] + Добавить сервер [SOCKS] Добавить сервер [Trojan] @@ -698,7 +703,7 @@ Ядро: базовые настройки - Настройки DNS V2ray + Настройки DNS V2Ray Настройки DNS sing-box @@ -761,7 +766,7 @@ Включить сниффинг - Порт Socks + Порт SOCKS Автозапуск diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index 1334b3dd..0d92b64b 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -22,8 +22,10 @@ [base64 mime encoded serialized .NET Framework object] - - [base64 mime encoded string representing a byte array form of the .NET Framework object] + + [base64 mime encoded string representing a byte array form of the .NET Framework + object] This is a comment @@ -59,7 +61,8 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -112,10 +115,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 导出分享链接至剪贴板成功 @@ -536,7 +541,7 @@ 添加[Shadowsocks]服务器 - 添加[Socks]服务器 + 添加[SOCKS]服务器 添加[Trojan]服务器 @@ -695,7 +700,7 @@ Core: 基础设置 - V2ray DNS设置 + V2Ray DNS设置 Core: KCP设置 @@ -1091,7 +1096,7 @@ 使用系统hosts - 添加[Tuic]服务器 + 添加[TUIC]服务器 拥塞控制算法 @@ -1112,7 +1117,7 @@ 启用IPv6 - 添加[Wireguard]服务器 + 添加[WireGuard]服务器 PrivateKey @@ -1145,7 +1150,7 @@ *grpc Authority - 添加[Http]服务器 + 添加[HTTP]服务器 启用分片(Fragment) diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index ad392c08..ee39322c 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -22,8 +22,10 @@ [base64 mime encoded serialized .NET Framework object] - - [base64 mime encoded string representing a byte array form of the .NET Framework object] + + [base64 mime encoded string representing a byte array form of the .NET Framework + object] This is a comment @@ -59,7 +61,8 @@ : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> - + @@ -112,10 +115,12 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, + Culture=neutral, PublicKeyToken=b77a5c561934e089 匯出分享链接至剪貼簿成功 @@ -535,7 +540,7 @@ 新增[Shadowsocks]伺服器 - 新增[Socks]伺服器 + 新增[SOCKS]伺服器 新增[Trojan]伺服器 @@ -695,7 +700,7 @@ Core: 基礎設定 - V2ray DNS設定 + V2Ray DNS設定 Core: KCP設定 @@ -1082,7 +1087,7 @@ IP 或 IP CIDR - 新增[Tuic]伺服器 + 新增[TUIC]伺服器 前置代理別名 @@ -1118,7 +1123,7 @@ *grpc Authority - 新增[Http]伺服器 + 新增[HTTP]伺服器 啟用分片(Fragment) diff --git a/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs b/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs index f1dcee79..9b607ca2 100644 --- a/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs @@ -70,8 +70,8 @@ namespace ServiceLib.ViewModels return; } } - if (SelectedSource.configType != EConfigType.Socks - && SelectedSource.configType != EConfigType.Http) + if (SelectedSource.configType != EConfigType.SOCKS + && SelectedSource.configType != EConfigType.HTTP) { if (Utils.IsNullOrEmpty(SelectedSource.id)) { diff --git a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs index b80db103..76fe9e69 100644 --- a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs @@ -203,11 +203,11 @@ namespace ServiceLib.ViewModels }); AddSocksServerCmd = ReactiveCommand.Create(() => { - AddServerAsync(true, EConfigType.Socks); + AddServerAsync(true, EConfigType.SOCKS); }); AddHttpServerCmd = ReactiveCommand.Create(() => { - AddServerAsync(true, EConfigType.Http); + AddServerAsync(true, EConfigType.HTTP); }); AddTrojanServerCmd = ReactiveCommand.Create(() => { @@ -219,11 +219,11 @@ namespace ServiceLib.ViewModels }); AddTuicServerCmd = ReactiveCommand.Create(() => { - AddServerAsync(true, EConfigType.Tuic); + AddServerAsync(true, EConfigType.TUIC); }); AddWireguardServerCmd = ReactiveCommand.Create(() => { - AddServerAsync(true, EConfigType.Wireguard); + AddServerAsync(true, EConfigType.WireGuard); }); AddCustomServerCmd = ReactiveCommand.Create(() => { diff --git a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs index f9607334..a9610b08 100644 --- a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs @@ -77,8 +77,8 @@ namespace v2rayN.Views }); break; - case EConfigType.Socks: - case EConfigType.Http: + case EConfigType.SOCKS: + case EConfigType.HTTP: gridSocks.Visibility = Visibility.Visible; break; @@ -113,7 +113,7 @@ namespace v2rayN.Views cmbFingerprint.Text = string.Empty; break; - case EConfigType.Tuic: + case EConfigType.TUIC: gridTuic.Visibility = Visibility.Visible; sepa2.Visibility = Visibility.Collapsed; gridTransport.Visibility = Visibility.Collapsed; @@ -127,7 +127,7 @@ namespace v2rayN.Views }); break; - case EConfigType.Wireguard: + case EConfigType.WireGuard: gridWireguard.Visibility = Visibility.Visible; sepa2.Visibility = Visibility.Collapsed; @@ -160,8 +160,8 @@ namespace v2rayN.Views this.Bind(ViewModel, vm => vm.SelectedSource.security, v => v.cmbSecurity3.Text).DisposeWith(disposables); break; - case EConfigType.Socks: - case EConfigType.Http: + case EConfigType.SOCKS: + case EConfigType.HTTP: this.Bind(ViewModel, vm => vm.SelectedSource.id, v => v.txtId4.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.security, v => v.txtSecurity4.Text).DisposeWith(disposables); break; @@ -182,13 +182,13 @@ namespace v2rayN.Views this.Bind(ViewModel, vm => vm.SelectedSource.path, v => v.txtPath7.Text).DisposeWith(disposables); break; - case EConfigType.Tuic: + case EConfigType.TUIC: this.Bind(ViewModel, vm => vm.SelectedSource.id, v => v.txtId8.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.security, v => v.txtSecurity8.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.headerType, v => v.cmbHeaderType8.Text).DisposeWith(disposables); break; - case EConfigType.Wireguard: + case EConfigType.WireGuard: this.Bind(ViewModel, vm => vm.SelectedSource.id, v => v.txtId9.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.publicKey, v => v.txtPublicKey9.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.path, v => v.txtPath9.Text).DisposeWith(disposables); diff --git a/v2rayN/v2rayN/Views/DNSSettingWindow.xaml b/v2rayN/v2rayN/Views/DNSSettingWindow.xaml index 7776e418..a751ea3e 100644 --- a/v2rayN/v2rayN/Views/DNSSettingWindow.xaml +++ b/v2rayN/v2rayN/Views/DNSSettingWindow.xaml @@ -117,7 +117,7 @@ x:Name="txtnormalDNS" Margin="{StaticResource SettingItemMargin}" VerticalAlignment="Stretch" - materialDesign:HintAssist.Hint="Http/Socks" + materialDesign:HintAssist.Hint="HTTP/SOCKS" AcceptsReturn="True" BorderThickness="1" Style="{StaticResource MaterialDesignOutlinedTextBox}" @@ -186,7 +186,7 @@ x:Name="txtnormalDNS2" Grid.Column="0" VerticalAlignment="Stretch" - materialDesign:HintAssist.Hint="Http/Socks" + materialDesign:HintAssist.Hint="HTTP/SOCKS" AcceptsReturn="True" BorderThickness="1" Style="{StaticResource MaterialDesignOutlinedTextBox}" diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml index efadb9cb..d6dce9c0 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml +++ b/v2rayN/v2rayN/Views/MainWindow.xaml @@ -27,7 +27,8 @@ - + @@ -227,7 +228,7 @@ + Header="v2rayN" /> - + - + - + - + - - - + + + @@ -532,7 +540,8 @@ - + - + - + - + - + -