wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Svet Bajlekov <tomatoman@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: wireguard-go: custom socket dir through environment variable
Date: Tue, 27 Nov 2018 00:15:45 +0000	[thread overview]
Message-ID: <CAKsyV3EivKOY_Gu2OkWvz6d2ZtBHW-S6-WxA0jK63gG8BV-Bgg@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1104 bytes --]

Greetings,
In the userspace implementation, would there be any interest in making the
socket directory (/var/run/wireguard) customizable via an environment
variable?

My use case for this is that I'd like to install and use WireGuard as a
snapcraft package*, and the respective confinement restricts access to
/var/run. Either way, having the ability to customize the path seems like
sensible functionality.

The code change itself is of course pretty simple. I had a go at it here (
https://github.com/WireGuard/wireguard-go/compare/master...svet-b:0.0.20181018)
where an optional WG_SOCKET_DIR variable is introduced - and what I did
works, though I have to admit that it's the first time I've ever written
anything in go, so what I did is pretty ugly. Therefore I figured I'd reach
out on this mailing list rather than submit a pull request.

Thanks, and keep up the great project!
Svet

*Yes, I understand that running the userspace implementation in Linux is
not exactly ideal. I'm doing it on devices where I can't install kernel
modules, and where squeezing out performance is not that important.

[-- Attachment #1.2: Type: text/html, Size: 1383 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

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

                 reply	other threads:[~2018-12-06 23:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAKsyV3EivKOY_Gu2OkWvz6d2ZtBHW-S6-WxA0jK63gG8BV-Bgg@mail.gmail.com \
    --to=tomatoman@gmail.com \
    --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).