You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
vrein 7449287b57 Update readme 11 months ago
assets Upd image 11 months ago
LICENSE Added license 11 months ago
README.md Update readme 11 months ago
wgnames.awk Support invoking wgnames directly 11 months ago

README.md

WGnames

Wireguard human readable peer names / description

With description
with_description

Without description
without_description

Description

A little awk wrapper for adding description to wg peer list
For now, it reads comfiguration file from /etc/wireguard/wg0server.conf
and should be invoked like ./wgnames.awk

Suported commands:
./wgnames.awk showconf <interface>
this will print wg showconf <interface> with #Description included

Configuration

My peer list looks like this

[Peer]
#Description = vrein's pc [tokk]
PublicKey = ARHSU/VoiTjh3JD3jXnb8SFIIvzxRNglQphuwR/a9zQ=
AllowedIPs = 10.0.0.3/32, xxxx:xxxx:3::3/128, 192.168.122.0/24


[Peer]
#Description = vrein's laptop [hopper]
PublicKey = KOx72CQCbjcWCpWm0Etq8erI+my81eR+RqyayqhZkSo=
AllowedIPs = 10.0.0.4/32, xxxx:xxxx:3::4/128


[Peer]
#Description = vrein's phone [ane-lx1]
PublicKey = 9YxWr6APbmwX+CNasZJrKhmOwQnZKAJKTVSf+qlyoXA=
AllowedIPs = 10.0.0.5/32, xxxx:xxxx:3::5/128


[Peer]
#Description = vrein's phone [oukitel]
PublicKey = /S9uj08YKXYbDkkKB8xy/ABy1CIMVQdq7B4rAZdL3RU=
AllowedIPs = 10.0.0.6/32, xxxx:xxxx:3::6/128