[PATCH] Implement reading keys from stdin.

Jason A. Donenfeld Jason at zx2c4.com
Fri Feb 14 12:17:48 CET 2020


On Sun, Feb 9, 2020 at 1:15 AM Hristo Venev <hristo at venev.name> wrote:
>
> On Sat, 2020-02-08 at 23:20 +0100, Jason A. Donenfeld wrote:
> > Trying to get a handle on the use case for this.
>
> I am working on a program [1] that configures a WireGuard interface by
> invoking `wg`. Generally there are multiple peers, and some of them may
> have preshared keys.
>
> Currently the most reasonable way to pass keys is to write each one to
> a temporary file. I think passing all of them over stdin is nicer.

Except the command line arguments have length limits you'll hit
anyway. Wouldn't the better way to do this be passing a config file to
`wg setconf wg0 /dev/stdin`?


More information about the WireGuard mailing list