pub enum AcceptForwardForV0 {
No,
PrivateDomain((String, String)),
PublicDomain((String, String)),
PublicDomainPeer((String, PrivKey, String)),
PublicDyn((u16, u32, String)),
PublicStatic((BindAddress, Option<BindAddress>, String)),
}
Expand description
AcceptForwardForV0 type
allow answers to connection requests originating from a client behind a reverse proxy Format of last param in the tuple is a list of comma separated hosts or CIDR subnetworks IPv4 and/or IPv6 addresses accepted as X-Forwarded-For Empty string means all addresses are accepted
Variants§
No
X-Forwarded-For not allowed
PrivateDomain((String, String))
X-Forwarded-For accepted only for clients with private LAN addresses. First param is the domain of the proxy server
PublicDomain((String, String))
X-Forwarded-For accepted only for clients with public addresses. First param is the domain of the proxy server
domain can take an option port (trailing :port
)
PublicDomainPeer((String, PrivKey, String))
X-Forwarded-For accepted only for clients with public addresses. First param is the domain of the proxy server
domain can take an optional port (trailing :port
)
second param is the privKey of the PeerId of the proxy server, useful when the proxy server is load balancing to several daemons
that should all use the same PeerId to answer requests
PublicDyn((u16, u32, String))
accepts only clients with public addresses that arrive on a LAN address binding. This is used for DMZ and port forwarding configs first param is the port, second param in tuple is the interval for periodic probe of the external IP
PublicStatic((BindAddress, Option<BindAddress>, String))
accepts only clients with public addresses that arrive on a LAN address binding. This is used for DMZ and port forwarding configs First param is the IPv4 bind address of the reverse NAT server (DMZ, port forwarding) Second param is an optional IPv6 bind address of the reverse NAT server (DMZ, port forwarding)
Implementations§
Source§impl AcceptForwardForV0
impl AcceptForwardForV0
pub fn get_public_bind_addresses(&self) -> Vec<BindAddress>
pub fn get_public_bind_ipv6_address(&self) -> Option<IP>
pub fn is_public_domain(&self) -> bool
pub fn is_public_static(&self) -> bool
pub fn is_no(&self) -> bool
pub fn is_public_dyn(&self) -> bool
pub fn is_private_domain(&self) -> bool
pub fn domain_with_common_peer_id(&self) -> Option<PubKey>
pub fn get_domain(&self) -> &str
Trait Implementations§
Source§impl Clone for AcceptForwardForV0
impl Clone for AcceptForwardForV0
Source§fn clone(&self) -> AcceptForwardForV0
fn clone(&self) -> AcceptForwardForV0
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AcceptForwardForV0
impl Debug for AcceptForwardForV0
Source§impl<'de> Deserialize<'de> for AcceptForwardForV0
impl<'de> Deserialize<'de> for AcceptForwardForV0
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AcceptForwardForV0
impl PartialEq for AcceptForwardForV0
Source§impl Serialize for AcceptForwardForV0
impl Serialize for AcceptForwardForV0
impl StructuralPartialEq for AcceptForwardForV0
Auto Trait Implementations§
impl Freeze for AcceptForwardForV0
impl RefUnwindSafe for AcceptForwardForV0
impl Send for AcceptForwardForV0
impl Sync for AcceptForwardForV0
impl Unpin for AcceptForwardForV0
impl UnwindSafe for AcceptForwardForV0
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more