mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
support ipv6 for outgoing NTCP connections
This commit is contained in:
parent
1408422da9
commit
7fb7341502
6 changed files with 55 additions and 6 deletions
|
@ -78,7 +78,7 @@ namespace i2p
|
|||
auto newAddress = boost::asio::ip::address::from_string (host);
|
||||
for (auto& address : m_RouterInfo.GetAddresses ())
|
||||
{
|
||||
if (address.host != newAddress)
|
||||
if (address.host != newAddress && address.IsCompatible (newAddress))
|
||||
{
|
||||
address.host = newAddress;
|
||||
updated = true;
|
||||
|
@ -130,7 +130,15 @@ namespace i2p
|
|||
// update
|
||||
UpdateRouterInfo ();
|
||||
}
|
||||
|
||||
|
||||
void RouterContext::SetSupportsV6 (bool supportsV6)
|
||||
{
|
||||
if (supportsV6)
|
||||
m_RouterInfo.EnableV6 ();
|
||||
else
|
||||
m_RouterInfo.DisableV6 ();
|
||||
}
|
||||
|
||||
bool RouterContext::Load ()
|
||||
{
|
||||
std::ifstream fk (i2p::util::filesystem::GetFullPath (ROUTER_KEYS).c_str (), std::ifstream::binary | std::ofstream::in);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue