Correct the capitalization of protocol names

This commit is contained in:
Xi Xu 2024-08-25 18:08:03 +08:00
parent b57cdd31bd
commit 7e1b4b7e8f
24 changed files with 174 additions and 135 deletions

View file

@ -1,4 +1,4 @@
using System.Net.Http.Headers; using System.Net.HTTP.Headers;
using System.Net.Mime; using System.Net.Mime;
using System.Text; using System.Text;

View file

@ -5,12 +5,12 @@
VMess = 1, VMess = 1,
Custom = 2, Custom = 2,
Shadowsocks = 3, Shadowsocks = 3,
Socks = 4, SOCKS = 4,
VLESS = 5, VLESS = 5,
Trojan = 6, Trojan = 6,
Hysteria2 = 7, Hysteria2 = 7,
Tuic = 8, TUIC = 8,
Wireguard = 9, WireGuard = 9,
Http = 10 HTTP = 10
} }
} }

View file

@ -135,25 +135,25 @@
{ {
{EConfigType.VMess,"vmess://"}, {EConfigType.VMess,"vmess://"},
{EConfigType.Shadowsocks,"ss://"}, {EConfigType.Shadowsocks,"ss://"},
{EConfigType.Socks,"socks://"}, {EConfigType.SOCKS,"socks://"},
{EConfigType.VLESS,"vless://"}, {EConfigType.VLESS,"vless://"},
{EConfigType.Trojan,"trojan://"}, {EConfigType.Trojan,"trojan://"},
{EConfigType.Hysteria2,"hysteria2://"}, {EConfigType.Hysteria2,"hysteria2://"},
{EConfigType.Tuic,"tuic://"}, {EConfigType.TUIC,"tuic://"},
{EConfigType.Wireguard,"wireguard://"} {EConfigType.WireGuard,"wireguard://"}
}; };
public static readonly Dictionary<EConfigType, string> ProtocolTypes = new() public static readonly Dictionary<EConfigType, string> ProtocolTypes = new()
{ {
{EConfigType.VMess,"vmess"}, {EConfigType.VMess,"vmess"},
{EConfigType.Shadowsocks,"shadowsocks"}, {EConfigType.Shadowsocks,"shadowsocks"},
{EConfigType.Socks,"socks"}, {EConfigType.SOCKS,"socks"},
{EConfigType.Http,"http"}, {EConfigType.HTTP,"http"},
{EConfigType.VLESS,"vless"}, {EConfigType.VLESS,"vless"},
{EConfigType.Trojan,"trojan"}, {EConfigType.Trojan,"trojan"},
{EConfigType.Hysteria2,"hysteria2"}, {EConfigType.Hysteria2,"hysteria2"},
{EConfigType.Tuic,"tuic"}, {EConfigType.TUIC,"tuic"},
{EConfigType.Wireguard,"wireguard"} {EConfigType.WireGuard,"wireguard"}
}; };
public static readonly List<string> VmessSecurities = new() { "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero" }; public static readonly List<string> VmessSecurities = new() { "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero" };

View file

