mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
default cipher is aes-256-cfb
This commit is contained in:
@@ -12,7 +12,7 @@ use std::os;
|
||||
use shadowsocks::config::Config;
|
||||
use shadowsocks::relay::TcpRelayLocal;
|
||||
use shadowsocks::relay::Relay;
|
||||
use shadowsocks::crypto::cipher::CIPHER_AES_128_CFB;
|
||||
use shadowsocks::crypto::cipher::CIPHER_AES_256_CFB;
|
||||
|
||||
fn main() {
|
||||
let opts = [
|
||||
@@ -24,7 +24,7 @@ fn main() {
|
||||
optopt("k", "password", "password", ""),
|
||||
optopt("p", "server-port", "server port", ""),
|
||||
optopt("l", "local-port", "local socks5 proxy port", ""),
|
||||
optopt("m", "encrypt-method", "entryption method", CIPHER_AES_128_CFB),
|
||||
optopt("m", "encrypt-method", "entryption method", CIPHER_AES_256_CFB),
|
||||
];
|
||||
|
||||
let matches = getopts(os::args().tail(), opts).unwrap();
|
||||
@@ -78,7 +78,7 @@ fn main() {
|
||||
if matches.opt_present("m") {
|
||||
let mut encrypt_meth = matches.opt_str("m").unwrap();
|
||||
if encrypt_meth.as_slice() == "" {
|
||||
encrypt_meth = CIPHER_AES_128_CFB.to_string();
|
||||
encrypt_meth = CIPHER_AES_256_CFB.to_string();
|
||||
}
|
||||
|
||||
config.method = encrypt_meth;
|
||||
|
||||
@@ -11,7 +11,7 @@ use std::os;
|
||||
use shadowsocks::config::Config;
|
||||
use shadowsocks::relay::TcpRelayServer;
|
||||
use shadowsocks::relay::Relay;
|
||||
use shadowsocks::crypto::cipher::CIPHER_AES_128_CFB;
|
||||
use shadowsocks::crypto::cipher::CIPHER_AES_256_CFB;
|
||||
|
||||
fn main() {
|
||||
let opts = [
|
||||
@@ -23,7 +23,7 @@ fn main() {
|
||||
optopt("k", "password", "password", ""),
|
||||
optopt("p", "server-port", "server port", ""),
|
||||
optopt("l", "local-port", "local socks5 proxy port", ""),
|
||||
optopt("m", "encrypt-method", "entryption method", CIPHER_AES_128_CFB),
|
||||
optopt("m", "encrypt-method", "entryption method", CIPHER_AES_256_CFB),
|
||||
];
|
||||
|
||||
let matches = getopts(os::args().tail(), opts).unwrap();
|
||||
@@ -77,7 +77,7 @@ fn main() {
|
||||
if matches.opt_present("m") {
|
||||
let mut encrypt_meth = matches.opt_str("m").unwrap();
|
||||
if encrypt_meth.as_slice() == "" {
|
||||
encrypt_meth = CIPHER_AES_128_CFB.to_string();
|
||||
encrypt_meth = CIPHER_AES_256_CFB.to_string();
|
||||
}
|
||||
|
||||
config.method = encrypt_meth;
|
||||
|
||||
@@ -10,7 +10,7 @@ use std::fmt::{Show, Formatter, WriteError, mod};
|
||||
|
||||
use std::option::Option;
|
||||
|
||||
use crypto::cipher::CIPHER_AES_128_CFB;
|
||||
use crypto::cipher::CIPHER_AES_256_CFB;
|
||||
|
||||
#[deriving(Encodable, Clone)]
|
||||
pub struct Config {
|
||||
@@ -32,7 +32,7 @@ impl Config {
|
||||
server_port: 8000,
|
||||
local_port: 8000,
|
||||
password: "".to_string(),
|
||||
method: CIPHER_AES_128_CFB.to_string(),
|
||||
method: CIPHER_AES_256_CFB.to_string(),
|
||||
timeout: None,
|
||||
fast_open: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user