pub enum TransportMode {
Netstack,
Tun(TunConfig),
}Expand description
How the node’s application overlay data path is realized.
Defaults to Netstack, the userspace smoltcp netstack that needs no
privileges and is the right choice for the fork’s primary deployment (a privacy proxy / cloud
exit node running unprivileged in a container). Tun instead hands the
node’s overlay packets to a real kernel TUN interface, for embedders that want the host OS
networking stack (routes, sockets, DNS) to see the tailnet directly — closer to tailscaled’s
model than to Go tsnet’s in-process netstack.
Like the other dataplane fields this is not read inside ts_control: it is carried for
transport only and converted to a ts_transport_tun config by the runtime at the ts_runtime
boundary (ts_control must not depend on ts_transport_tun). The mode governs only the
application data path; it never changes the exit-node / forwarder egress path, which stays its
own IPv4-only userspace netstack regardless.
Variants§
Netstack
Userspace smoltcp netstack (default). No privileges required.
Tun(TunConfig)
Real kernel TUN interface. Requires privileges (root / CAP_NET_ADMIN on Linux) and a
platform that supports TUN (Linux /dev/net/tun, macOS utun).
Trait Implementations§
Source§impl Clone for TransportMode
impl Clone for TransportMode
Source§fn clone(&self) -> TransportMode
fn clone(&self) -> TransportMode
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 TransportMode
impl Debug for TransportMode
Source§impl Default for TransportMode
impl Default for TransportMode
Source§fn default() -> TransportMode
fn default() -> TransportMode
Source§impl<'de> Deserialize<'de> for TransportMode
impl<'de> Deserialize<'de> for TransportMode
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 TransportMode
Source§impl PartialEq for TransportMode
impl PartialEq for TransportMode
Source§fn eq(&self, other: &TransportMode) -> bool
fn eq(&self, other: &TransportMode) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TransportMode
impl Serialize for TransportMode
impl StructuralPartialEq for TransportMode
Auto Trait Implementations§
impl Freeze for TransportMode
impl RefUnwindSafe for TransportMode
impl Send for TransportMode
impl Sync for TransportMode
impl Unpin for TransportMode
impl UnsafeUnpin for TransportMode
impl UnwindSafe for TransportMode
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.