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>)
-> ServerConfig
pwd: String,
method: CipherType,
timeout: Option<Duration>)
-> ServerConfig
Creates a new ServerConfig
fn basic(addr: SocketAddr, password: String, method: CipherType) -> ServerConfig
Create a basic config
fn set_method(&mut self, t: CipherType, pwd: String)
Set encryption method
fn addr(&self) -> &ServerAddr
Get server address
fn key(&self) -> &[u8]
Get encryption key
fn password(&self) -> &str
Get password
fn method(&self) -> CipherType
Get method
impl ServerConfig
[src]
fn to_json(&self) -> Value
Trait Implementations
impl Clone for ServerConfig
[src]
fn clone(&self) -> ServerConfig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more