pub struct LocalConfig {Show 13 fields
pub addr: Option<ServerAddr>,
pub protocol: ProtocolType,
pub mode: Mode,
pub udp_addr: Option<ServerAddr>,
pub udp_associate_addr: Option<ServerAddr>,
pub forward_addr: Option<Address>,
pub tcp_redir: RedirType,
pub udp_redir: RedirType,
pub local_dns_addr: Option<NameServerAddr>,
pub remote_dns_addr: Option<Address>,
pub client_cache_size: Option<usize>,
pub ipv6_only: bool,
pub socks5_auth: Socks5AuthConfig,
}Expand description
Local server configuration
Fields§
§addr: Option<ServerAddr>Listen address for local servers
protocol: ProtocolTypeLocal Protocol
mode: ModeMode
Uses global mode if not specified
udp_addr: Option<ServerAddr>UDP server bind address. Uses addr if not specified
Resolving Android’s issue: shadowsocks/shadowsocks-android#2571
udp_associate_addr: Option<ServerAddr>UDP Associate address. Uses udp_addr if not specified
forward_addr: Option<Address>Destination address for tunnel
tcp_redir: RedirTypeTCP Transparent Proxy type
udp_redir: RedirTypeUDP Transparent Proxy type
local_dns_addr: Option<NameServerAddr>Local DNS’s address
Sending DNS query directly to this address
remote_dns_addr: Option<Address>Remote DNS’s address
Sending DNS query through proxy to this address
client_cache_size: Option<usize>§ipv6_only: boolSet IPV6_V6ONLY for listener socket
socks5_auth: Socks5AuthConfigSOCKS5 Authentication configuration
Implementations§
Source§impl LocalConfig
impl LocalConfig
Sourcepub fn new(protocol: ProtocolType) -> Self
pub fn new(protocol: ProtocolType) -> Self
Create a new LocalConfig
Sourcepub fn new_with_addr(addr: ServerAddr, protocol: ProtocolType) -> Self
pub fn new_with_addr(addr: ServerAddr, protocol: ProtocolType) -> Self
Create a new LocalConfig with listen address
pub fn is_basic(&self) -> bool
Trait Implementations§
Source§impl Clone for LocalConfig
impl Clone for LocalConfig
Source§fn clone(&self) -> LocalConfig
fn clone(&self) -> LocalConfig
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 moreAuto Trait Implementations§
impl Freeze for LocalConfig
impl RefUnwindSafe for LocalConfig
impl Send for LocalConfig
impl Sync for LocalConfig
impl Unpin for LocalConfig
impl UnwindSafe for LocalConfig
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