Wireguard Conf
Easy to use library for creating wireguard configs.
Installation
Install wireguard-conf and ipnet (for parsing ip networks)
cargo add wireguard-conf ipnet
Usage
More usage examples in tests and on docs.rs
use *;
use as_ipnet;
use Ipv4Net;
// create peer:
let peer = new
.add_allowed_ip
.build;
// create interface with that peer:
let interface = new
.address
.add_peer
.build;
// to export configs, use `println!()`, `writeln!()`, `.to_string()`, etc.
println!;
println!;
println!;
println!;