[][src]Enum shadowsocks::config::RedirType

pub enum RedirType {
    NotSupported,
    Redirect,
    TProxy,
}

Transparent Proxy type

Variants

NotSupported

For not supported platforms

Redirect

For Linux-like systems' Netfilter REDIRECT. Only for TCP connections.

This is supported from Linux 2.4 Kernel. Document: https://www.netfilter.org/documentation/index.html#documentation-howto

NOTE: Filter rule REDIRECT can only be applied to TCP connections.

TProxy

For Linux-like systems' Netfilter TPROXY rule.

NOTE: Filter rule TPROXY can be applied to TCP and UDP connections.

Implementations

impl RedirType[src]

pub fn tcp_default() -> RedirType[src]

Default TCP transparent proxy solution on this platform

pub fn udp_default() -> RedirType[src]

Default UDP transparent proxy solution on this platform

pub fn is_supported(self) -> bool[src]

Check if transparent proxy is supported on this platform

pub fn name(self) -> &'static str[src]

Name of redirect type (transparent proxy type)

pub fn available_types() -> Vec<&'static str>[src]

Get all available types

Trait Implementations

impl Clone for RedirType[src]

impl Copy for RedirType[src]

impl Debug for RedirType[src]

impl Display for RedirType[src]

impl Eq for RedirType[src]

impl FromStr for RedirType[src]

type Err = InvalidRedirType

The associated error which can be returned from parsing.

impl IntoEnumIterator for RedirType[src]

type Iterator = RedirTypeIter

impl PartialEq<RedirType> for RedirType[src]

impl StructuralEq for RedirType[src]

impl StructuralPartialEq for RedirType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,