-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I am trying to develop a bit of python code that will manipulate my wg0.conf to add extra peers and what I like to do is parse the exising file to find:
- The Address, ListenPort and the effective PublicKey from the [Interface] Section (to create a wg0.conf for a peer)
- All the AllowedIP's from all [Peers] section (so I can determine a free one)
So if I start with:
from wireguard_tools import WireguardConfig
with open("wg0.conf") as fh:
config = WireguardConfig.from_wgconfig(fh)
How do I access these values ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels