Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.18 KB

README.md

File metadata and controls

44 lines (33 loc) · 1.18 KB

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