From 7d2def45e3f96814ae8073dcd73efe78b4400a9f Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Tue, 7 Sep 2021 16:27:33 +0800 Subject: [PATCH] server and manager will still derive mode from the global scope --- crates/shadowsocks-service/src/config.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/shadowsocks-service/src/config.rs b/crates/shadowsocks-service/src/config.rs index f372eb0e..9b83c069 100644 --- a/crates/shadowsocks-service/src/config.rs +++ b/crates/shadowsocks-service/src/config.rs @@ -1345,7 +1345,12 @@ impl Config { return Err(err); } }, - None => {} + None => { + // Server will derive mode from the global scope + if matches!(config_type, ConfigType::Server | ConfigType::Manager) { + nsvr.set_mode(global_mode); + } + } } if let Some(p) = svr.plugin {