Struct tproxy_config::TproxyArgs
source · pub struct TproxyArgs {
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<IpAddr>,
}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<IpAddr>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: &[IpAddr]) -> Self
Trait Implementations§
source§impl Clone for TproxyArgs
impl Clone for TproxyArgs
source§fn clone(&self) -> TproxyArgs
fn clone(&self) -> TproxyArgs
Returns a copy 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§fn eq(&self, other: &TproxyArgs) -> bool
fn eq(&self, other: &TproxyArgs) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for TproxyArgs
impl Serialize for TproxyArgs
impl Eq for TproxyArgs
impl StructuralPartialEq for TproxyArgs
Auto Trait Implementations§
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