Struct netplan_types::TunnelConfig
source · [−]pub struct TunnelConfig {
pub mode: Option<TunnelMode>,
pub local: Option<String>,
pub remote: Option<String>,
pub ttl: Option<u64>,
pub key: Option<TunnelKey>,
pub mark: Option<String>,
pub port: Option<String>,
pub peers: Vec<WireGuardPeer>,
pub common_all: Option<CommonPropertiesAllDevices>,
}Expand description
Tunnels allow traffic to pass as if it was between systems on the same local network, although systems may be far from each other but reachable via the Internet. They may be used to support IPv6 traffic on a network where the ISP does not provide the service, or to extend and “connect” separate local networks. Please see https://en.wikipedia.org/wiki/Tunneling_protocol for more general information about tunnels.
Fields
mode: Option<TunnelMode>Defines the tunnel mode. Valid options are sit, gre, ip6gre, ipip, ipip6, ip6ip6, vti, vti6 and wireguard. Additionally, the networkd backend also supports gretap and ip6gretap modes. In addition, the NetworkManager backend supports isatap tunnels.
local: Option<String>Defines the address of the local endpoint of the tunnel.
remote: Option<String>Defines the address of the remote endpoint of the tunnel.
ttl: Option<u64>Defines the TTL of the tunnel.
key: Option<TunnelKey>Define keys to use for the tunnel. The key can be a number or a dotted quad (an IPv4 address). For wireguard it can be a base64-encoded private key or (as of networkd v242+) an absolute path to a file, containing the private key (since 0.100). It is used for identification of IP transforms. This is only required for vti and vti6 when using the networkd backend, and for gre or ip6gre tunnels when using the NetworkManager backend.
This field may be used as a scalar (meaning that a single key is specified and to be used for input, output and private key), or as a mapping, where you can further specify input/output/private.
mark: Option<String>Firewall mark for outgoing WireGuard packets from this interface, optional.
port: Option<String>UDP port to listen at or auto. Optional, defaults to auto.
peers: Vec<WireGuardPeer>A list of peers
common_all: Option<CommonPropertiesAllDevices>Common properties for all devices
Trait Implementations
sourceimpl Clone for TunnelConfig
impl Clone for TunnelConfig
sourcefn clone(&self) -> TunnelConfig
fn clone(&self) -> TunnelConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for TunnelConfig
impl Debug for TunnelConfig
sourceimpl Default for TunnelConfig
impl Default for TunnelConfig
sourcefn default() -> TunnelConfig
fn default() -> TunnelConfig
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for TunnelConfig
impl<'de> Deserialize<'de> for TunnelConfig
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<TunnelConfig> for TunnelConfig
impl PartialEq<TunnelConfig> for TunnelConfig
sourcefn eq(&self, other: &TunnelConfig) -> bool
fn eq(&self, other: &TunnelConfig) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &TunnelConfig) -> bool
fn ne(&self, other: &TunnelConfig) -> bool
This method tests for !=.
sourceimpl Serialize for TunnelConfig
impl Serialize for TunnelConfig
impl Eq for TunnelConfig
impl StructuralEq for TunnelConfig
impl StructuralPartialEq for TunnelConfig
Auto Trait Implementations
impl RefUnwindSafe for TunnelConfig
impl Send for TunnelConfig
impl Sync for TunnelConfig
impl Unpin for TunnelConfig
impl UnwindSafe for TunnelConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more