Development discussion of WireGuard
 help / color / mirror / Atom feed
* Structure(d) output of wg?
@ 2016-12-14 20:04 Dan Lüdtke
  2016-12-14 21:09 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Lüdtke @ 2016-12-14 20:04 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Hi Jason, everyone,

I'd like to discuss the topic of structured output. I am working on =
luci-app-wireguard* which aims to provide status information via the =
user-friendly LUCI interface in LEDE. While writing code to parse the =
output I realized that I may not be the only one who needs to structure =
wg's output. Would it make sense to add support for structured output =
now and thus prevent/reduce parsers and half-baked solutions popping up =
in higher level software in the future?

Something like wg show --json
[
	{
		interface: "foo"
		private_key: "(hidden)",
		preshared_key: "(hidden)",
		listen_port: "12345",
		peers: [
			{
				public_key: "dfkdjkfjslfkd...",
				bandwith: "...",
				last_handshake: "..."
			},
			{
				public_key: "sdj9ad....",
				allowed_ips: "2001:db8::/64",
				bandwith: "..."
			}
		]
	},
	{
		interface: "foo2",
		...you get the idea...
	}
]

JSON is just one idea because it allows nice structuring. CSV, TSV or =
whatever is lean and easy to implement may be an equally good option. =
While structuring, we could also provide even more structure than the =
usual stdout of wg provides. Candidate for lists: allowed_ips
Candidate for sub-structures: bandwith (rx, tx)

What do you think?

Cheers,

Dan


*: Not to be confused with luci-proto-wireguard, kmod-wireguard, and =
wireguard-tools. They provide functionality and configuration =
interfaces, but not monitoring/fancy output.=

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-14 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 20:04 Structure(d) output of wg? Dan Lüdtke
2016-12-14 21:09 ` Jason A. Donenfeld
2016-12-14 21:16   ` Dan Lüdtke
2016-12-14 21:15     ` Jason A. Donenfeld

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).