From 964102391bea7355edb697fbf8e4c592c51d1975 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Fri, 8 Oct 2021 01:28:43 +0800 Subject: [PATCH] fixed bug, check TCP mode enabled only for HTTP --- crates/shadowsocks-service/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/shadowsocks-service/src/config.rs b/crates/shadowsocks-service/src/config.rs index 288474c00079..dbedbe2647a6 100644 --- a/crates/shadowsocks-service/src/config.rs +++ b/crates/shadowsocks-service/src/config.rs @@ -1205,7 +1205,7 @@ impl Config { } #[cfg(feature = "local-http")] - if !local_config.mode.enable_tcp() { + if local_config.protocol == ProtocolType::Http && !local_config.mode.enable_tcp() { let err = Error::new( ErrorKind::Invalid, "invalid `mode`, TCP have to be enabled for http",