mirror of https://github.com/2dust/v2rayN
Adjusting the text display
parent
4d330cedac
commit
cc428618e5
|
@ -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
|
||||
}
|
||||
}
|
|
@ -137,25 +137,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<EConfigType, string> 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<string> VmessSecurities = new() { "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero" };
|
||||
|
|
|
@ -401,13 +401,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;
|
||||
|
@ -739,7 +739,7 @@ namespace ServiceLib.Handler
|
|||
/// <returns></returns>
|
||||
public static int AddSocksServer(Config config, ProfileItem profileItem, bool toFile = true)
|
||||
{
|
||||
profileItem.configType = EConfigType.Socks;
|
||||
profileItem.configType = EConfigType.SOCKS;
|
||||
|
||||
profileItem.address = profileItem.address.TrimEx();
|
||||
|
||||
|
@ -756,7 +756,7 @@ namespace ServiceLib.Handler
|
|||
/// <returns></returns>
|
||||
public static int AddHttpServer(Config config, ProfileItem profileItem, bool toFile = true)
|
||||
{
|
||||
profileItem.configType = EConfigType.Http;
|
||||
profileItem.configType = EConfigType.HTTP;
|
||||
|
||||
profileItem.address = profileItem.address.TrimEx();
|
||||
|
||||
|
@ -829,7 +829,7 @@ namespace ServiceLib.Handler
|
|||
/// <returns></returns>
|
||||
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();
|
||||
|
@ -868,7 +868,7 @@ namespace ServiceLib.Handler
|
|||
/// <returns></returns>
|
||||
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();
|
||||
|
@ -1263,12 +1263,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,
|
||||
};
|
||||
|
||||
|
|
|
@ -606,7 +606,7 @@ namespace ServiceLib.Handler.CoreConfig
|
|||
GenOutboundMux(node, outbound);
|
||||
break;
|
||||
}
|
||||
case EConfigType.Socks:
|
||||
case EConfigType.SOCKS:
|
||||
{
|
||||
outbound.version = "5";
|
||||
if (Utils.IsNotEmpty(node.security)
|
||||
|
@ -617,7 +617,7 @@ namespace ServiceLib.Handler.CoreConfig
|
|||
}
|
||||
break;
|
||||
}
|
||||
case EConfigType.Http:
|
||||
case EConfigType.HTTP:
|
||||
{
|
||||
if (Utils.IsNotEmpty(node.security)
|
||||
&& Utils.IsNotEmpty(node.id))
|
||||
|
@ -667,14 +667,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;
|
||||
|
@ -1240,7 +1240,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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -647,8 +647,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)
|
||||
|
@ -1208,8 +1208,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<Outbounds4Ray>(txtOutbound);
|
||||
GenOutbound(prevNode, prevOutbound);
|
||||
|
@ -1227,8 +1227,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<Outbounds4Ray>(txtOutbound);
|
||||
GenOutbound(nextNode, nextOutbound);
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace ServiceLib.Handler
|
|||
public int LoadCoreConfigSpeedtest(List<ServerTestItem> 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.Value,
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -655,7 +655,7 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Http] server 的本地化字符串。
|
||||
/// 查找类似 Add [HTTP] server 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddHttpServer {
|
||||
get {
|
||||
|
@ -700,7 +700,7 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Socks] server 的本地化字符串。
|
||||
/// 查找类似 Add [SOCKS] server 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddSocksServer {
|
||||
get {
|
||||
|
@ -718,7 +718,7 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Tuic] server 的本地化字符串。
|
||||
/// 查找类似 Add [TUIC] server 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddTuicServer {
|
||||
get {
|
||||
|
@ -745,7 +745,7 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Wireguard] server 的本地化字符串。
|
||||
/// 查找类似 Add [WireGuard] server 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddWireguardServer {
|
||||
get {
|
||||
|
|
|
@ -536,7 +536,7 @@
|
|||
<value>Add [Shadowsocks] server</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer" xml:space="preserve">
|
||||
<value>Add [Socks] server</value>
|
||||
<value>Add [SOCKS] server</value>
|
||||
</data>
|
||||
<data name="menuAddTrojanServer" xml:space="preserve">
|
||||
<value>Add [Trojan] server</value>
|
||||
|
@ -1094,7 +1094,7 @@
|
|||
<value>Use System Hosts</value>
|
||||
</data>
|
||||
<data name="menuAddTuicServer" xml:space="preserve">
|
||||
<value>Add [Tuic] server</value>
|
||||
<value>Add [TUIC] server</value>
|
||||
</data>
|
||||
<data name="TbHeaderType8" xml:space="preserve">
|
||||
<value>Congestion control</value>
|
||||
|
@ -1115,7 +1115,7 @@
|
|||
<value>Enable IPv6 Address</value>
|
||||
</data>
|
||||
<data name="menuAddWireguardServer" xml:space="preserve">
|
||||
<value>Add [Wireguard] server</value>
|
||||
<value>Add [WireGuard] server</value>
|
||||
</data>
|
||||
<data name="TbPrivateKey" xml:space="preserve">
|
||||
<value>PrivateKey</value>
|
||||
|
@ -1148,7 +1148,7 @@
|
|||
<value>*grpc Authority</value>
|
||||
</data>
|
||||
<data name="menuAddHttpServer" xml:space="preserve">
|
||||
<value>Add [Http] server</value>
|
||||
<value>Add [HTTP] server</value>
|
||||
</data>
|
||||
<data name="TbSettingsEnableFragmentTips" xml:space="preserve">
|
||||
<value>Use Xray and enable non-Tun mode, which conflicts with the group previous proxy</value>
|
||||
|
|
|
@ -536,7 +536,7 @@
|
|||
<value>Добавить сервер [Shadowsocks]</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer" xml:space="preserve">
|
||||
<value>Добавить сервер [Socks]</value>
|
||||
<value>Добавить сервер [SOCKS]</value>
|
||||
</data>
|
||||
<data name="menuAddTrojanServer" xml:space="preserve">
|
||||
<value>Добавить сервер [Trojan]</value>
|
||||
|
|
|
@ -536,7 +536,7 @@
|
|||
<value>添加[Shadowsocks]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer" xml:space="preserve">
|
||||
<value>添加[Socks]服务器</value>
|
||||
<value>添加[SOCKS]服务器</value>
|
||||
</data>
|
||||
<data name="menuAddTrojanServer" xml:space="preserve">
|
||||
<value>添加[Trojan]服务器</value>
|
||||
|
@ -1091,7 +1091,7 @@
|
|||
<value>使用系统hosts</value>
|
||||
</data>
|
||||
<data name="menuAddTuicServer" xml:space="preserve">
|
||||
<value>添加[Tuic]服务器</value>
|
||||
<value>添加[TUIC]服务器</value>
|
||||
</data>
|
||||
<data name="TbHeaderType8" xml:space="preserve">
|
||||
<value>拥塞控制算法</value>
|
||||
|
@ -1112,7 +1112,7 @@
|
|||
<value>启用IPv6</value>
|
||||
</data>
|
||||
<data name="menuAddWireguardServer" xml:space="preserve">
|
||||
<value>添加[Wireguard]服务器</value>
|
||||
<value>添加[WireGuard]服务器</value>
|
||||
</data>
|
||||
<data name="TbPrivateKey" xml:space="preserve">
|
||||
<value>PrivateKey</value>
|
||||
|
@ -1145,7 +1145,7 @@
|
|||
<value>*grpc Authority</value>
|
||||
</data>
|
||||
<data name="menuAddHttpServer" xml:space="preserve">
|
||||
<value>添加[Http]服务器</value>
|
||||
<value>添加[HTTP]服务器</value>
|
||||
</data>
|
||||
<data name="TbSettingsEnableFragment" xml:space="preserve">
|
||||
<value>启用分片(Fragment)</value>
|
||||
|
|
|
@ -535,7 +535,7 @@
|
|||
<value>新增[Shadowsocks]伺服器</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer" xml:space="preserve">
|
||||
<value>新增[Socks]伺服器</value>
|
||||
<value>新增[SOCKS]伺服器</value>
|
||||
</data>
|
||||
<data name="menuAddTrojanServer" xml:space="preserve">
|
||||
<value>新增[Trojan]伺服器</value>
|
||||
|
@ -1082,7 +1082,7 @@
|
|||
<value>IP 或 IP CIDR</value>
|
||||
</data>
|
||||
<data name="menuAddTuicServer" xml:space="preserve">
|
||||
<value>新增[Tuic]伺服器</value>
|
||||
<value>新增[TUIC]伺服器</value>
|
||||
</data>
|
||||
<data name="LvPrevProfile" xml:space="preserve">
|
||||
<value>前置代理別名</value>
|
||||
|
@ -1118,7 +1118,7 @@
|
|||
<value>*grpc Authority</value>
|
||||
</data>
|
||||
<data name="menuAddHttpServer" xml:space="preserve">
|
||||
<value>新增[Http]伺服器</value>
|
||||
<value>新增[HTTP]伺服器</value>
|
||||
</data>
|
||||
<data name="TbSettingsEnableFragment" xml:space="preserve">
|
||||
<value>啟用分片(Fragment)</value>
|
||||
|
|
|
@ -74,8 +74,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))
|
||||
{
|
||||
|
|
|
@ -206,11 +206,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(() =>
|
||||
{
|
||||
|
@ -222,11 +222,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(() =>
|
||||
{
|
||||
|
|
|
@ -85,8 +85,8 @@ namespace v2rayN.Desktop.Views
|
|||
});
|
||||
break;
|
||||
|
||||
case EConfigType.Socks:
|
||||
case EConfigType.Http:
|
||||
case EConfigType.SOCKS:
|
||||
case EConfigType.HTTP:
|
||||
gridSocks.IsVisible = true;
|
||||
break;
|
||||
|
||||
|
@ -121,7 +121,7 @@ namespace v2rayN.Desktop.Views
|
|||
cmbFingerprint.SelectedValue = string.Empty;
|
||||
break;
|
||||
|
||||
case EConfigType.Tuic:
|
||||
case EConfigType.TUIC:
|
||||
gridTuic.IsVisible = true;
|
||||
sepa2.IsVisible = false;
|
||||
gridTransport.IsVisible = false;
|
||||
|
@ -135,7 +135,7 @@ namespace v2rayN.Desktop.Views
|
|||
});
|
||||
break;
|
||||
|
||||
case EConfigType.Wireguard:
|
||||
case EConfigType.WireGuard:
|
||||
gridWireguard.IsVisible = true;
|
||||
|
||||
sepa2.IsVisible = false;
|
||||
|
@ -168,8 +168,8 @@ namespace v2rayN.Desktop.Views
|
|||
this.Bind(ViewModel, vm => vm.SelectedSource.security, v => v.cmbSecurity3.SelectedValue).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;
|
||||
|
@ -190,13 +190,13 @@ namespace v2rayN.Desktop.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.SelectedValue).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);
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
BorderThickness="1"
|
||||
Classes="TextArea Margin8"
|
||||
TextWrapping="Wrap"
|
||||
Watermark="Http/Socks" />
|
||||
Watermark="HTTP/SOCKS" />
|
||||
</DockPanel>
|
||||
</TabItem>
|
||||
|
||||
|
@ -153,7 +153,7 @@
|
|||
BorderThickness="1"
|
||||
Classes="TextArea Margin8"
|
||||
TextWrapping="Wrap"
|
||||
Watermark="Http/Socks" />
|
||||
Watermark="HTTP/SOCKS" />
|
||||
|
||||
<GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" />
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ namespace v2rayN.Views
|
|||
});
|
||||
break;
|
||||
|
||||
case EConfigType.Socks:
|
||||
case EConfigType.Http:
|
||||
case EConfigType.SOCKS:
|
||||
case EConfigType.HTTP:
|
||||
gridSocks.Visibility = Visibility.Visible;
|
||||
break;
|
||||
|
||||
|
@ -115,7 +115,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;
|
||||
|
@ -129,7 +129,7 @@ namespace v2rayN.Views
|
|||
});
|
||||
break;
|
||||
|
||||
case EConfigType.Wireguard:
|
||||
case EConfigType.WireGuard:
|
||||
gridWireguard.Visibility = Visibility.Visible;
|
||||
|
||||
sepa2.Visibility = Visibility.Collapsed;
|
||||
|
@ -162,8 +162,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;
|
||||
|
@ -184,13 +184,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);
|
||||
|
|
|
@ -116,7 +116,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}"
|
||||
|
@ -185,7 +185,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}"
|
||||
|
|
Loading…
Reference in New Issue