Hello Nicolas, been there, asked that. The answer was negative. I know, it is no fun to parse. See here how I worked around it: -> https://github.com/danrl/lede-luci/blob/58833aa2df97ba93a9512f3b0c428cf558fa2235/applications/luci-app-wireguard/luasrc/view/wireguard.htm
JSON output would have saved me about 100+ lines of LUA code. Still considering patching the wg util. Hopefully, this LUA code helps you to get started. Feel free to share your solution, I am still interested in getting JSON out of wg for some other project. Cheers, Dan > On 17 Feb 2017, at 11:25, nicolas prochazka <[email protected]> > wrote: > > hello, > wg show, showconf .... output format is not easy to parse. > Can you add a json output , with all information about peers , conf ( > endpoint, pubkey,handshake ... ) in a single line > > Regards, > Nicolas Prochazka > _______________________________________________ > WireGuard mailing list > [email protected] > https://lists.zx2c4.com/mailman/listinfo/wireguard _______________________________________________ WireGuard mailing list [email protected] https://lists.zx2c4.com/mailman/listinfo/wireguard
