Struct shadowsocks::config::ServerConfig
[−]
[src]
pub struct ServerConfig { /* fields omitted */ }
Configuration for a server
Methods
impl ServerConfig
[src]
fn new(
addr: ServerAddr,
pwd: String,
method: CipherType,
timeout: Option<Duration>,
plugin: Option<PluginConfig>
) -> ServerConfig
[src]
addr: ServerAddr,
pwd: String,
method: CipherType,
timeout: Option<Duration>,
plugin: Option<PluginConfig>
) -> ServerConfig
Creates a new ServerConfig
fn basic(addr: SocketAddr, password: String, method: CipherType) -> ServerConfig
[src]
Create a basic config
fn set_method(&mut self, t: CipherType, pwd: String)
[src]
Set encryption method
fn set_plugin(&mut self, p: PluginConfig)
[src]
Set plugin
fn set_addr(&mut self, a: ServerAddr)
[src]
Set server addr
fn addr(&self) -> &ServerAddr
[src]
Get server address
fn key(&self) -> &[u8]
[src]
Get encryption key
fn password(&self) -> &str
[src]
Get password
fn method(&self) -> CipherType
[src]
Get method
fn timeout(&self) -> &Option<Duration>
[src]
Get timeout
fn plugin(&self) -> Option<&PluginConfig>
[src]
Get plugin
impl ServerConfig
[src]
Trait Implementations
impl Clone for ServerConfig
[src]
fn clone(&self) -> ServerConfig
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more