Add WireGuard Client to Readme (#44)
* Add README for Wireguard Client * add default protocol flag * wireguard connector support bind device
This commit is contained in:
@@ -114,6 +114,9 @@ example: wg://0.0.0.0:11010/10.14.14.0/24, means the vpn portal is a wireguard s
|
||||
and the vpn client is in network of 10.14.14.0/24"
|
||||
)]
|
||||
vpn_portal: Option<String>,
|
||||
|
||||
#[arg(long, help = "default protocol to use when connecting to peers")]
|
||||
default_protocol: Option<String>,
|
||||
}
|
||||
|
||||
impl From<Cli> for TomlConfigLoader {
|
||||
@@ -238,6 +241,12 @@ impl From<Cli> for TomlConfigLoader {
|
||||
});
|
||||
}
|
||||
|
||||
if cli.default_protocol.is_some() {
|
||||
let mut f = cfg.get_flags();
|
||||
f.default_protocol = cli.default_protocol.as_ref().unwrap().clone();
|
||||
cfg.set_flags(f);
|
||||
}
|
||||
|
||||
cfg
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user