summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src/cmds
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2022-04-14 13:32:01 +0200
committerLinus Färnstrand <linus@mullvad.net>2022-04-14 13:32:01 +0200
commitda4e9e8cea4a2c10370842dc9f404d41190fd919 (patch)
tree092776ce088982c061b530be9a1e72d551404587 /mullvad-cli/src/cmds
parent3bace688e87bc4836d5e8e9ce5306ee14f0f5c78 (diff)
parent6e6d7ea7f7fbe389824e55112847b263e1542005 (diff)
downloadmullvadvpn-da4e9e8cea4a2c10370842dc9f404d41190fd919.tar.xz
mullvadvpn-da4e9e8cea4a2c10370842dc9f404d41190fd919.zip
Merge branch 'clarify-cli-obfuscation-and-bridges'
Diffstat (limited to 'mullvad-cli/src/cmds')
-rw-r--r--mullvad-cli/src/cmds/bridge.rs7
-rw-r--r--mullvad-cli/src/cmds/obfuscation.rs37
-rw-r--r--mullvad-cli/src/cmds/split_tunnel/linux.rs2
3 files changed, 27 insertions, 19 deletions
diff --git a/mullvad-cli/src/cmds/bridge.rs b/mullvad-cli/src/cmds/bridge.rs
index e1b0056a15..40afc93b3b 100644
--- a/mullvad-cli/src/cmds/bridge.rs
+++ b/mullvad-cli/src/cmds/bridge.rs
@@ -18,7 +18,12 @@ impl Command for Bridge {
fn clap_subcommand(&self) -> clap::App<'static> {
clap::App::new(self.name())
- .about("Manage use of bridges")
+ .about(
+ "Manage use of bridges, socks proxies and Shadowsocks for OpenVPN. \
+ Can make OpenVPN tunnels use Shadowsocks via one of the Mullvad bridge servers. \
+ Can also make OpenVPN connect through any custom SOCKS5 proxy. \
+ These settings also affect how the app reaches the API over Shadowsocks.",
+ )
.setting(clap::AppSettings::SubcommandRequiredElseHelp)
.subcommand(create_bridge_set_subcommand())
.subcommand(clap::App::new("get").about("Get current bridge settings and state"))
diff --git a/mullvad-cli/src/cmds/obfuscation.rs b/mullvad-cli/src/cmds/obfuscation.rs
index 99887db555..3f015c896e 100644
--- a/mullvad-cli/src/cmds/obfuscation.rs
+++ b/mullvad-cli/src/cmds/obfuscation.rs
@@ -16,7 +16,11 @@ impl Command for Obfuscation {
fn clap_subcommand(&self) -> clap::App<'static> {
clap::App::new(self.name())
- .about("Manage use of obfuscators")
+ .about(
+ "Manage use of obfuscation protocols for WireGuard. \
+ Can make WireGuard traffic look like something else on the network. \
+ Helps circumvent censorship and to establish a tunnel when on restricted networks",
+ )
.setting(clap::AppSettings::SubcommandRequiredElseHelp)
.subcommand(create_obfuscation_set_subcommand())
.subcommand(create_obfuscation_get_subcommand())
@@ -25,7 +29,7 @@ impl Command for Obfuscation {
async fn run(&self, matches: &clap::ArgMatches) -> Result<()> {
match matches.subcommand() {
Some(("set", set_matches)) => Self::handle_set(set_matches).await,
- Some(("get", get_matches)) => Self::handle_get(get_matches).await,
+ Some(("get", _get_matches)) => Self::handle_get().await,
_ => unreachable!("unhandled command"),
}
}
@@ -46,7 +50,7 @@ impl Obfuscation {
};
Self::set_obfuscation_settings(&mut rpc, &settings).await?;
}
- Some(("udp2tcp-settings", settings_matches)) => {
+ Some(("udp2tcp", settings_matches)) => {
let port: String = settings_matches.value_of_t_or_exit("port");
let mut rpc = new_rpc_client().await?;
let mut settings = Self::get_obfuscation_settings(&mut rpc).await?;
@@ -64,13 +68,14 @@ impl Obfuscation {
Ok(())
}
- async fn handle_get(matches: &clap::ArgMatches) -> Result<()> {
+ async fn handle_get() -> Result<()> {
let mut rpc = new_rpc_client().await?;
- let settings = Self::get_obfuscation_settings(&mut rpc).await?;
- match matches.subcommand() {
- Some(("udp2tcp-settings", _)) => println!("Udp2Tcp: {}", settings.udp2tcp),
- _ => println!("Current settings: {}", settings),
- }
+ let obfuscation_settings = Self::get_obfuscation_settings(&mut rpc).await?;
+ println!(
+ "Obfuscation mode: {}",
+ obfuscation_settings.selected_obfuscation
+ );
+ println!("udp2tcp settings: {}", obfuscation_settings.udp2tcp);
Ok(())
}
@@ -105,14 +110,17 @@ fn create_obfuscation_set_subcommand() -> clap::App<'static> {
.subcommand(
clap::App::new("mode").about("Set obfuscation mode").arg(
clap::Arg::new("mode")
- .help("Specifies what kind of obfuscation should be used, if any")
+ .help(
+ "Specifies if obfuscation should be used with WireGuard connections. \
+ And if so, what obfuscation protocol it should use.",
+ )
.required(true)
.index(1)
.possible_values(&["auto", "off", "udp2tcp"]),
),
)
.subcommand(
- clap::App::new("udp2tcp-settings")
+ clap::App::new("udp2tcp")
.about("Specifies the config for the udp2tcp obfuscator")
.setting(clap::AppSettings::ArgRequiredElseHelp)
.arg(
@@ -125,10 +133,5 @@ fn create_obfuscation_set_subcommand() -> clap::App<'static> {
}
fn create_obfuscation_get_subcommand() -> clap::App<'static> {
- clap::App::new("get")
- .about("Get obfuscation settings")
- .subcommand(
- clap::App::new("udp2tcp-settings")
- .about("Specifies the config for the udp2tcp obfuscator"),
- )
+ clap::App::new("get").about("Get current obfuscation settings")
}
diff --git a/mullvad-cli/src/cmds/split_tunnel/linux.rs b/mullvad-cli/src/cmds/split_tunnel/linux.rs
index 3480f27fb0..03ee913b3e 100644
--- a/mullvad-cli/src/cmds/split_tunnel/linux.rs
+++ b/mullvad-cli/src/cmds/split_tunnel/linux.rs
@@ -12,7 +12,7 @@ impl Command for SplitTunnel {
clap::App::new(self.name())
.about(
"Manage split tunneling. To launch applications outside \
- the tunnel, use the program 'mullvad-exclude'.",
+ the tunnel, use the program 'mullvad-exclude' instead of this command.",
)
.setting(clap::AppSettings::SubcommandRequiredElseHelp)
.subcommand(create_pid_subcommand())