mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	ntcp2.addressv6 parameter
This commit is contained in:
		
							parent
							
								
									07bbbbaf61
								
							
						
					
					
						commit
						4c4e856a1a
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -165,6 +165,13 @@ namespace i2p
 | 
			
		|||
					uint16_t ntcp2port; i2p::config::GetOption("ntcp2.port", ntcp2port);
 | 
			
		||||
					if (!ntcp && !ntcp2port) ntcp2port = port; // use standard port
 | 
			
		||||
					i2p::context.PublishNTCP2Address (ntcp2port, true); // publish
 | 
			
		||||
					if (ipv6)
 | 
			
		||||
					{
 | 
			
		||||
						std::string ipv6Addr; i2p::config::GetOption("ntcp2.addressv6", ipv6Addr);
 | 
			
		||||
						auto addr = boost::asio::ip::address_v6::from_string (ipv6Addr);
 | 
			
		||||
						if (!addr.is_unspecified () && addr != boost::asio::ip::address_v6::any ())
 | 
			
		||||
							i2p::context.UpdateNTCP2V6Address (addr); // set ipv6 address if configured
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				else
 | 
			
		||||
					i2p::context.PublishNTCP2Address (port, false); // unpublish
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue