[−][src]Struct shadowsocks::config::ServerConfig
Configuration for a server
Implementations
impl ServerConfig
[src]
pub 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
pub fn basic(
addr: SocketAddr,
password: String,
method: CipherType
) -> ServerConfig
[src]
addr: SocketAddr,
password: String,
method: CipherType
) -> ServerConfig
Create a basic config
pub fn set_method(&mut self, t: CipherType, pwd: String)
[src]
Set encryption method
pub fn set_plugin(&mut self, p: PluginConfig)
[src]
Set plugin
pub fn set_addr(&mut self, a: ServerAddr)
[src]
Set server addr
pub fn addr(&self) -> &ServerAddr
[src]
Get server address
pub fn key(&self) -> &[u8]
[src]
Get encryption key
pub fn clone_key(&self) -> Bytes
[src]
Clone encryption key
pub fn password(&self) -> &str
[src]
Get password
pub fn method(&self) -> CipherType
[src]
Get method
pub fn timeout(&self) -> Option<Duration>
[src]
Get timeout
pub fn plugin(&self) -> Option<&PluginConfig>
[src]
Get plugin
pub fn set_plugin_addr(&mut self, a: ServerAddr)
[src]
Set plugin address
pub fn plugin_addr(&self) -> Option<&ServerAddr>
[src]
Get plugin address
pub fn external_addr(&self) -> &ServerAddr
[src]
Get server's external address
pub fn to_qrcode_url(&self) -> String
[src]
Get URL for QRCode
ss:// + base64(method:password@host:port)
pub fn to_url(&self) -> String
[src]
Get SIP002 URL
pub fn from_url(encoded: &str) -> Result<ServerConfig, UrlParseError>
[src]
Parse from SIP002 URL
Trait Implementations
impl Clone for ServerConfig
[src]
fn clone(&self) -> ServerConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ServerConfig
[src]
impl FromStr for ServerConfig
[src]
type Err = UrlParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<ServerConfig, Self::Err>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,