diff --git a/README.md b/README.md index 0b84ec7..5ea0a00 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ The database stores all client data needed to restore configs: - created/updated timestamps The Kubernetes Secret is derived from the database. Active clients are rendered -into `peers.conf`; exact same-owner/same-group IPv4 pairs are rendered into +into `peers.conf`; exact same-group IPv4 pairs are rendered into `policy.conf`. Clients without a group are isolated from other VPN clients. ## Kubernetes Sync diff --git a/src/vpn.rs b/src/vpn.rs index 8f5929c..0a10ec2 100644 --- a/src/vpn.rs +++ b/src/vpn.rs @@ -242,7 +242,7 @@ pub fn render_peer_secret(clients: &[VpnClient]) -> String { pub fn render_client_policy(clients: &[VpnClient], cidr: &str) -> Result { parse_ipv4_cidr(cidr)?; - let mut groups = BTreeMap::<(i64, String), Vec>::new(); + let mut groups = BTreeMap::>::new(); for client in clients.iter().filter(|client| client.enabled()) { let Some(group_name) = client.group_name_str() else { continue; @@ -262,7 +262,7 @@ pub fn render_client_policy(clients: &[VpnClient], cidr: &str) -> Result