Creating VpnCredentials and EapOptions requires setting all fields manually, which is error-prone.
We could do something like this:
let creds = VpnCredentials::builder()
.name("MyVPN")
.wireguard()
.gateway("vpn.example.com:51820")
.private_key("...")
.address("10.0.0.2/24")
.add_peer(peer)
.build()?;
Creating
VpnCredentialsandEapOptionsrequires setting all fields manually, which is error-prone.We could do something like this: