From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: eric@bluelinelabs.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id b9db1e2f for ; Wed, 4 Jul 2018 22:13:00 +0000 (UTC) Received: from mail-qt0-x232.google.com (mail-qt0-x232.google.com [IPv6:2607:f8b0:400d:c0d::232]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id c78800c2 for ; Wed, 4 Jul 2018 22:13:00 +0000 (UTC) Received: by mail-qt0-x232.google.com with SMTP id f18-v6so5633030qtp.10 for ; Wed, 04 Jul 2018 15:19:37 -0700 (PDT) From: Eric Kuck In-Reply-To: References: <72472182-2f17-ff6d-f76c-f0fa6c98d45e@sholland.org> MIME-Version: 1.0 Date: Wed, 4 Jul 2018 18:19:36 -0400 Message-ID: Subject: Re: Android app whitelist/blacklist feature To: "Jason A. Donenfeld" , Samuel Holland Content-Type: multipart/alternative; boundary="000000000000778650057033d327" Cc: WireGuard mailing list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --000000000000778650057033d327 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable A first pass that only works with GoBackend has just been pushed. Feel free to make suggestions or requests. This is the first time I=E2=80=99ve used databinding for more than just a findViewById substitute, so it=E2=80=99s v= ery possible I didn=E2=80=99t do something canonically. On July 3, 2018 at 1:17:27 PM, Jason A. Donenfeld (jason@zx2c4.com) wrote: On Tue, Jul 3, 2018 at 8:12 PM Samuel Holland wrote: > Right, trying to make it a global setting requires either some sort of > out-of-band way to pass the information to wg-quick, or rewriting the > configuration file every time the tunnel is brought up. > > Since from netd's point of view, this is a per-network setting anyway, I agree > it makes sense to configure it per-tunnel. ExemptedApplications works as a > configuration key, though I prefer ExcludedApplications--the application isn't > just not required to use the tunnel, it's not allowed to use the tunnel. > > In that case, here are my UI suggestions: > - Add a button in the editor that switches to a fragment or pops up a Dialog > similar to a MultiSelectListPreference. > - For consistency, checked means excluded -- everything defaults to unchecked. > - The package names of excluded apps are put in the > com.wireguard.config.Interface, and wg-quick handles package name to uid > translation. > > How does that sound? All of that sounds right-on to me, and I think you're right that ExcludedApplications is the better key. (This also provides a good basis for later adding a "ExcludeLocalNetwork" option.) Eric's git access should be all setup now, so we can watch the commits coming on in. --000000000000778650057033d327 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
A first pass that only works with GoBackend has j= ust been pushed. Feel free to make suggestions or requests. This is the fir= st time I=E2=80=99ve used databinding for more than just a findViewById sub= stitute, so it=E2=80=99s very possible I didn=E2=80=99t do something canoni= cally.


On July 3, 2018 at 1:17:27 PM, Ja= son A. Donenfeld (jason@zx2c4.com) w= rote:

On Tue, Jul 3, 2018 at 8:12 PM Samuel Holland <samuel@sholland.org> wrote:
> Right, trying to make it a global setting requires either some sor= t of
> out-of-band way to pass the information to wg-quick, or rewriting = the
> configuration file every time the tunnel is brought up.
>
> Since from netd's point of view, this is a per-network setting= anyway, I agree
> it makes sense to configure it per-tunnel. ExemptedApplications wo= rks as a
> configuration key, though I prefer ExcludedApplications--the appli= cation isn't
> just not required to use the tunnel, it's not allowed to use t= he tunnel.
>
> In that case, here are my UI suggestions:
> - Add a button in the editor that switches to a fragment or pops u= p a Dialog
> similar to a MultiSelectListPreference.
> - For consistency, checked means excluded -- everything defaults t= o unchecked.
> - The package names of excluded apps are put in the
> com.wireguard.config.Interface, and wg-quick handles package name = to uid
> translation.
>
> How does that sound?

All of that sounds right-on to me, and I think you're right that
ExcludedApplications is the better key.

(This also provides a good basis for later adding a
"ExcludeLocalNetwork" option.)

Eric's git access should be all setup now, so we can watch the
commits coming on in.
--000000000000778650057033d327--