pub struct WiderWorldToContainerRule {
pub network: String,
pub dst_container: String,
pub expose_port: Vec<ExposePort>,
pub external_network_interface: Option<String>,
pub expose_via_ipv6: bool,
pub source_cidr_v4: Option<Vec<String>>,
pub source_cidr_v6: Option<Vec<String>>,
}Expand description
Definition for a rule to be used in the wider-world-to-container section.
Fields§
§network: StringNetwork of the destination container to apply the rule to.
dst_container: StringDestination container to apply the rule to.
expose_port: Vec<ExposePort>Ports to apply the rule to.
Defined as:
-
a single integer
-
a single string
-
a single struct
-
a list of integers
-
a list of strings
-
a list of structs
§Example
All of the following are legal TOML fragments:
expose_port = 80
expose_port = [80, 443]
expose_port = "53/udp"
expose_port = ["80/tcp", "53/udp"]
# The following four all result in the same definition
expose_port = { host_port = 8080 }
expose_port = { host_port = 8080, container_port = 8080 }
expose_port = { host_port = 8080, family = "tcp" }
expose_port = { host_port = 8080, container_port = 8080, family = "tcp" }
expose_port = [
{ host_port = 80 },
{ host_port = 53, family = "udp" },
{ host_port = 443, container_port = 8443 },
]external_network_interface: Option<String>Specific external network interface to target.
expose_via_ipv6: boolConfigure if the container should be exposed via IPv6, too. (Default: true).
§Example
expose_via_ipv6 = false
expose_via_ipv6 = falsesource_cidr_v4: Option<Vec<String>>Source CIDRs (IPv4) to which incoming traffic should be restricted.
This can be:
-
a single string
-
a list of strings
There is no validation whether the provided CIDRs are actually valid.
§Example
All of the following are legal TOML fragments:
source_cidr_v4 = "127.0.0.0/8"
source_cidr_v4 = ["127.0.0.0/8", "192.0.2.1/32"]source_cidr_v6: Option<Vec<String>>Source CIDRs (IPv6) to which incoming traffic should be restricted.
This can be:
-
a single string
-
a list of strings
There is no validation whether the provided CIDRs are actually valid.
§Example
All of the following are legal TOML fragments:
source_cidr_v6 = "fe80::/10"
source_cidr_v6 = ["fe80::/10", "2001:db8::/32"]Trait Implementations§
Source§impl Clone for WiderWorldToContainerRule
impl Clone for WiderWorldToContainerRule
Source§fn clone(&self) -> WiderWorldToContainerRule
fn clone(&self) -> WiderWorldToContainerRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WiderWorldToContainerRule
impl Debug for WiderWorldToContainerRule
Source§impl<'de> Deserialize<'de> for WiderWorldToContainerRule
impl<'de> Deserialize<'de> for WiderWorldToContainerRule
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>,
impl Eq for WiderWorldToContainerRule
Source§impl Hash for WiderWorldToContainerRule
impl Hash for WiderWorldToContainerRule
Source§impl Process<Iptables> for WiderWorldToContainerRule
impl Process<Iptables> for WiderWorldToContainerRule
Source§fn process(
&self,
ctx: &ProcessContext<'_, Iptables>,
) -> Result<Option<Vec<IptablesRule>>>
fn process( &self, ctx: &ProcessContext<'_, Iptables>, ) -> Result<Option<Vec<IptablesRule>>>
ProcessContext, returning zero or more rules
to apply with nft.Source§impl Process<Nftables> for WiderWorldToContainerRule
impl Process<Nftables> for WiderWorldToContainerRule
Source§fn process(
&self,
ctx: &ProcessContext<'_, Nftables>,
) -> Result<Option<Vec<String>>>
fn process( &self, ctx: &ProcessContext<'_, Nftables>, ) -> Result<Option<Vec<String>>>
ProcessContext, returning zero or more rules
to apply with nft.impl StructuralPartialEq for WiderWorldToContainerRule
Auto Trait Implementations§
impl Freeze for WiderWorldToContainerRule
impl RefUnwindSafe for WiderWorldToContainerRule
impl Send for WiderWorldToContainerRule
impl Sync for WiderWorldToContainerRule
impl Unpin for WiderWorldToContainerRule
impl UnsafeUnpin for WiderWorldToContainerRule
impl UnwindSafe for WiderWorldToContainerRule
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.