From da6473be09fcb13e283fea14a2f5455885ba79ca Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Mon, 8 Nov 2021 18:29:45 +0800 Subject: [PATCH] servers created from command-line should have tcp_only default mode fixes #670 --- Cargo.lock | 2 +- Cargo.toml | 2 +- bin/ssserver.rs | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2d0bf6f3..6179a0fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1623,7 +1623,7 @@ dependencies = [ [[package]] name = "shadowsocks-rust" -version = "1.12.0" +version = "1.12.1" dependencies = [ "build-time", "byte_string", diff --git a/Cargo.toml b/Cargo.toml index 0761535a..22618993 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shadowsocks-rust" -version = "1.12.0" +version = "1.12.1" authors = ["Shadowsocks Contributors"] description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls." repository = "https://github.com/shadowsocks/shadowsocks-rust" diff --git a/bin/ssserver.rs b/bin/ssserver.rs index e12002ec..bb36715d 100644 --- a/bin/ssserver.rs +++ b/bin/ssserver.rs @@ -170,6 +170,9 @@ fn main() { sc.set_plugin(plugin); } + // For historical reason, servers that are created from command-line have to be tcp_only. + sc.set_mode(Mode::TcpOnly); + if matches.is_present("UDP_ONLY") { sc.set_mode(Mode::UdpOnly); }