Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: Jacob Schooley <jacob.schooley+wgvpn@gmail.com>,
	wireguard@lists.zx2c4.com
Subject: Re: Android app and command line
Date: Thu, 15 Mar 2018 21:38:23 -0500	[thread overview]
Message-ID: <2598be63-11f3-1e91-a52a-f82f47274eed@sholland.org> (raw)
In-Reply-To: <CAHjFYUJnEvhB27dKcUXLzj-KYK5U+gMLuQORNiiQwG2Zp8E9TQ@mail.gmail.com>

Hello,

On 03/12/18 20:51, Jacob Schooley wrote:
> There is an option in the Android app to enable wg and wg-quick, which will be
> extremely useful to me as most of my VPN stuff is taken care of with Tasker.
> There are two major bugs with this however.

Thanks for the report!

> One is that the app doesn't automatically update the status of wireguard, so the
> switch inside the app won't flip if I use wg-quick up or down until I swipe off
> and reopen the app, and the quick settings toggle won't change.

I've looked into this, and it is unfortunately quite difficult to do. The app
can register to receive notification about network changes, but unfortunately
there's no* way for the app to tell the Android connectivity service that the
WireGuard tunnel exists, so Android can track its state. Even then, wg-quick on
the command line wouldn't easily be able to tell the app about _new_ tunnels.

*without using reflection to access internal framework classes.

> The other is that if I run wg-quick up, then try to bring it down through the
> app or the quick settings toggle, it says "Error bringing down tunnel: Unable to
> configure tunnel (wg-quick returned 2)." So as of now it really doesn't work
> well with tasker because I can't bring it down manually if I need to.

Hmm, that might actually be a bug. I'll look into that.

In the meantime, have you considered using Tasker to kill the app every time you
use wg-quick? Android will restart it and the quick tile will update, plus it
will refresh the state of all known tunnels within the app.

Regards,
Samuel

  reply	other threads:[~2018-03-16  2:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13  1:51 Jacob Schooley
2018-03-16  2:38 ` Samuel Holland [this message]
2018-04-14  2:03   ` Jason A. Donenfeld

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=2598be63-11f3-1e91-a52a-f82f47274eed@sholland.org \
    --to=samuel@sholland.org \
    --cc=jacob.schooley+wgvpn@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).