mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
Refactor DNS relay
- Allow working in standalone mode - Use same UDP socket for sending response packet - Send TCP queries with ProxyStream directly ref #213
This commit is contained in:
@@ -39,7 +39,7 @@ impl Socks5TestServer {
|
||||
},
|
||||
cli_config: {
|
||||
let mut cfg = Config::new(ConfigType::Socks5Local);
|
||||
cfg.local = Some(ServerAddr::from(local_addr));
|
||||
cfg.local_addr = Some(ServerAddr::from(local_addr));
|
||||
cfg.server = vec![ServerConfig::basic(svr_addr, pwd.to_owned(), method)];
|
||||
cfg.mode = if enable_udp { Mode::TcpAndUdp } else { Mode::TcpOnly };
|
||||
cfg
|
||||
|
||||
@@ -46,7 +46,7 @@ fn get_svr_config() -> Config {
|
||||
|
||||
fn get_cli_config() -> Config {
|
||||
let mut cfg = Config::new(ConfigType::Socks5Local);
|
||||
cfg.local = Some(LOCAL_ADDR.parse().unwrap());
|
||||
cfg.local_addr = Some(LOCAL_ADDR.parse().unwrap());
|
||||
cfg.server = vec![ServerConfig::basic(
|
||||
SERVER_ADDR.parse().unwrap(),
|
||||
PASSWORD.to_owned(),
|
||||
|
||||
Reference in New Issue
Block a user