| 458 | } |
| 459 | |
| 460 | void RouterContext::UpdateNTCP2Keys () |
| 461 | { |
| 462 | if (!m_NTCP2Keys) return; |
| 463 | auto addresses = m_RouterInfo.GetAddresses (); |
| 464 | if (!addresses) return; |
| 465 | for (auto& it: *addresses) |
| 466 | { |
| 467 | if (it && it->IsNTCP2 ()) |
| 468 | { |
| 469 | it->s = m_NTCP2Keys->staticPublicKey; |
| 470 | memcpy (it->i, m_NTCP2Keys->iv, 16); |
| 471 | } |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | void RouterContext::PublishSSU2Address (int port, bool publish, bool v4, bool v6, int version) |
| 476 | { |
nothing calls this directly
no test coverage detected