@ -389,13 +389,13 @@ namespace ServiceLib.Handler
{ {
EConfigType.VMess => AddVMessServer(config, item), EConfigType.VMess => AddVMessServer(config, item),
EConfigType.Shadowsocks => AddShadowsocksServer(config, item), EConfigType.Shadowsocks => AddShadowsocksServer(config, item),
EConfigType.Socks => AddSocksServer(config, item), EConfigType.SOCKS => AddSocksServer(config, item),
EConfigType.Http => AddHttpServer(config, item), EConfigType.HTTP => AddHttpServer(config, item),
EConfigType.Trojan => AddTrojanServer(config, item), EConfigType.Trojan => AddTrojanServer(config, item),
EConfigType.VLESS => AddVlessServer(config, item), EConfigType.VLESS => AddVlessServer(config, item),
EConfigType.Hysteria2 => AddHysteria2Server(config, item), EConfigType.Hysteria2 => AddHysteria2Server(config, item),
EConfigType.Tuic => AddTuicServer(config, item), EConfigType.TUIC => AddTuicServer(config, item),
EConfigType.Wireguard => AddWireguardServer(config, item), EConfigType.WireGuard => AddWireguardServer(config, item),
_ => -1, _ => -1,
}; };
return ret; return ret;
@ -727,7 +727,7 @@ namespace ServiceLib.Handler
/// <returns></returns> /// <returns></returns>
public static int AddSocksServer(Config config, ProfileItem profileItem, bool toFile = true) public static int AddSocksServer(Config config, ProfileItem profileItem, bool toFile = true)
{ {
profileItem.configType = EConfigType.Socks; profileItem.configType = EConfigType.SOCKS;
profileItem.address = profileItem.address.TrimEx(); profileItem.address = profileItem.address.TrimEx();
@ -744,7 +744,7 @@ namespace ServiceLib.Handler
/// <returns></returns> /// <returns></returns>
public static int AddHttpServer(Config config, ProfileItem profileItem, bool toFile = true) public static int AddHttpServer(Config config, ProfileItem profileItem, bool toFile = true)
{ {
profileItem.configType = EConfigType.Http; profileItem.configType = EConfigType.HTTP;
profileItem.address = profileItem.address.TrimEx(); profileItem.address = profileItem.address.TrimEx();
@ -817,7 +817,7 @@ namespace ServiceLib.Handler
/// <returns></returns> /// <returns></returns>
public static int AddTuicServer(Config config, ProfileItem profileItem, bool toFile = true) 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.coreType = ECoreType.sing_box;
profileItem.address = profileItem.address.TrimEx(); profileItem.address = profileItem.address.TrimEx();
@ -856,7 +856,7 @@ namespace ServiceLib.Handler
/// <returns></returns> /// <returns></returns>
public static int AddWireguardServer(Config config, ProfileItem profileItem, bool toFile = true) 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.coreType = ECoreType.sing_box;
profileItem.address = profileItem.address.TrimEx(); profileItem.address = profileItem.address.TrimEx();
@ -1251,12 +1251,12 @@ namespace ServiceLib.Handler
{ {
EConfigType.VMess => AddVMessServer(config, profileItem, false), EConfigType.VMess => AddVMessServer(config, profileItem, false),
EConfigType.Shadowsocks => AddShadowsocksServer(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.Trojan => AddTrojanServer(config, profileItem, false),
EConfigType.VLESS => AddVlessServer(config, profileItem, false), EConfigType.VLESS => AddVlessServer(config, profileItem, false),
EConfigType.Hysteria2 => AddHysteria2Server(config, profileItem, false), EConfigType.Hysteria2 => AddHysteria2Server(config, profileItem, false),
EConfigType.Tuic => AddTuicServer(config, profileItem, false), EConfigType.TUIC => AddTuicServer(config, profileItem, false),
EConfigType.Wireguard => AddWireguardServer(config, profileItem, false), EConfigType.WireGuard => AddWireguardServer(config, profileItem, false),
_ => -1, _ => -1,
}; };
@ -1818,7 +1818,7 @@ namespace ServiceLib.Handler
{ {
var item = new DNSItem() var item = new DNSItem()
{ {
remarks = "V2ray", remarks = "V2Ray",
coreType = ECoreType.Xray, coreType = ECoreType.Xray,
}; };
SaveDNSItems(config, item); SaveDNSItems(config, item);

View file

@ -601,7 +601,7 @@ namespace ServiceLib.Handler.CoreConfig
GenOutboundMux(node, outbound); GenOutboundMux(node, outbound);
break; break;
} }
case EConfigType.Socks: case EConfigType.SOCKS:
{ {
outbound.version = "5"; outbound.version = "5";
if (!Utils.IsNullOrEmpty(node.security) if (!Utils.IsNullOrEmpty(node.security)
@ -612,7 +612,7 @@ namespace ServiceLib.Handler.CoreConfig
} }
break; break;
} }
case EConfigType.Http: case EConfigType.HTTP:
{ {
if (!Utils.IsNullOrEmpty(node.security) if (!Utils.IsNullOrEmpty(node.security)
&& !Utils.IsNullOrEmpty(node.id)) && !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; outbound.down_mbps = _config.hysteriaItem.down_mbps > 0 ? _config.hysteriaItem.down_mbps : null;
break; break;
} }
case EConfigType.Tuic: case EConfigType.TUIC:
{ {
outbound.uuid = node.id; outbound.uuid = node.id;
outbound.password = node.security; outbound.password = node.security;
outbound.congestion_control = node.headerType; outbound.congestion_control = node.headerType;
break; break;
} }
case EConfigType.Wireguard: case EConfigType.WireGuard:
{ {
outbound.private_key = node.id; outbound.private_key = node.id;
outbound.peer_public_key = node.publicKey; outbound.peer_public_key = node.publicKey;
@ -1234,7 +1234,7 @@ namespace ServiceLib.Handler.CoreConfig
} }
//Tun2SocksAddress //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() dns4Sbox.rules.Insert(0, new()
{ {

View file

@ -110,7 +110,7 @@ namespace ServiceLib.Handler.CoreConfig
{ {
continue; 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; continue;
} }
@ -642,8 +642,8 @@ namespace ServiceLib.Handler.CoreConfig
outbound.settings.vnext = null; outbound.settings.vnext = null;
break; break;
} }
case EConfigType.Socks: case EConfigType.SOCKS:
case EConfigType.Http: case EConfigType.HTTP:
{ {
ServersItem4Ray serversItem; ServersItem4Ray serversItem;
if (outbound.settings.servers.Count <= 0) if (outbound.settings.servers.Count <= 0)
@ -1201,8 +1201,8 @@ namespace ServiceLib.Handler.CoreConfig
if (prevNode is not null if (prevNode is not null
&& prevNode.configType != EConfigType.Custom && prevNode.configType != EConfigType.Custom
&& prevNode.configType != EConfigType.Hysteria2 && prevNode.configType != EConfigType.Hysteria2
&& prevNode.configType != EConfigType.Tuic && prevNode.configType != EConfigType.TUIC
&& prevNode.configType != EConfigType.Wireguard) && prevNode.configType != EConfigType.WireGuard)
{ {
var prevOutbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound); var prevOutbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound);
GenOutbound(prevNode, prevOutbound); GenOutbound(prevNode, prevOutbound);
@ -1220,8 +1220,8 @@ namespace ServiceLib.Handler.CoreConfig
if (nextNode is not null if (nextNode is not null
&& nextNode.configType != EConfigType.Custom && nextNode.configType != EConfigType.Custom
&& nextNode.configType != EConfigType.Hysteria2 && nextNode.configType != EConfigType.Hysteria2
&& nextNode.configType != EConfigType.Tuic && nextNode.configType != EConfigType.TUIC
&& nextNode.configType != EConfigType.Wireguard) && nextNode.configType != EConfigType.WireGuard)
{ {
var nextOutbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound); var nextOutbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound);
GenOutbound(nextNode, nextOutbound); GenOutbound(nextNode, nextOutbound);

View file

@ -66,7 +66,7 @@ namespace ServiceLib.Handler
public int LoadCoreConfigSpeedtest(List<ServerTestItem> selecteds) public int LoadCoreConfigSpeedtest(List<ServerTestItem> selecteds)
{ {
int pid = -1; 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); string configPath = Utils.GetConfigPath(Global.CoreSpeedtestConfigFileName);
if (CoreConfigHandler.GenerateClientSpeedtestConfig(_config, configPath, selecteds, coreType, out string msg) != 0) if (CoreConfigHandler.GenerateClientSpeedtestConfig(_config, configPath, selecteds, coreType, out string msg) != 0)
{ {
@ -204,7 +204,7 @@ namespace ServiceLib.Handler
itemSocks = new ProfileItem() itemSocks = new ProfileItem()
{ {
coreType = preCoreType, coreType = preCoreType,
configType = EConfigType.Socks, configType = EConfigType.SOCKS,
address = Global.Loopback, address = Global.Loopback,
sni = node.address, //Tun2SocksAddress sni = node.address, //Tun2SocksAddress
port = LazyConfig.Instance.GetLocalPort(EInboundProtocol.socks) port = LazyConfig.Instance.GetLocalPort(EInboundProtocol.socks)
@ -216,7 +216,7 @@ namespace ServiceLib.Handler
itemSocks = new ProfileItem() itemSocks = new ProfileItem()
{ {
coreType = preCoreType, coreType = preCoreType,
configType = EConfigType.Socks, configType = EConfigType.SOCKS,
address = Global.Loopback, address = Global.Loopback,
port = node.preSocksPort port = node.preSocksPort
}; };

View file

@ -1,6 +1,6 @@
using System.Diagnostics; using System.Diagnostics;
using System.Net; using System.Net;
using System.Net.Http.Headers; using System.Net.HTTP.Headers;
using System.Net.Sockets; using System.Net.Sockets;
namespace ServiceLib.Handler namespace ServiceLib.Handler

View file

@ -10,12 +10,12 @@
{ {
EConfigType.VMess => VmessFmt.ToUri(item), EConfigType.VMess => VmessFmt.ToUri(item),
EConfigType.Shadowsocks => ShadowsocksFmt.ToUri(item), EConfigType.Shadowsocks => ShadowsocksFmt.ToUri(item),
EConfigType.Socks => SocksFmt.ToUri(item), EConfigType.SOCKS => SocksFmt.ToUri(item),
EConfigType.Trojan => TrojanFmt.ToUri(item), EConfigType.Trojan => TrojanFmt.ToUri(item),
EConfigType.VLESS => VLESSFmt.ToUri(item), EConfigType.VLESS => VLESSFmt.ToUri(item),
EConfigType.Hysteria2 => Hysteria2Fmt.ToUri(item), EConfigType.Hysteria2 => Hysteria2Fmt.ToUri(item),
EConfigType.Tuic => TuicFmt.ToUri(item), EConfigType.TUIC => TuicFmt.ToUri(item),
EConfigType.Wireguard => WireguardFmt.ToUri(item), EConfigType.WireGuard => WireguardFmt.ToUri(item),
_ => null, _ => null,
}; };
@ -49,7 +49,7 @@
{ {
return ShadowsocksFmt.Resolve(str, out msg); 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); return SocksFmt.Resolve(str, out msg);
} }
@ -65,11 +65,11 @@
{ {
return Hysteria2Fmt.Resolve(str, out msg); 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); 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); return WireguardFmt.Resolve(str, out msg);
} }

View file

@ -17,7 +17,7 @@
return null; return null;
} }
item.configType = EConfigType.Socks; item.configType = EConfigType.SOCKS;
return item; return item;
} }
@ -41,7 +41,7 @@
//new //new
var pw = Utils.Base64Encode($"{item.security}:{item.id}"); var pw = Utils.Base64Encode($"{item.security}:{item.id}");
url = $"{pw}@{GetIpv6(item.address)}:{item.port}"; url = $"{pw}@{GetIpv6(item.address)}:{item.port}";
url = $"{Global.ProtocolShares[EConfigType.Socks]}{url}{remark}"; url = $"{Global.ProtocolShares[EConfigType.SOCKS]}{url}{remark}";
return url; return url;
} }
@ -49,9 +49,9 @@
{ {
ProfileItem item = new() ProfileItem item = new()
{ {
configType = EConfigType.Socks configType = EConfigType.SOCKS
}; };
result = result[Global.ProtocolShares[EConfigType.Socks].Length..]; result = result[Global.ProtocolShares[EConfigType.SOCKS].Length..];
//remark //remark
int indexRemark = result.IndexOf("#"); int indexRemark = result.IndexOf("#");
if (indexRemark > 0) if (indexRemark > 0)

View file

@ -8,7 +8,7 @@
ProfileItem item = new() ProfileItem item = new()
{ {
configType = EConfigType.Tuic configType = EConfigType.TUIC
}; };
Uri url = new(str); Uri url = new(str);
@ -57,7 +57,7 @@
$"{item.id}:{item.security}", $"{item.id}:{item.security}",
GetIpv6(item.address), GetIpv6(item.address),
item.port); item.port);
url = $"{Global.ProtocolShares[EConfigType.Tuic]}{url}{query}{remark}"; url = $"{Global.ProtocolShares[EConfigType.TUIC]}{url}{query}{remark}";
return url; return url;
} }
} }

View file

@ -8,7 +8,7 @@
ProfileItem item = new() ProfileItem item = new()
{ {
configType = EConfigType.Wireguard configType = EConfigType.WireGuard
}; };
Uri url = new(str); Uri url = new(str);
@ -62,7 +62,7 @@
Utils.UrlEncode(item.id), Utils.UrlEncode(item.id),
GetIpv6(item.address), GetIpv6(item.address),
item.port); item.port);
url = $"{Global.ProtocolShares[EConfigType.Wireguard]}{url}/{query}{remark}"; url = $"{Global.ProtocolShares[EConfigType.WireGuard]}{url}/{query}{remark}";
return url; return url;
} }
} }

View file

@ -592,7 +592,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Add [Http] server 的本地化字符串。 /// 查找类似 Add [HTTP] server 的本地化字符串。
/// </summary> /// </summary>
public static string menuAddHttpServer { public static string menuAddHttpServer {
get { get {
@ -637,7 +637,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Add [Socks] server 的本地化字符串。 /// 查找类似 Add [SOCKS] server 的本地化字符串。
/// </summary> /// </summary>
public static string menuAddSocksServer { public static string menuAddSocksServer {
get { get {
@ -655,7 +655,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Add [Tuic] server 的本地化字符串。 /// 查找类似 Add [TUIC] server 的本地化字符串。
/// </summary> /// </summary>
public static string menuAddTuicServer { public static string menuAddTuicServer {
get { get {
@ -682,7 +682,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Add [Wireguard] server 的本地化字符串。 /// 查找类似 Add [WireGuard] server 的本地化字符串。
/// </summary> /// </summary>
public static string menuAddWireguardServer { public static string menuAddWireguardServer {
get { get {
@ -2600,7 +2600,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 V2ray DNS settings 的本地化字符串。 /// 查找类似 V2Ray DNS settings 的本地化字符串。
/// </summary> /// </summary>
public static string TbSettingsCoreDns { public static string TbSettingsCoreDns {
get { get {

View file

@ -22,8 +22,10 @@
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
@ -59,7 +61,8 @@
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
@ -112,10 +115,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="BatchExportURLSuccessfully" xml:space="preserve"> <data name="BatchExportURLSuccessfully" xml:space="preserve">
<value>Batch export share URL to clipboard successfully</value> <value>Batch export share URL to clipboard successfully</value>
@ -692,7 +697,7 @@
<value>هسته: تنظیمات اولیه</value> <value>هسته: تنظیمات اولیه</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbSettingsCoreDns" xml:space="preserve">
<value>V2ray DNS settings</value> <value>V2Ray DNS settings</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>هسته: تنظیمات KCP</value> <value>هسته: تنظیمات KCP</value>
@ -719,7 +724,7 @@
<value>Exception. Do not use proxy server for addresses beginning with,Use semicolon (;)</value> <value>Exception. Do not use proxy server for addresses beginning with,Use semicolon (;)</value>
</data> </data>
<data name="TbSettingsHttpPort" xml:space="preserve"> <data name="TbSettingsHttpPort" xml:space="preserve">
<value>پورت Http</value> <value>پورت HTTP</value>
</data> </data>
<data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve"> <data name="TbSettingsIgnoreGeoUpdateCore" xml:space="preserve">
<value>هنگام به‌روزرسانی هسته، فایل‌های Geo را نادیده بگیرید</value> <value>هنگام به‌روزرسانی هسته، فایل‌های Geo را نادیده بگیرید</value>

View file

@ -22,8 +22,10 @@
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
@ -59,7 +61,8 @@
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
@ -112,10 +115,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="BatchExportURLSuccessfully" xml:space="preserve"> <data name="BatchExportURLSuccessfully" xml:space="preserve">
<value>Export Share Link to Clipboard Successfully</value> <value>Export Share Link to Clipboard Successfully</value>
@ -536,7 +541,7 @@
<value>Add [Shadowsocks] server</value> <value>Add [Shadowsocks] server</value>
</data> </data>
<data name="menuAddSocksServer" xml:space="preserve"> <data name="menuAddSocksServer" xml:space="preserve">
<value>Add [Socks] server</value> <value>Add [SOCKS] server</value>
</data> </data>
<data name="menuAddTrojanServer" xml:space="preserve"> <data name="menuAddTrojanServer" xml:space="preserve">
<value>Add [Trojan] server</value> <value>Add [Trojan] server</value>
@ -695,7 +700,7 @@
<value>Core: basic settings</value> <value>Core: basic settings</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbSettingsCoreDns" xml:space="preserve">
<value>V2ray DNS settings</value> <value>V2Ray DNS settings</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Core: KCP settings</value> <value>Core: KCP settings</value>
@ -1094,7 +1099,7 @@
<value>Use System Hosts</value> <value>Use System Hosts</value>
</data> </data>
<data name="menuAddTuicServer" xml:space="preserve"> <data name="menuAddTuicServer" xml:space="preserve">
<value>Add [Tuic] server</value> <value>Add [TUIC] server</value>
</data> </data>
<data name="TbHeaderType8" xml:space="preserve"> <data name="TbHeaderType8" xml:space="preserve">
<value>Congestion control</value> <value>Congestion control</value>
@ -1115,7 +1120,7 @@
<value>Enable IPv6 Address</value> <value>Enable IPv6 Address</value>
</data> </data>
<data name="menuAddWireguardServer" xml:space="preserve"> <data name="menuAddWireguardServer" xml:space="preserve">
<value>Add [Wireguard] server</value> <value>Add [WireGuard] server</value>
</data> </data>
<data name="TbPrivateKey" xml:space="preserve"> <data name="TbPrivateKey" xml:space="preserve">
<value>PrivateKey</value> <value>PrivateKey</value>
@ -1148,7 +1153,7 @@
<value>*grpc Authority</value> <value>*grpc Authority</value>
</data> </data>
<data name="menuAddHttpServer" xml:space="preserve"> <data name="menuAddHttpServer" xml:space="preserve">
<value>Add [Http] server</value> <value>Add [HTTP] server</value>
</data> </data>
<data name="TbSettingsEnableFragmentTips" xml:space="preserve"> <data name="TbSettingsEnableFragmentTips" xml:space="preserve">
<value>Use Xray and enable non-Tun mode, which conflicts with the group previous proxy</value> <value>Use Xray and enable non-Tun mode, which conflicts with the group previous proxy</value>

View file

@ -22,8 +22,10 @@
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
@ -59,7 +61,8 @@
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
@ -112,10 +115,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="BatchExportURLSuccessfully" xml:space="preserve"> <data name="BatchExportURLSuccessfully" xml:space="preserve">
<value>Экспортирование URL в буфер обмена успешно завершено</value> <value>Экспортирование URL в буфер обмена успешно завершено</value>
@ -536,7 +541,7 @@
<value>Добавить сервер [Shadowsocks]</value> <value>Добавить сервер [Shadowsocks]</value>
</data> </data>
<data name="menuAddSocksServer" xml:space="preserve"> <data name="menuAddSocksServer" xml:space="preserve">
<value>Добавить сервер [Socks]</value> <value>Добавить сервер [SOCKS]</value>
</data> </data>
<data name="menuAddTrojanServer" xml:space="preserve"> <data name="menuAddTrojanServer" xml:space="preserve">
<value>Добавить сервер [Trojan]</value> <value>Добавить сервер [Trojan]</value>
@ -698,7 +703,7 @@
<value>Ядро: базовые настройки</value> <value>Ядро: базовые настройки</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbSettingsCoreDns" xml:space="preserve">
<value>Настройки DNS V2ray</value> <value>Настройки DNS V2Ray</value>
</data> </data>
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve"> <data name="TbSettingsCoreDnsSingbox" xml:space="preserve">
<value>Настройки DNS sing-box</value> <value>Настройки DNS sing-box</value>
@ -761,7 +766,7 @@
<value>Включить сниффинг</value> <value>Включить сниффинг</value>
</data> </data>
<data name="TbSettingsSocksPort" xml:space="preserve"> <data name="TbSettingsSocksPort" xml:space="preserve">
<value>Порт Socks</value> <value>Порт SOCKS</value>
</data> </data>
<data name="TbSettingsStartBoot" xml:space="preserve"> <data name="TbSettingsStartBoot" xml:space="preserve">
<value>Автозапуск</value> <value>Автозапуск</value>

View file

@ -22,8 +22,10 @@
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
@ -59,7 +61,8 @@
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
@ -112,10 +115,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="BatchExportURLSuccessfully" xml:space="preserve"> <data name="BatchExportURLSuccessfully" xml:space="preserve">
<value>导出分享链接至剪贴板成功</value> <value>导出分享链接至剪贴板成功</value>
@ -536,7 +541,7 @@
<value>添加[Shadowsocks]服务器</value> <value>添加[Shadowsocks]服务器</value>
</data> </data>
<data name="menuAddSocksServer" xml:space="preserve"> <data name="menuAddSocksServer" xml:space="preserve">
<value>添加[Socks]服务器</value> <value>添加[SOCKS]服务器</value>
</data> </data>
<data name="menuAddTrojanServer" xml:space="preserve"> <data name="menuAddTrojanServer" xml:space="preserve">
<value>添加[Trojan]服务器</value> <value>添加[Trojan]服务器</value>
@ -695,7 +700,7 @@
<value>Core: 基础设置</value> <value>Core: 基础设置</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbSettingsCoreDns" xml:space="preserve">
<value>V2ray DNS设置</value> <value>V2Ray DNS设置</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Core: KCP设置</value> <value>Core: KCP设置</value>
@ -1091,7 +1096,7 @@
<value>使用系统hosts</value> <value>使用系统hosts</value>
</data> </data>
<data name="menuAddTuicServer" xml:space="preserve"> <data name="menuAddTuicServer" xml:space="preserve">
<value>添加[Tuic]服务器</value> <value>添加[TUIC]服务器</value>
</data> </data>
<data name="TbHeaderType8" xml:space="preserve"> <data name="TbHeaderType8" xml:space="preserve">
<value>拥塞控制算法</value> <value>拥塞控制算法</value>
@ -1112,7 +1117,7 @@
<value>启用IPv6</value> <value>启用IPv6</value>
</data> </data>
<data name="menuAddWireguardServer" xml:space="preserve"> <data name="menuAddWireguardServer" xml:space="preserve">
<value>添加[Wireguard]服务器</value> <value>添加[WireGuard]服务器</value>
</data> </data>
<data name="TbPrivateKey" xml:space="preserve"> <data name="TbPrivateKey" xml:space="preserve">
<value>PrivateKey</value> <value>PrivateKey</value>
@ -1145,7 +1150,7 @@
<value>*grpc Authority</value> <value>*grpc Authority</value>
</data> </data>
<data name="menuAddHttpServer" xml:space="preserve"> <data name="menuAddHttpServer" xml:space="preserve">
<value>添加[Http]服务器</value> <value>添加[HTTP]服务器</value>
</data> </data>
<data name="TbSettingsEnableFragment" xml:space="preserve"> <data name="TbSettingsEnableFragment" xml:space="preserve">
<value>启用分片Fragment</value> <value>启用分片Fragment</value>

View file

@ -22,8 +22,10 @@
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework
object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
@ -59,7 +61,8 @@
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
@ -112,10 +115,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="BatchExportURLSuccessfully" xml:space="preserve"> <data name="BatchExportURLSuccessfully" xml:space="preserve">
<value>匯出分享链接至剪貼簿成功</value> <value>匯出分享链接至剪貼簿成功</value>
@ -535,7 +540,7 @@
<value>新增[Shadowsocks]伺服器</value> <value>新增[Shadowsocks]伺服器</value>
</data> </data>
<data name="menuAddSocksServer" xml:space="preserve"> <data name="menuAddSocksServer" xml:space="preserve">
<value>新增[Socks]伺服器</value> <value>新增[SOCKS]伺服器</value>
</data> </data>
<data name="menuAddTrojanServer" xml:space="preserve"> <data name="menuAddTrojanServer" xml:space="preserve">
<value>新增[Trojan]伺服器</value> <value>新增[Trojan]伺服器</value>
@ -695,7 +700,7 @@
<value>Core: 基礎設定</value> <value>Core: 基礎設定</value>
</data> </data>
<data name="TbSettingsCoreDns" xml:space="preserve"> <data name="TbSettingsCoreDns" xml:space="preserve">
<value>V2ray DNS設定</value> <value>V2Ray DNS設定</value>
</data> </data>
<data name="TbSettingsCoreKcp" xml:space="preserve"> <data name="TbSettingsCoreKcp" xml:space="preserve">
<value>Core: KCP設定</value> <value>Core: KCP設定</value>
@ -1082,7 +1087,7 @@
<value>IP 或 IP CIDR</value> <value>IP 或 IP CIDR</value>
</data> </data>
<data name="menuAddTuicServer" xml:space="preserve"> <data name="menuAddTuicServer" xml:space="preserve">
<value>新增[Tuic]伺服器</value> <value>新增[TUIC]伺服器</value>
</data> </data>
<data name="LvPrevProfile" xml:space="preserve"> <data name="LvPrevProfile" xml:space="preserve">
<value>前置代理別名</value> <value>前置代理別名</value>
@ -1118,7 +1123,7 @@
<value>*grpc Authority</value> <value>*grpc Authority</value>
</data> </data>
<data name="menuAddHttpServer" xml:space="preserve"> <data name="menuAddHttpServer" xml:space="preserve">
<value>新增[Http]伺服器</value> <value>新增[HTTP]伺服器</value>
</data> </data>
<data name="TbSettingsEnableFragment" xml:space="preserve"> <data name="TbSettingsEnableFragment" xml:space="preserve">
<value>啟用分片Fragment</value> <value>啟用分片Fragment</value>

View file

@ -70,8 +70,8 @@ namespace ServiceLib.ViewModels
return; return;
} }
} }
if (SelectedSource.configType != EConfigType.Socks if (SelectedSource.configType != EConfigType.SOCKS
&& SelectedSource.configType != EConfigType.Http) && SelectedSource.configType != EConfigType.HTTP)
{ {
if (Utils.IsNullOrEmpty(SelectedSource.id)) if (Utils.IsNullOrEmpty(SelectedSource.id))
{ {

View file

@ -203,11 +203,11 @@ namespace ServiceLib.ViewModels
}); });
AddSocksServerCmd = ReactiveCommand.Create(() => AddSocksServerCmd = ReactiveCommand.Create(() =>
{ {
AddServerAsync(true, EConfigType.Socks); AddServerAsync(true, EConfigType.SOCKS);
}); });
AddHttpServerCmd = ReactiveCommand.Create(() => AddHttpServerCmd = ReactiveCommand.Create(() =>
{ {
AddServerAsync(true, EConfigType.Http); AddServerAsync(true, EConfigType.HTTP);
}); });
AddTrojanServerCmd = ReactiveCommand.Create(() => AddTrojanServerCmd = ReactiveCommand.Create(() =>
{ {
@ -219,11 +219,11 @@ namespace ServiceLib.ViewModels
}); });
AddTuicServerCmd = ReactiveCommand.Create(() => AddTuicServerCmd = ReactiveCommand.Create(() =>
{ {
AddServerAsync(true, EConfigType.Tuic); AddServerAsync(true, EConfigType.TUIC);
}); });
AddWireguardServerCmd = ReactiveCommand.Create(() => AddWireguardServerCmd = ReactiveCommand.Create(() =>
{ {
AddServerAsync(true, EConfigType.Wireguard); AddServerAsync(true, EConfigType.WireGuard);
}); });
AddCustomServerCmd = ReactiveCommand.Create(() => AddCustomServerCmd = ReactiveCommand.Create(() =>
{ {

View file

@ -77,8 +77,8 @@ namespace v2rayN.Views
}); });
break; break;
case EConfigType.Socks: case EConfigType.SOCKS:
case EConfigType.Http: case EConfigType.HTTP:
gridSocks.Visibility = Visibility.Visible; gridSocks.Visibility = Visibility.Visible;
break; break;
@ -113,7 +113,7 @@ namespace v2rayN.Views
cmbFingerprint.Text = string.Empty; cmbFingerprint.Text = string.Empty;
break; break;
case EConfigType.Tuic: case EConfigType.TUIC:
gridTuic.Visibility = Visibility.Visible; gridTuic.Visibility = Visibility.Visible;
sepa2.Visibility = Visibility.Collapsed; sepa2.Visibility = Visibility.Collapsed;
gridTransport.Visibility = Visibility.Collapsed; gridTransport.Visibility = Visibility.Collapsed;
@ -127,7 +127,7 @@ namespace v2rayN.Views
}); });
break; break;
case EConfigType.Wireguard: case EConfigType.WireGuard:
gridWireguard.Visibility = Visibility.Visible; gridWireguard.Visibility = Visibility.Visible;
sepa2.Visibility = Visibility.Collapsed; sepa2.Visibility = Visibility.Collapsed;
@ -160,8 +160,8 @@ namespace v2rayN.Views
this.Bind(ViewModel, vm => vm.SelectedSource.security, v => v.cmbSecurity3.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.security, v => v.cmbSecurity3.Text).DisposeWith(disposables);
break; break;
case EConfigType.Socks: case EConfigType.SOCKS:
case EConfigType.Http: case EConfigType.HTTP:
this.Bind(ViewModel, vm => vm.SelectedSource.id, v => v.txtId4.Text).DisposeWith(disposables); 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); this.Bind(ViewModel, vm => vm.SelectedSource.security, v => v.txtSecurity4.Text).DisposeWith(disposables);
break; break;
@ -182,13 +182,13 @@ namespace v2rayN.Views
this.Bind(ViewModel, vm => vm.SelectedSource.path, v => v.txtPath7.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.path, v => v.txtPath7.Text).DisposeWith(disposables);
break; 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.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.security, v => v.txtSecurity8.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedSource.headerType, v => v.cmbHeaderType8.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.headerType, v => v.cmbHeaderType8.Text).DisposeWith(disposables);
break; 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.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.publicKey, v => v.txtPublicKey9.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedSource.path, v => v.txtPath9.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.path, v => v.txtPath9.Text).DisposeWith(disposables);

View file

@ -117,7 +117,7 @@
x:Name="txtnormalDNS" x:Name="txtnormalDNS"
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
materialDesign:HintAssist.Hint="Http/Socks" materialDesign:HintAssist.Hint="HTTP/SOCKS"
AcceptsReturn="True" AcceptsReturn="True"
BorderThickness="1" BorderThickness="1"
Style="{StaticResource MaterialDesignOutlinedTextBox}" Style="{StaticResource MaterialDesignOutlinedTextBox}"
@ -186,7 +186,7 @@
x:Name="txtnormalDNS2" x:Name="txtnormalDNS2"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
materialDesign:HintAssist.Hint="Http/Socks" materialDesign:HintAssist.Hint="HTTP/SOCKS"
AcceptsReturn="True" AcceptsReturn="True"
BorderThickness="1" BorderThickness="1"
Style="{StaticResource MaterialDesignOutlinedTextBox}" Style="{StaticResource MaterialDesignOutlinedTextBox}"

View file

@ -27,7 +27,8 @@
<Window.Resources> <Window.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Popupbox.xaml" /> <ResourceDictionary
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Popupbox.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> <BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
</ResourceDictionary> </ResourceDictionary>
@ -227,7 +228,7 @@
<MenuItem <MenuItem
x:Name="menuCheckUpdateN" x:Name="menuCheckUpdateN"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
Header="V2rayN" /> Header="v2rayN" />
<MenuItem <MenuItem
x:Name="menuCheckUpdateXrayCore" x:Name="menuCheckUpdateXrayCore"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
@ -315,9 +316,11 @@
Margin="8,0" Margin="8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
DockPanel.Dock="Right"> DockPanel.Dock="Right">
<TextBlock x:Name="txtSpeedProxyDisplay" Style="{StaticResource StatusbarItem}" /> <TextBlock x:Name="txtSpeedProxyDisplay"
Style="{StaticResource StatusbarItem}" />
<Border Margin="2" /> <Border Margin="2" />
<TextBlock x:Name="txtSpeedDirectDisplay" Style="{StaticResource StatusbarItem}" /> <TextBlock x:Name="txtSpeedDirectDisplay"
Style="{StaticResource StatusbarItem}" />
</StackPanel> </StackPanel>
<StackPanel <StackPanel
@ -325,9 +328,11 @@
Margin="8,0" Margin="8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
DockPanel.Dock="Left"> DockPanel.Dock="Left">
<TextBlock x:Name="txtInboundDisplay" Style="{StaticResource StatusbarItem}" /> <TextBlock x:Name="txtInboundDisplay"
Style="{StaticResource StatusbarItem}" />
<Border Margin="2" /> <Border Margin="2" />
<TextBlock x:Name="txtInboundLanDisplay" Style="{StaticResource StatusbarItem}" /> <TextBlock x:Name="txtInboundLanDisplay"
Style="{StaticResource StatusbarItem}" />
</StackPanel> </StackPanel>
<StackPanel <StackPanel
@ -398,9 +403,12 @@
x:Name="tabMain" x:Name="tabMain"
Grid.Column="2" Grid.Column="2"
HorizontalContentAlignment="Left"> HorizontalContentAlignment="Left">
<TabItem x:Name="tabMsgView" Header="{x:Static resx:ResUI.MsgInformationTitle}" /> <TabItem x:Name="tabMsgView"
<TabItem x:Name="tabClashProxies" Header="{x:Static resx:ResUI.TbProxies}" /> Header="{x:Static resx:ResUI.MsgInformationTitle}" />
<TabItem x:Name="tabClashConnections" Header="{x:Static resx:ResUI.TbConnections}" /> <TabItem x:Name="tabClashProxies"
Header="{x:Static resx:ResUI.TbProxies}" />
<TabItem x:Name="tabClashConnections"
Header="{x:Static resx:ResUI.TbConnections}" />
</TabControl> </TabControl>
</Grid> </Grid>
<Grid x:Name="gridMain1" Visibility="Collapsed"> <Grid x:Name="gridMain1" Visibility="Collapsed">
@ -532,7 +540,8 @@
</TabItem> </TabItem>
</TabControl> </TabControl>
</Grid> </Grid>
<materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" /> <materialDesign:Snackbar x:Name="MainSnackbar"
MessageQueue="{materialDesign:MessageQueue}" />
</Grid> </Grid>
</DockPanel> </DockPanel>
<tb:TaskbarIcon <tb:TaskbarIcon
@ -542,7 +551,8 @@
ToolTipText="v2rayN"> ToolTipText="v2rayN">
<tb:TaskbarIcon.ContextMenu> <tb:TaskbarIcon.ContextMenu>
<ContextMenu Style="{StaticResource DefContextMenu}"> <ContextMenu Style="{StaticResource DefContextMenu}">
<MenuItem x:Name="menuSystemProxyClear" Height="{StaticResource MenuItemHeight}"> <MenuItem x:Name="menuSystemProxyClear"
Height="{StaticResource MenuItemHeight}">
<MenuItem.Header> <MenuItem.Header>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon <materialDesign:PackIcon
@ -554,7 +564,8 @@
</StackPanel> </StackPanel>
</MenuItem.Header> </MenuItem.Header>
</MenuItem> </MenuItem>
<MenuItem x:Name="menuSystemProxySet" Height="{StaticResource MenuItemHeight}"> <MenuItem x:Name="menuSystemProxySet"
Height="{StaticResource MenuItemHeight}">
<MenuItem.Header> <MenuItem.Header>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon <materialDesign:PackIcon
@ -566,7 +577,8 @@
</StackPanel> </StackPanel>
</MenuItem.Header> </MenuItem.Header>
</MenuItem> </MenuItem>
<MenuItem x:Name="menuSystemProxyNothing" Height="{StaticResource MenuItemHeight}"> <MenuItem x:Name="menuSystemProxyNothing"
Height="{StaticResource MenuItemHeight}">
<MenuItem.Header> <MenuItem.Header>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon <materialDesign:PackIcon
@ -578,7 +590,8 @@
</StackPanel> </StackPanel>
</MenuItem.Header> </MenuItem.Header>
</MenuItem> </MenuItem>
<MenuItem x:Name="menuSystemProxyPac" Height="{StaticResource MenuItemHeight}"> <MenuItem x:Name="menuSystemProxyPac"
Height="{StaticResource MenuItemHeight}">
<MenuItem.Header> <MenuItem.Header>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon <materialDesign:PackIcon

View file

@ -383,7 +383,8 @@
</ScrollViewer> </ScrollViewer>
</TabItem> </TabItem>
<!--<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreKcp}"> <!--<TabItem
Header="{x:Static resx:ResUI.TbSettingsCoreKcp}">
<Grid Margin="{StaticResource SettingItemMargin}"> <Grid Margin="{StaticResource SettingItemMargin}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -1060,7 +1061,7 @@
Margin="{StaticResource SettingItemMargin}" Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="Socks" /> Text="SOCKS" />
<ComboBox <ComboBox
x:Name="cmbCoreType4" x:Name="cmbCoreType4"
Grid.Row="4" Grid.Row="4"