allowing public IPv6 on private interface, because DMZ can do that

Niko PLP 2 years ago
parent 0377498995
commit 76cd0b3bd8
  1. 8
      p2p-net/src/types.rs

@ -63,7 +63,7 @@ impl InterfaceType {
InterfaceType::Loopback => ip.is_loopback(),
InterfaceType::Public => is_public_ipv6(ip),
// we do NOT allow to bind to link-local for IPv6
InterfaceType::Private => is_ipv6_private(ip),
InterfaceType::Private => is_ipv6_private(ip) || is_public_ipv6(ip),
_ => false,
}
}
@ -214,6 +214,12 @@ impl AcceptForwardForV0 {
_ => false,
}
}
pub fn domain_with_common_peer_id(&self) -> Option<PubKey> {
match self {
AcceptForwardForV0::PublicDomainPeer((_, privkey, _)) => Some(privkey.to_pub()),
_ => None,
}
}
pub fn get_domain(&self) -> &str {
let domain = get_domain_without_port_443(match self {
AcceptForwardForV0::PrivateDomain((d, _)) => d,

Loading…
Cancel
Save