Function shadowsocks::relay::local::run [] [src]

pub fn run(config: Config) -> Result<()>

Relay server running under local environment.

use shadowsocks::relay::local::run;
use shadowsocks::config::{Config, ServerConfig};
use shadowsocks::crypto::CipherType;

let mut config = Config::new();
config.local = Some("127.0.0.1:1080".parse().unwrap());
config.server = vec![
    ServerConfig::basic("127.0.0.1:8388".parse().unwrap(),
                        "server-password".to_string(),
                        CipherType::Aes256Cfb)];
run(config).unwrap();