mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
set Mode::UdpOnly via command line -u
- fixes #577 - Why the original code use merge instead of replace?
This commit is contained in:
@@ -203,7 +203,7 @@ fn main() {
|
||||
// Overrides
|
||||
if matches.is_present("UDP_ONLY") {
|
||||
if let Some(ref mut m) = config.manager {
|
||||
m.mode = m.mode.merge(Mode::UdpOnly);
|
||||
m.mode = Mode::UdpOnly;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ fn main() {
|
||||
}
|
||||
|
||||
if matches.is_present("UDP_ONLY") {
|
||||
sc.set_mode(sc.mode().merge(Mode::UdpOnly));
|
||||
sc.set_mode(Mode::UdpOnly);
|
||||
}
|
||||
|
||||
if matches.is_present("TCP_AND_UDP") {
|
||||
|
||||
Reference in New Issue
Block a user