Browse Source

up vless 3

pull/936/head
2dust 4 years ago
parent
commit
57299cf182
  1. 2
      v2rayN/v2rayN/Forms/MainForm.cs
  2. 2
      v2rayN/v2rayN/Handler/ConfigHandler.cs
  3. 6
      v2rayN/v2rayN/Handler/MainFormHandler.cs
  4. 17
      v2rayN/v2rayN/Handler/V2rayConfigHandler.cs
  5. 2
      v2rayN/v2rayN/Mode/Config.cs
  6. 2
      v2rayN/v2rayN/Mode/EConfigType.cs

2
v2rayN/v2rayN/Forms/MainForm.cs

@ -513,7 +513,7 @@ namespace v2rayN.Forms
LoadV2ray();
}
}
else if (config.vmess[index].configType == (int)EConfigType.Vless)
else if (config.vmess[index].configType == (int)EConfigType.VLESS)
{
AddServer5Form fm = new AddServer5Form
{

2
v2rayN/v2rayN/Handler/ConfigHandler.cs

@ -971,7 +971,7 @@ namespace v2rayN.Handler
public static int AddVlessServer(ref Config config, VmessItem vmessItem, int index)
{
vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Vless;
vmessItem.configType = (int)EConfigType.VLESS;
vmessItem.address = vmessItem.address.TrimEx();
vmessItem.id = vmessItem.id.TrimEx();

6
v2rayN/v2rayN/Handler/MainFormHandler.cs

@ -72,7 +72,8 @@ namespace v2rayN.Handler
{
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"));
return;
@ -112,7 +113,8 @@ namespace v2rayN.Handler
{
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"));
return;

17
v2rayN/v2rayN/Handler/V2rayConfigHandler.cs

@ -438,7 +438,7 @@ namespace v2rayN.Handler
outbound.protocol = Global.socksProtocolLite;
outbound.settings.vnext = null;
}
else if (config.configType() == (int)EConfigType.Vless)
else if (config.configType() == (int)EConfigType.VLESS)
{
VnextItem vnextItem;
if (outbound.settings.vnext.Count <= 0)
@ -466,6 +466,7 @@ namespace v2rayN.Handler
}
//远程服务器用户ID
usersItem.id = config.id();
usersItem.alterId = 0;
usersItem.email = Global.userEMail;
usersItem.encryption = config.security();
@ -888,9 +889,21 @@ namespace v2rayN.Handler
//远程服务器用户ID
usersItem.id = config.id();
usersItem.alterId = config.alterId();
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;
boundStreamSettings(config, "in", ref streamSettings);

2
v2rayN/v2rayN/Mode/Config.cs

@ -422,7 +422,7 @@ namespace v2rayN.Mode
{
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);
}

2
v2rayN/v2rayN/Mode/EConfigType.cs

@ -7,6 +7,6 @@ namespace v2rayN.Mode
Custom = 2,
Shadowsocks = 3,
Socks = 4,
Vless = 5
VLESS = 5
}
}

Loading…
Cancel
Save