Struct fast_socks5::server::Config
source · pub struct Config<A: Authentication = DenyAuthentication> { /* private fields */ }
Implementations§
source§impl<A: Authentication> Config<A>
impl<A: Authentication> Config<A>
sourcepub fn set_request_timeout(&mut self, n: u64) -> &mut Self
pub fn set_request_timeout(&mut self, n: u64) -> &mut Self
How much time it should wait until the request timeout.
sourcepub fn set_skip_auth(&mut self, value: bool) -> &mut Self
pub fn set_skip_auth(&mut self, value: bool) -> &mut Self
Skip the entire auth/handshake part, which means the server will directly wait for the command request.
sourcepub fn with_authentication<T: Authentication + 'static>(
self,
authentication: T
) -> Config<T>
pub fn with_authentication<T: Authentication + 'static>( self, authentication: T ) -> Config<T>
Enable authentication
’static lifetime for Authentication avoid us to use dyn Authentication
and set the Arc before calling the function.
sourcepub fn set_allow_no_auth(&mut self, value: bool) -> &mut Self
pub fn set_allow_no_auth(&mut self, value: bool) -> &mut Self
For some complex scenarios, we may want to either accept Username/Password configuration or IP Whitelisting, in case the client send only 2 auth methods rather than 3 (with auth)
sourcepub fn set_execute_command(&mut self, value: bool) -> &mut Self
pub fn set_execute_command(&mut self, value: bool) -> &mut Self
Set whether or not to execute commands
sourcepub fn set_dns_resolve(&mut self, value: bool) -> &mut Self
pub fn set_dns_resolve(&mut self, value: bool) -> &mut Self
Will the server perform dns resolve
sourcepub fn set_udp_support(&mut self, value: bool) -> &mut Self
pub fn set_udp_support(&mut self, value: bool) -> &mut Self
Set whether or not to allow udp traffic
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Config<A>
impl<A> RefUnwindSafe for Config<A>where
A: RefUnwindSafe,
impl<A> Send for Config<A>
impl<A> Sync for Config<A>
impl<A> Unpin for Config<A>
impl<A> UnwindSafe for Config<A>where
A: RefUnwindSafe,
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