pub enum RedirType {
NotSupported,
Redirect,
TProxy,
}Expand description
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§
Source§impl RedirType
impl RedirType
Sourcepub const fn tcp_default() -> Self
pub const fn tcp_default() -> Self
Default TCP transparent proxy solution on this platform
Sourcepub const fn udp_default() -> Self
pub const fn udp_default() -> Self
Default UDP transparent proxy solution on this platform
Sourcepub fn is_supported(self) -> bool
pub fn is_supported(self) -> bool
Check if transparent proxy is supported on this platform
Trait Implementations§
impl Copy for RedirType
impl Eq for RedirType
impl StructuralPartialEq for RedirType
Auto Trait Implementations§
impl Freeze for RedirType
impl RefUnwindSafe for RedirType
impl Send for RedirType
impl Sync for RedirType
impl Unpin for RedirType
impl UnwindSafe for RedirType
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.