From 92bea1379f7f9721dc2e745d023d841d58b384ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3rebe=20-=20Romain=20GERARD?= Date: Sat, 27 Jan 2024 13:25:55 +0100 Subject: [PATCH] chore: change flag from http-headers-file-path to http-headers-file --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4a0bc8b..7453ed4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -200,7 +200,7 @@ struct Client { /// It overrides http_headers specified from command line. /// File is read everytime and file format must contains lines with `HEADER_NAME: HEADER_VALUE` #[arg(long, value_name = "FILE_PATH", verbatim_doc_comment)] - http_headers_file_path: Option, + http_headers_file: Option, /// Address of the wstunnel server /// You can either use websocket or http2 as transport protocol. Use websocket if you are unsure. @@ -703,7 +703,7 @@ async fn main() { }; HeaderValue::from_str(&host).unwrap() }; - if let Some(path) = &args.http_headers_file_path { + if let Some(path) = &args.http_headers_file { if !path.exists() { panic!("http headers file does not exists: {}", path.display()); } @@ -720,7 +720,7 @@ async fn main() { http_upgrade_path_prefix: args.http_upgrade_path_prefix, http_upgrade_credentials: args.http_upgrade_credentials, http_headers: args.http_headers.into_iter().filter(|(k, _)| k != HOST).collect(), - http_headers_file: args.http_headers_file_path, + http_headers_file: args.http_headers_file, http_header_host: host_header, timeout_connect: Duration::from_secs(10), websocket_ping_frequency: args.websocket_ping_frequency_sec.unwrap_or(Duration::from_secs(30)),