[PATCH] wg show: Add json output

Barry Scott barry at barrys-emacs.org
Mon Feb 24 20:28:07 CET 2020



> On 23 Feb 2020, at 12:45, Arti Zirk <arti.zirk at gmail.com> wrote:
> 
> On E, 2020-02-17 at 15:47 +1100, Matthew Oliver wrote:
>> Someone asked about this in the IRC channel, so quickly wrote up a
>> patch to add it. No pressure if you do/don't want to merge it :)
> 
> If you have wireguard-tools package installed then it should be
> possible to use the incldued wg-json script to do the same
> 
>  sudo /usr/share/wireguard-tools/examples/json/wg-json

When I built my tools in python on top of the wg command I was
please to see a machine interface, but find the \t separated list
of values odd to find in a modern app.

I think it would be a good addition to have the JSON output
without the need to use a contrib script. Many text commands
output in JSON or XML for ease of interfacing.

The JSON would also provide a nice way to add more attributes
in the future.

Barry



More information about the WireGuard mailing list