remove exposing local interface when serving a domain

pull/19/head
Niko PLP 1 year ago
parent 8897cc5444
commit ce9069ebb0
  1. 15
      p2p-net/src/types.rs

@ -1142,13 +1142,14 @@ impl ListenerV0 {
self.accept_forward_for.get_domain().to_string(), self.accept_forward_for.get_domain().to_string(),
)); ));
} }
if self.accept_direct { //// this is removed since a server serving domain requests often needs a local interface too (for ngaccount), but does not want to expose this local interface to clients.
if self.if_type == InterfaceType::Private { // if self.accept_direct {
res.push(BrokerServerTypeV0::BoxPrivate(addrs)); // if self.if_type == InterfaceType::Private {
} else if self.if_type == InterfaceType::Loopback { // res.push(BrokerServerTypeV0::BoxPrivate(addrs));
res.push(BrokerServerTypeV0::Localhost(addrs[0].port)); // } else if self.if_type == InterfaceType::Loopback {
} // res.push(BrokerServerTypeV0::Localhost(addrs[0].port));
} // }
// }
} }
AcceptForwardForV0::PrivateDomain(_) => { AcceptForwardForV0::PrivateDomain(_) => {
res.push(BrokerServerTypeV0::Domain( res.push(BrokerServerTypeV0::Domain(

Loading…
Cancel
Save