Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Kalin KOZHUHAROV <me.kalin@gmail.com>
To: Barry Scott <barry@barrys-emacs.org>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [PATCH] wg show: Add json output
Date: Tue, 25 Feb 2020 15:50:47 +0100	[thread overview]
Message-ID: <CAKXLc7ca-9vN2bVLaWyPf3td0jCLWCWv3P+PNNcB4rs8pVhrjA@mail.gmail.com> (raw)
In-Reply-To: <219C0F7A-E7F7-46BD-9E38-09D620299053@barrys-emacs.org>

Hi Barry,

Please read the reply below with a smile, it is just friendly sarcasm
underlining my personal view.

On Tue, Feb 25, 2020 at 1:50 AM Barry Scott <barry@barrys-emacs.org> wrote:
> > On 23 Feb 2020, at 12:45, Arti Zirk <arti.zirk@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.
>
... and it doesn't support dark-mode for the matter! Neither has it
autoupdate script!
And no PDF documentation generated by doxygen! And no JNI !

May be it is just a simple & easy, robust tool that does one thing and
does it good and fast?

> 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.
>
So, sarcasm aside, I really think keeping it simple is better.
If you need JSON for some reason, use the script in contrib and patch
if it doesn't work as needed, or suggest another script or way,
without strapping a kitchen sink to the core.
And for tighter integration, use the Netlink API (uapi/wireguard.h) directly.

> The JSON would also provide a nice way to add more attributes
> in the future.
>
Adding "more attributes" is definitely not on the todo list, AFAIK,
and given that in the remote case of adding a secondary output format
(json) it may need to be backward compatible with the default text
output, this is not a reason.
In the sense that if we add a plugin for Alexa to explain a wg output,
auto-magically translating it of course, there is a high chance of it
being only a secondary priority (to the simple text output).

Cheers,
Kalin.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

      reply	other threads:[~2020-02-25 14:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17  3:57 Matthew Oliver
2020-02-17  4:47 ` Matthew Oliver
2020-02-23 11:00   ` Jason A. Donenfeld
2020-02-25 15:49     ` Julian Orth
2020-02-23 12:45   ` Arti Zirk
2020-02-24 19:28     ` Barry Scott
2020-02-25 14:50       ` Kalin KOZHUHAROV [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKXLc7ca-9vN2bVLaWyPf3td0jCLWCWv3P+PNNcB4rs8pVhrjA@mail.gmail.com \
    --to=me.kalin@gmail.com \
    --cc=barry@barrys-emacs.org \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).