servers created from command-line should have tcp_only default mode

fixes #670
This commit is contained in:
zonyitoo
2021-11-08 18:29:45 +08:00
parent 4ba514ebf6
commit da6473be09
3 changed files with 5 additions and 2 deletions

2
Cargo.lock generated
View File

@@ -1623,7 +1623,7 @@ dependencies = [
[[package]]
name = "shadowsocks-rust"
version = "1.12.0"
version = "1.12.1"
dependencies = [
"build-time",
"byte_string",

View File

@@ -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"

View File

@@ -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);
}