mirror of https://github.com/2dust/v2rayN
up vless 3
parent
45738a7160
commit
57299cf182
|
@ -513,7 +513,7 @@ namespace v2rayN.Forms
|
||||||
LoadV2ray();
|
LoadV2ray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (config.vmess[index].configType == (int)EConfigType.Vless)
|
else if (config.vmess[index].configType == (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
AddServer5Form fm = new AddServer5Form
|
AddServer5Form fm = new AddServer5Form
|
||||||
{
|
{
|
||||||
|
|
|
@ -971,7 +971,7 @@ namespace v2rayN.Handler
|
||||||
public static int AddVlessServer(ref Config config, VmessItem vmessItem, int index)
|
public static int AddVlessServer(ref Config config, VmessItem vmessItem, int index)
|
||||||
{
|
{
|
||||||
vmessItem.configVersion = 2;
|
vmessItem.configVersion = 2;
|
||||||
vmessItem.configType = (int)EConfigType.Vless;
|
vmessItem.configType = (int)EConfigType.VLESS;
|
||||||
|
|
||||||
vmessItem.address = vmessItem.address.TrimEx();
|
vmessItem.address = vmessItem.address.TrimEx();
|
||||||
vmessItem.id = vmessItem.id.TrimEx();
|
vmessItem.id = vmessItem.id.TrimEx();
|
||||||
|
|
|
@ -72,7 +72,8 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (config.vmess[index].configType != (int)EConfigType.Vmess)
|
if (config.vmess[index].configType != (int)EConfigType.Vmess
|
||||||
|
&& config.vmess[index].configType != (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("NonVmessService"));
|
UI.Show(UIRes.I18N("NonVmessService"));
|
||||||
return;
|
return;
|
||||||
|
@ -112,7 +113,8 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (config.vmess[index].configType != (int)EConfigType.Vmess)
|
if (config.vmess[index].configType != (int)EConfigType.Vmess
|
||||||
|
&& config.vmess[index].configType != (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
UI.Show(UIRes.I18N("NonVmessService"));
|
UI.Show(UIRes.I18N("NonVmessService"));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -438,7 +438,7 @@ namespace v2rayN.Handler
|
||||||
outbound.protocol = Global.socksProtocolLite;
|
outbound.protocol = Global.socksProtocolLite;
|
||||||
outbound.settings.vnext = null;
|
outbound.settings.vnext = null;
|
||||||
}
|
}
|
||||||
else if (config.configType() == (int)EConfigType.Vless)
|
else if (config.configType() == (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
VnextItem vnextItem;
|
VnextItem vnextItem;
|
||||||
if (outbound.settings.vnext.Count <= 0)
|
if (outbound.settings.vnext.Count <= 0)
|
||||||
|
@ -466,6 +466,7 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
//远程服务器用户ID
|
//远程服务器用户ID
|
||||||
usersItem.id = config.id();
|
usersItem.id = config.id();
|
||||||
|
usersItem.alterId = 0;
|
||||||
usersItem.email = Global.userEMail;
|
usersItem.email = Global.userEMail;
|
||||||
usersItem.encryption = config.security();
|
usersItem.encryption = config.security();
|
||||||
|
|
||||||
|
@ -888,9 +889,21 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
//远程服务器用户ID
|
//远程服务器用户ID
|
||||||
usersItem.id = config.id();
|
usersItem.id = config.id();
|
||||||
usersItem.alterId = config.alterId();
|
|
||||||
usersItem.email = Global.userEMail;
|
usersItem.email = Global.userEMail;
|
||||||
|
|
||||||
|
if (config.configType() == (int)EConfigType.Vmess)
|
||||||
|
{
|
||||||
|
inbound.protocol = Global.vmessProtocolLite;
|
||||||
|
usersItem.alterId = config.alterId();
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (config.configType() == (int)EConfigType.VLESS)
|
||||||
|
{
|
||||||
|
inbound.protocol = Global.vlessProtocolLite;
|
||||||
|
usersItem.alterId = 0;
|
||||||
|
inbound.settings.decryption = config.security();
|
||||||
|
}
|
||||||
|
|
||||||
//远程服务器底层传输配置
|
//远程服务器底层传输配置
|
||||||
StreamSettings streamSettings = inbound.streamSettings;
|
StreamSettings streamSettings = inbound.streamSettings;
|
||||||
boundStreamSettings(config, "in", ref streamSettings);
|
boundStreamSettings(config, "in", ref streamSettings);
|
||||||
|
|
|
@ -422,7 +422,7 @@ namespace v2rayN.Mode
|
||||||
{
|
{
|
||||||
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||||
}
|
}
|
||||||
if (configType == (int)EConfigType.Vless)
|
if (configType == (int)EConfigType.VLESS)
|
||||||
{
|
{
|
||||||
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
summary += string.Format("{0}({1}:{2})", remarks, addr, port);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,6 @@ namespace v2rayN.Mode
|
||||||
Custom = 2,
|
Custom = 2,
|
||||||
Shadowsocks = 3,
|
Shadowsocks = 3,
|
||||||
Socks = 4,
|
Socks = 4,
|
||||||
Vless = 5
|
VLESS = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue