pub struct TproxyArgs {Show 13 fields
pub tun_ip: IpAddr,
pub tun_netmask: IpAddr,
pub tun_gateway: IpAddr,
pub tun_dns: IpAddr,
pub tun_mtu: u16,
pub tun_name: String,
pub proxy_addr: SocketAddr,
pub bypass_ips: Vec<IpCidr>,
pub ipv4_default_route: bool,
pub ipv6_default_route: bool,
pub gateway_mode: bool,
pub socket_fwmark: Option<u32>,
pub socket_fwmark_table: String,
}
Fields§
§tun_ip: IpAddr
§tun_netmask: IpAddr
§tun_gateway: IpAddr
§tun_dns: IpAddr
§tun_mtu: u16
§tun_name: String
§proxy_addr: SocketAddr
§bypass_ips: Vec<IpCidr>
§ipv4_default_route: bool
§ipv6_default_route: bool
§gateway_mode: bool
§socket_fwmark: Option<u32>
§socket_fwmark_table: String
Implementations§
Source§impl TproxyArgs
impl TproxyArgs
pub fn new() -> Self
pub fn tun_ip(self, tun_ip: IpAddr) -> Self
pub fn tun_netmask(self, tun_netmask: IpAddr) -> Self
pub fn tun_gateway(self, tun_gateway: IpAddr) -> Self
pub fn tun_dns(self, tun_dns: IpAddr) -> Self
pub fn tun_mtu(self, tun_mtu: u16) -> Self
pub fn tun_name(self, tun_name: &str) -> Self
pub fn proxy_addr(self, proxy_addr: SocketAddr) -> Self
pub fn bypass_ips(self, bypass_ips: &[IpCidr]) -> Self
pub fn ipv6_default_route(self, enabled: bool) -> Self
pub fn ipv4_default_route(self, enabled: bool) -> Self
pub fn gateway_mode(self, gateway_mode: bool) -> Self
pub fn socket_fwmark(self, socket_fwmark: Option<u32>) -> Self
pub fn socket_fwmark_table(self, socket_fwmark_table: &str) -> Self
Trait Implementations§
Source§impl Clone for TproxyArgs
impl Clone for TproxyArgs
Source§fn clone(&self) -> TproxyArgs
fn clone(&self) -> TproxyArgs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TproxyArgs
impl Debug for TproxyArgs
Source§impl Default for TproxyArgs
impl Default for TproxyArgs
Source§impl<'de> Deserialize<'de> for TproxyArgs
impl<'de> Deserialize<'de> for TproxyArgs
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for TproxyArgs
impl Hash for TproxyArgs
Source§impl PartialEq for TproxyArgs
impl PartialEq for TproxyArgs
Source§impl Serialize for TproxyArgs
impl Serialize for TproxyArgs
impl Eq for TproxyArgs
impl StructuralPartialEq for TproxyArgs
Auto Trait Implementations§
impl Freeze for TproxyArgs
impl RefUnwindSafe for TproxyArgs
impl Send for TproxyArgs
impl Sync for TproxyArgs
impl Unpin for TproxyArgs
impl UnwindSafe for TproxyArgs
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