mirror of
				https://github.com/2dust/v2rayN.git
				synced 2025-11-03 22:12:52 +00:00 
			
		
		
		
	up vless 3
This commit is contained in:
		
							parent
							
								
									45738a7160
								
							
						
					
					
						commit
						57299cf182
					
				
					 6 changed files with 23 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,6 @@ namespace v2rayN.Mode
 | 
			
		|||
        Custom = 2,
 | 
			
		||||
        Shadowsocks = 3,
 | 
			
		||||
        Socks = 4,
 | 
			
		||||
        Vless = 5
 | 
			
		||||
        VLESS = 5
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue