1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
//! Trait of auto-proxy I/O

/// Proxy I/O chooses bypass or proxy automatically
pub trait AutoProxyIo {
    /// Check if the current connection is proxied
    fn is_proxied(&self) -> bool;

    /// Check if the current connection is bypassed
    fn is_bypassed(&self) -> bool {
        !self.is_proxied()
    }
}