Wireguard Conf
Easy to use library for creating wireguard configs.
Installation
Install wireguard-conf
cargo add wireguard-conf
Usage
The best way to understand library: Quickstart!
More usage examples you can find in tests/tutorial.rs, tests folder and documentation examples on docs.rs.
use *;
use as_ipnet;
let peer = builder
.allowed_ips
.build;
let interface = builder
.address
.peers
.build;
// to export configs, use `println!()`, `writeln!()`, `.to_string()`, etc.
println!;
println!;
println!;
println!;
Features
amneziawg: adds support for generating/using AmneziaWG obfuscation values.serde: adds implementions of [serde::Serialize] and [serde::Deserialize] for all structs.
Contributing
-
Fork & clone
-
Install Rust, Cargo and just.
Or start nix shell:
direnv allowor justnix develop -
Make changes
-
Format and lint code:
just fmt just lint # or fix automatically: just lint-fix -
Commit changes (use Conventional commits)
git commit -m "feat: did something" -
Send
patchesPR