Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Lucian Cristian <luci@createc.ro>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: wg-quick add_route
Date: Fri, 27 Oct 2017 21:48:01 +0200	[thread overview]
Message-ID: <CAHmME9o-4CNR6TD10j1zzAt1VCR95xEs076AnbstxSto3CQYew@mail.gmail.com> (raw)
In-Reply-To: <079f400c-a2ed-9f11-c8e1-a7a7da1074b9@createc.ro>

Hey Lucian,

If you're using WireGuard for real purposes and not just for a quick
"turn it on turn it off" situation with a remote endpoint, then
wg-quick probably isn't the right tool for you. Instead, I think
you'll be better off just calling wg(8) and ip(8) normally.

The usage of WireGuard in general is supposed to be trivial enough
that you can script this without too much fuss. After all, wg-quick
itself is just a silly little bash script trivially wrapping some
common functionality.

I think if we go down the road of adding a nob for every possible
configuration, you'll wind up having to spend time learning about
which nobs map to which sequence of commands, which will be more
complex than just doing it yourself.

So, I think probably I wouldn't accept such a patch, and you'd be
better off just scripting 4 lines yourself:

ip link add wg0 type wireguard
wg setconf wg0 path/to/conf.conf
ip addr add 10.0.0.1/24 dev wg0
ip link set wg0 up

Especially if you're using rip+eigrp, you already know what you're
doing, and this shouldn't be too difficult for you.

I'm happy to bikeshed this if you'd like; other opinions are always
interesting. But my initial instinct is that needless complexity is
needless.

Jason

  reply	other threads:[~2017-10-27 19:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 17:53 Lucian Cristian
2017-10-27 17:23 ` Fwd: " Lucian Cristian
2017-10-27 19:48   ` Jason A. Donenfeld [this message]
2017-10-27 20:59     ` Lucian Cristian

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=CAHmME9o-4CNR6TD10j1zzAt1VCR95xEs076AnbstxSto3CQYew@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=luci@createc.ro \
    --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).