IPv6 support for wireguard (#5059)

* Add ipv6 in configs

* Make v4 latest

* Fix linux

* IPv6 prefix in config

* Fix template of private ip

* Fix clippy

* Fix v6 cidr

* Move from 2001:db8::/32 to fc00::/7 addresses

* Fix version number on conversion
This commit is contained in:
Bogdan-Ștefan Neacşu
2024-11-07 12:31:01 +02:00
committed by GitHub
parent bfd7240dcd
commit 44ae29b06d
31 changed files with 2431 additions and 146 deletions
+1 -13
View File
@@ -265,14 +265,6 @@ pub(crate) struct WireguardArgs {
)]
pub(crate) wireguard_bind_address: Option<SocketAddr>,
/// Private IP address of the wireguard gateway.
/// default: `10.1.0.1`
#[clap(
long,
env = NYMNODE_WG_IP_ARG,
)]
pub(crate) wireguard_private_ip: Option<IpAddr>,
/// Port announced to external clients wishing to connect to the wireguard interface.
/// Useful in the instances where the node is behind a proxy.
#[clap(
@@ -312,12 +304,8 @@ impl WireguardArgs {
section.announced_port = announced_port
}
if let Some(private_ip) = self.wireguard_private_ip {
section.private_ip = private_ip
}
if let Some(private_network_prefix) = self.wireguard_private_network_prefix {
section.private_network_prefix = private_network_prefix
section.private_network_prefix_v4 = private_network_prefix
}
section