diff options
Diffstat (limited to 'mullvad-cli/src')
| -rw-r--r-- | mullvad-cli/src/cmds/relay.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mullvad-cli/src/cmds/relay.rs b/mullvad-cli/src/cmds/relay.rs index 245eda9e91..d119617802 100644 --- a/mullvad-cli/src/cmds/relay.rs +++ b/mullvad-cli/src/cmds/relay.rs @@ -167,6 +167,14 @@ impl Command for Relay { .required(true) ) .arg( + clap::Arg::with_name("transport protocol") + .help("Transport protocol. If TCP is selected, traffic is \ + sent over TCP using a udp-over-tcp proxy") + .long("protocol") + .default_value("any") + .possible_values(&["any", "udp", "tcp"]), + ) + .arg( clap::Arg::with_name("ip version") .long("ipv") .default_value("any") @@ -528,6 +536,7 @@ impl Relay { async fn set_wireguard_constraints(&self, matches: &clap::ArgMatches<'_>) -> Result<()> { let port = parse_port_constraint(matches.value_of("port").unwrap())?; + let protocol = parse_protocol_constraint(matches.value_of("transport protocol").unwrap()); let ip_version = parse_ip_version_constraint(matches.value_of("ip version").unwrap()); let entry_location = parse_entry_location_constraint(matches.values_of("entry location").unwrap()); @@ -537,6 +546,11 @@ impl Relay { NormalRelaySettingsUpdate { wireguard_constraints: Some(WireguardConstraints { port: port.unwrap_or(0) as u32, + protocol: protocol + .option() + .map(|protocol| TransportProtocolConstraint { + protocol: protocol as i32, + }), ip_version: ip_version.option().map(|protocol| IpVersionConstraint { protocol: protocol as i32, }), |
