From c95a94e3d585e71b9a8d974abb8f91ab7d2a41ae Mon Sep 17 00:00:00 2001 From: EAimTY Date: Sat, 30 Jul 2022 17:38:59 +0900 Subject: [PATCH] support multi-args command-line options --- client/src/config.rs | 4 ++-- server/src/config.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/config.rs b/client/src/config.rs index fd8abc3..92767e9 100644 --- a/client/src/config.rs +++ b/client/src/config.rs @@ -276,7 +276,7 @@ impl RawConfig { "SERVER_IP", ); - opts.optopt( + opts.optmulti( "", "certificate", "Set custom X.509 certificate alongside native CA roots for the QUIC handshake. This option can be used multiple times to set multiple certificates", @@ -304,7 +304,7 @@ impl RawConfig { "HEARTBEAT_INTERVAL", ); - opts.optopt( + opts.optmulti( "", "alpn", "Set ALPN protocols included in the TLS client hello. This option can be used multiple times to set multiple ALPN protocols. If not set, no ALPN extension will be sent", diff --git a/server/src/config.rs b/server/src/config.rs index 297d605..7c8083b 100644 --- a/server/src/config.rs +++ b/server/src/config.rs @@ -163,7 +163,7 @@ impl RawConfig { opts.optopt("", "port", "Set the server listening port", "SERVER_PORT"); - opts.optopt( + opts.optmulti( "", "token", "Set the token for TUIC authentication. This option can be used multiple times to set multiple tokens.", @@ -212,7 +212,7 @@ impl RawConfig { "AUTHENTICATION_TIMEOUT", ); - opts.optopt( + opts.optmulti( "", "alpn", "Set ALPN protocols that the server accepts. This option can be used multiple times to set multiple ALPN protocols. If not set, the server will not check ALPN at all",