Add Key type

This commit is contained in:
Andrey Golovizin 2023-04-10 22:44:47 +02:00
parent c282177afb
commit d9080af78a
4 changed files with 48 additions and 24 deletions

View file

@ -125,7 +125,7 @@ fn write_config(
keys: &WireguardKeyPair,
) -> Result<(), anyhow::Error> {
writeln!(output, "[Interface]")?;
writeln!(output, "PrivateKey = {}", &keys.private_key)?;
writeln!(output, "PrivateKey = {}", &keys.private_key.to_base64())?;
let allowed_addresses = if config_opts.no_ipv6 {
vec![IpAddr::V4(config.ipv4.address)]
} else {