diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-04-30 18:12:32 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-05-05 13:02:29 +0200 |
| commit | c026f50ce79454596e247b4027a885df5df0d212 (patch) | |
| tree | 34aace622a62fcc6f1fb043d966cc1cf0b4e4f27 | |
| parent | 72c6b6cb88427a114dd7a20d4255b2c6b1826145 (diff) | |
| download | mullvadvpn-c026f50ce79454596e247b4027a885df5df0d212.tar.xz mullvadvpn-c026f50ce79454596e247b4027a885df5df0d212.zip | |
Add 'auth' option to masque-client
| -rw-r--r-- | mullvad-masque-proxy/examples/masque-client.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mullvad-masque-proxy/examples/masque-client.rs b/mullvad-masque-proxy/examples/masque-client.rs index f873b14b2f..776afa8abb 100644 --- a/mullvad-masque-proxy/examples/masque-client.rs +++ b/mullvad-masque-proxy/examples/masque-client.rs @@ -44,6 +44,10 @@ pub struct ClientArgs { /// Inactivity happens when no data is sent over the proxy. #[arg(long, short = 'i', value_parser = duration_from_seconds)] idle_timeout: Option<Duration>, + + /// Authorization header value to set + #[arg(long, default_value = "Bearer test")] + auth: Option<String>, } /// Parse a duration from a decimal number of seconds @@ -69,6 +73,7 @@ async fn main() { #[cfg(target_os = "linux")] fwmark, idle_timeout, + auth, } = ClientArgs::parse(); let tls_config = match root_cert_path { @@ -94,7 +99,8 @@ async fn main() { .target_addr(target_addr) .mtu(mtu) .tls_config(tls_config) - .idle_timeout(idle_timeout); + .idle_timeout(idle_timeout) + .auth_header(auth); #[cfg(target_os = "linux")] let config = config.fwmark(fwmark); |
