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§
Source§impl Clone for TunnelConfig
impl Clone for TunnelConfig
Source§fn clone(&self) -> TunnelConfig
fn clone(&self) -> TunnelConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more