Skip to content

Commit

Permalink
Remove the VPN plugin options
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Jul 19, 2020
1 parent 5324ab7 commit dc13f3b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/plugin/ss_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ pub fn plugin_cmd(plugin: &PluginConfig, remote: &ServerAddr, local: &SocketAddr
.stdin(Stdio::null());

if let Some(ref opt) = plugin.plugin_opt {
cmd.env("SS_PLUGIN_OPTIONS", opt);
#[cfg(target_os = "android")]
{
// Add VPN flags to the commandline as well
if opt.contains(";V") {
cmd.arg("-V");
}
}
if cfg!(target_os = "android")
{
let mut tmp = opt.clone();
// Add VPN flags to the commandline as well
if tmp.contains(";V") {
cmd.arg("-V");
tmp = tmp.replace(";V", "")
}
cmd.env("SS_PLUGIN_OPTIONS", tmp);
} else {
cmd.env("SS_PLUGIN_OPTIONS", opt);
}
}

cmd
Expand Down

0 comments on commit dc13f3b

Please sign in to comment.