Development discussion of WireGuard
 help / color / mirror / Atom feed
* wg-quick (script snippets) for OpenWRT/LEDE
@ 2018-04-03 15:19 vtol
  2018-04-03 15:25 ` Aw: " vtol
  2018-04-09  3:05 ` Yousong Zhou
  0 siblings, 2 replies; 5+ messages in thread
From: vtol @ 2018-04-03 15:19 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/html, Size: 1304 bytes --]

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

* Aw: wg-quick (script snippets) for OpenWRT/LEDE
  2018-04-03 15:19 wg-quick (script snippets) for OpenWRT/LEDE vtol
@ 2018-04-03 15:25 ` vtol
  2018-04-09  3:05 ` Yousong Zhou
  1 sibling, 0 replies; 5+ messages in thread
From: vtol @ 2018-04-03 15:25 UTC (permalink / raw)
  To: wireguard

remailing in plain text 

Hi,

it appears that wg-quick is not provided for OpenWRT/LEDE.

The reason is not really clear to me. As far I understand wg-quick depends on BASH whilst the default shell in OpenWRT/LEDE is ASH.
This however can be easily remidied by installing the BASH package from the OpenWRT/LEDE repo.

OpenWRT/LEDE is utilising netifd for network configuration which is lacking th3 versatility of wg-quick with there script snippets

PRE_UP=( )
POST_UP=( )
PRE_DOWN=( )
POST_DOWN=( )

Is there a way to get those script snippets working in OpenWRT/LEDE as such is required in dynamic/split/kill-switch routing scenarios.

OpenVPN provides a similar script functionality which is however not stripped on the OpenWRT/LEDE repo, respectively it does not require an extra tool package. I find it rather curious that the aforementioned script snippets are not part of wg but rather implemented in wg-quick which then is absent from OpenWRT/LEDE.

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

* Re: wg-quick (script snippets) for OpenWRT/LEDE
  2018-04-03 15:19 wg-quick (script snippets) for OpenWRT/LEDE vtol
  2018-04-03 15:25 ` Aw: " vtol
@ 2018-04-09  3:05 ` Yousong Zhou
  1 sibling, 0 replies; 5+ messages in thread
From: Yousong Zhou @ 2018-04-09  3:05 UTC (permalink / raw)
  To: vtol; +Cc: WireGuard mailing list

On 3 April 2018 at 23:19,  <vtol@gmx.net> wrote:
> Hi,
>
> it appears that wg-quick is not provided for OpenWRT/LEDE.
>
> The reason is not really clear to me. As far I understand wg-quick depends
> on BASH whilst the default shell in OpenWRT/LEDE is ASH.
> This however can be easily remidied by installing the BASH package from the
> OpenWRT/LEDE repo.
>
> OpenWRT/LEDE is utilising netifd for network configuration which is lacking
> th3 versatility of wg-quick with there script snippets
>
> PRE_UP=( )
> POST_UP=( )
> PRE_DOWN=( )
> POST_DOWN=( )
>

POST_UP and POST_DOWN is possible with hotplug scripts in OpenWrt, but
the PRE_xx callback is currently not possible.  As a temporary
workaround, you can try patching locally /lib/netifd/proto/wg.sh to
achieve similar effects, or wrapping wg command with a script (hacky
wacky way)

> Is there a way to get those script snippets working in OpenWRT/LEDE as such
> is required in dynamic/split/kill-switch routing scenarios.
>

Just try installing all those dependencies wg-quick requires, though
after you know enough details about the wg-quick script, you may well
just write your own stripped down version for your own needs.

> OpenVPN provides a similar script functionality which is however not
> stripped on the OpenWRT/LEDE repo, respectively it does not require an extra
> tool package. I find it rather curious that the aforementioned script
> snippets are not part of wg but rather implemented in wg-quick which then is
> absent from OpenWRT/LEDE.
>

OpenVPN and WireGuard is different in this regard.  OpenVPN has a
daemon running while WireGuard depends on the network manager to do
the maintenance things.

                yousong

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

* Aw: wg-quick (script snippets) for OpenWRT/LEDE
@ 2018-04-03 16:33 vtol
  0 siblings, 0 replies; 5+ messages in thread
From: vtol @ 2018-04-03 16:33 UTC (permalink / raw)
  To: wireguard

I am a bit slow with the plain text formatting=2E=2E=2E

Traced this https://lists=2Ezx2c4=2Ecom/pipermail/wireguard/2017-January/0=
00935=2Ehtml back from JAN 2017=2E

The BASH package https://github=2Ecom/openwrt/packages/commits/master/util=
s/bash/patches[https://github=2Ecom/openwrt/packages/commits/master/utils/b=
ash/patches] is available in OpenWRT since at least AUG/SEPT 2014 and could=
 be installed as dependency to wg-quick=2E

How to get wg-quick manually installed into (working in) OpenWRT after hav=
ing installed their BASH package?
=C2=A0
=C2=A0

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

* Aw: wg-quick (script snippets) for OpenWRT/LEDE
@ 2018-04-03 16:31 vtol
  0 siblings, 0 replies; 5+ messages in thread
From: vtol @ 2018-04-03 16:31 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/html, Size: 785 bytes --]

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

end of thread, other threads:[~2018-04-09  2:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 15:19 wg-quick (script snippets) for OpenWRT/LEDE vtol
2018-04-03 15:25 ` Aw: " vtol
2018-04-09  3:05 ` Yousong Zhou
2018-04-03 16:31 Aw: " vtol
2018-04-03 16:33 vtol

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