WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* Android app whitelist/blacklist feature
@ 2018-07-02 20:35 Eric Kuck
  2018-07-02 21:43 ` Samuel Holland
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Kuck @ 2018-07-02 20:35 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/plain, Size: 2081 bytes --]

I’d like to make a contribution to the Android app, but would like to know
if this is something that would actually get merged before I go through all
the effort. What I’d like to do is add an exceptions list (apps that will
not be routed through the Wireguard interface). The rationale for this
being that some apps simply don’t work with Wireguard. For example, the use
of a Wireguard VPN with custom DNS breaks WearOS watches due to Google
hardcoding the use of the 8.8.8.8 DNS server. Another example is that
Netflix doesn’t work when routed through my VPN server since they know it’s
a DigitalOcean instance, but works fine without the VPN enabled. Another
example is that there’s often no reason to route data-heavy video apps
through your VPN server. Rather than turning the VPN on my phone off to use
my wearable or to watch something on my phone, I’d like to be able to opt
those apps out of using the VPN at all. I’m sure there are many more
examples of apps that simply don’t need to go through a VPN, as no
confidential information is passed through them.

My proposal is to add another Fragment that’s just a list of all apps
installed on the phone with check boxes next to them. If the checkbox is
checked, that app will be routed through Wireguard. If not, it will be free
to bypass the VPN. Naturally, all apps will be default to being checked.
This is an easy change to make for the GoBackend implementation
using VpnService.Builder.addDisallowedApplication(<packageName>), but would
likely be pretty complicated to add to WgQuickBackend. Perhaps this is
something that would only be possible for GoBackend users.

Any thoughts on this? I have everything working locally by simply adding
these two hardcoded lines to GoBackend.java:

            builder.addDisallowedApplication("com.netflix.mediaclient");

builder.addDisallowedApplication("com.google.android.wearable.app”);

but I would like to make this more configurable and available to the rest
of Wireguard users if you’re agreeable to it. Thanks.

[-- Attachment #2: Type: text/html, Size: 2851 bytes --]

<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="color:rgb(0,0,0);margin:0px"><div id="bloop_customfont" style="margin:0px"><font face="Helvetica">I’d like to make a contribution to the Android app, but would like to know if this is something that would actually get merged before I go through all the effort. What I’d like to do is add an exceptions list (apps that will not be routed through the Wireguard interface). The rationale for this being that some apps simply don’t work with Wireguard. For example, the use of a Wireguard VPN with custom DNS breaks WearOS watches due to Google hardcoding the use of the 8.8.8.8 DNS server. Another example is that Netflix doesn’t work when routed through my VPN server since they know it’s a DigitalOcean instance, but works fine without the VPN enabled. Another example is that there’s often no reason to route data-heavy video apps through your VPN server. Rather than turning the VPN on my phone off to use my wearable or to watch something on my phone, I’d like to be able to opt those apps out of using the VPN at all. I’m sure there are many more examples of apps that simply don’t need to go through a VPN, as no confidential information is passed through them.</font></div><div><font face="Helvetica"><br></font></div><font face="Helvetica">My proposal is to add another Fragment that’s just a list of all apps installed on the phone with check boxes next to them. If the checkbox is checked, that app will be routed through Wireguard. If not, it will be free to bypass the VPN. Naturally, all apps will be default to being checked. This is an easy change to make for the GoBackend implementation using VpnService.Builder.addDisallowedApplication(&lt;packageName&gt;), but would likely be pretty complicated to add to WgQuickBackend. Perhaps this is something that would only be possible for GoBackend users.</font><div><font face="Helvetica"><br></font></div><div><font face="Helvetica">Any thoughts on this? I have everything working locally by simply adding these two hardcoded lines to GoBackend.java:</font></div><div><font face="Helvetica"><br></font></div><div><div><font face="Helvetica">            builder.addDisallowedApplication(&quot;com.netflix.mediaclient&quot;);</font></div><div><font face="Helvetica">            builder.addDisallowedApplication(&quot;com.google.android.wearable.app”);</font></div><div><font face="Helvetica"><br></font></div><div><font face="Helvetica">but I would like to make this more configurable and available to the rest of Wireguard users if you’re agreeable to it. Thanks.</font></div></div></div><font face="Helvetica"><br></font><div id="bloop_sign_1530563587386675712" class="bloop_sign"></div></body></html>

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

* Re: Android app whitelist/blacklist feature
  2018-07-02 20:35 Android app whitelist/blacklist feature Eric Kuck
@ 2018-07-02 21:43 ` Samuel Holland
  2018-07-03  0:22   ` Eric Kuck
  0 siblings, 1 reply; 11+ messages in thread
From: Samuel Holland @ 2018-07-02 21:43 UTC (permalink / raw)
  To: Eric Kuck, wireguard

Hello Eric,

On 07/02/18 15:35, Eric Kuck wrote:
> I’d like to make a contribution to the Android app, but would like to know if
> this is something that would actually get merged before I go through all the
> effort. What I’d like to do is add an exceptions list (apps that will not be
> routed through the Wireguard interface). The rationale for this being that 
> some apps simply don’t work with Wireguard. For example, the use of a 
> Wireguard VPN with custom DNS breaks WearOS watches due to Google hardcoding 
> the use of the 8.8.8.8 DNS server. Another example is that Netflix doesn’t 
> work when routed through my VPN server since they know it’s a DigitalOcean 
> instance, but works fine without the VPN enabled. Another example is that 
> there’s often no reason to route data-heavy video apps through your VPN 
> server. Rather than turning the VPN on my phone off to use my wearable or to 
> watch something on my phone, I’d like to be able to opt those apps out of 
> using the VPN at all. I’m sure there are many more examples of apps that 
> simply don’t need to go through a VPN, as no confidential information is 
> passed through them.

This sounds like a generally useful feature.

> My proposal is to add another Fragment that’s just a list of all apps 
> installed on the phone with check boxes next to them. If the checkbox is 
> checked, that app will be routed through Wireguard. If not, it will be free 
> to bypass the VPN. Naturally, all apps will be default to being checked.

If you base the UI on DialogPreference or MultiSelectListPreference, Android
will take care of persisting the setting for you, and it would be easy to add to
the settings page.

> This is an easy change to make for the GoBackend implementation using 
> VpnService.Builder.addDisallowedApplication(<packageName>), but would likely 
> be pretty complicated to add to WgQuickBackend. Perhaps this is something 
> that would only be possible for GoBackend users.

For WgQuickBackend, we'd need to modify the set_users function[1] in the
wg-quick "script" to take a dynamic list of user IDs instead of hard coding it.
PackageManager should provide us the UIDs of other applications. I'm not sure
the best way to communicate the ID list from the app to the script. Jason, thoughts?

> Any thoughts on this? I have everything working locally by simply adding 
> these two hardcoded lines to GoBackend.java:
> 
> builder.addDisallowedApplication("com.netflix.mediaclient"); 
> builder.addDisallowedApplication("com.google.android.wearable.app”);
> 
> but I would like to make this more configurable and available to the rest of
>  Wireguard users if you’re agreeable to it. Thanks.

Thank you,
Samuel

[1]:
https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick/android.c?id=dfd9827d5b08c506522bb3762cd3b0dbac640bbc#n291

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

* Re: Android app whitelist/blacklist feature
  2018-07-02 21:43 ` Samuel Holland
@ 2018-07-03  0:22   ` Eric Kuck
  2018-07-03  2:21     ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Kuck @ 2018-07-03  0:22 UTC (permalink / raw)
  To: Samuel Holland, wireguard

[-- Attachment #1: Type: text/plain, Size: 3507 bytes --]

Excellent. I unfortunately haven’t done any C programming for almost a
decade and have never done any kind of kernel development, so I’m not going
to be any help adding this functionality to the wg-quick implementation. If
I were to do the work I initially proposed (new fragment + GoBackend
implementation), would this be enough to get merged? If so, would it be
better if I simply disabled the new fragment for custom kernel users or if
I left a placeholder assuming someone else can add the missing
implementation?


On July 2, 2018 at 4:43:53 PM, Samuel Holland (samuel@sholland.org) wrote:

Hello Eric,

On 07/02/18 15:35, Eric Kuck wrote:
> I’d like to make a contribution to the Android app, but would like to
know if
> this is something that would actually get merged before I go through all
the
> effort. What I’d like to do is add an exceptions list (apps that will not
be
> routed through the Wireguard interface). The rationale for this being
that
> some apps simply don’t work with Wireguard. For example, the use of a
> Wireguard VPN with custom DNS breaks WearOS watches due to Google
hardcoding
> the use of the 8.8.8.8 DNS server. Another example is that Netflix
doesn’t
> work when routed through my VPN server since they know it’s a
DigitalOcean
> instance, but works fine without the VPN enabled. Another example is that
> there’s often no reason to route data-heavy video apps through your VPN
> server. Rather than turning the VPN on my phone off to use my wearable or
to
> watch something on my phone, I’d like to be able to opt those apps out of
> using the VPN at all. I’m sure there are many more examples of apps that
> simply don’t need to go through a VPN, as no confidential information is
> passed through them.

This sounds like a generally useful feature.

> My proposal is to add another Fragment that’s just a list of all apps
> installed on the phone with check boxes next to them. If the checkbox is
> checked, that app will be routed through Wireguard. If not, it will be
free
> to bypass the VPN. Naturally, all apps will be default to being checked.

If you base the UI on DialogPreference or MultiSelectListPreference,
Android
will take care of persisting the setting for you, and it would be easy to
add to
the settings page.

> This is an easy change to make for the GoBackend implementation using
> VpnService.Builder.addDisallowedApplication(<packageName>), but would
likely
> be pretty complicated to add to WgQuickBackend. Perhaps this is something
> that would only be possible for GoBackend users.

For WgQuickBackend, we'd need to modify the set_users function[1] in the
wg-quick "script" to take a dynamic list of user IDs instead of hard coding
it.
PackageManager should provide us the UIDs of other applications. I'm not
sure
the best way to communicate the ID list from the app to the script. Jason,
thoughts?

> Any thoughts on this? I have everything working locally by simply adding
> these two hardcoded lines to GoBackend.java:
>
> builder.addDisallowedApplication("com.netflix.mediaclient");
> builder.addDisallowedApplication("com.google.android.wearable.app”);
>
> but I would like to make this more configurable and available to the rest
of
> Wireguard users if you’re agreeable to it. Thanks.

Thank you,
Samuel

[1]:
https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick/android.c?id=dfd9827d5b08c506522bb3762cd3b0dbac640bbc#n291

[-- Attachment #2: Type: text/html, Size: 4506 bytes --]

<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Excellent. I unfortunately haven’t done any C programming for almost a decade and have never done any kind of kernel development, so I’m not going to be any help adding this functionality to the wg-quick implementation. If I were to do the work I initially proposed (new fragment + GoBackend implementation), would this be enough to get merged? If so, would it be better if I simply disabled the new fragment for custom kernel users or if I left a placeholder assuming someone else can add the missing implementation?</div> <br> <div id="bloop_sign_1530577058338650880" class="bloop_sign"></div> <br><p class="airmail_on">On July 2, 2018 at 4:43:53 PM, Samuel Holland (<a href="mailto:samuel@sholland.org">samuel@sholland.org</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Hello Eric,
<br>
<br>On 07/02/18 15:35, Eric Kuck wrote:
<br>&gt; I’d like to make a contribution to the Android app, but would like to know if
<br>&gt; this is something that would actually get merged before I go through all the
<br>&gt; effort. What I’d like to do is add an exceptions list (apps that will not be
<br>&gt; routed through the Wireguard interface). The rationale for this being that  
<br>&gt; some apps simply don’t work with Wireguard. For example, the use of a  
<br>&gt; Wireguard VPN with custom DNS breaks WearOS watches due to Google hardcoding  
<br>&gt; the use of the 8.8.8.8 DNS server. Another example is that Netflix doesn’t  
<br>&gt; work when routed through my VPN server since they know it’s a DigitalOcean  
<br>&gt; instance, but works fine without the VPN enabled. Another example is that  
<br>&gt; there’s often no reason to route data-heavy video apps through your VPN  
<br>&gt; server. Rather than turning the VPN on my phone off to use my wearable or to  
<br>&gt; watch something on my phone, I’d like to be able to opt those apps out of  
<br>&gt; using the VPN at all. I’m sure there are many more examples of apps that  
<br>&gt; simply don’t need to go through a VPN, as no confidential information is  
<br>&gt; passed through them.
<br>
<br>This sounds like a generally useful feature.
<br>
<br>&gt; My proposal is to add another Fragment that’s just a list of all apps  
<br>&gt; installed on the phone with check boxes next to them. If the checkbox is  
<br>&gt; checked, that app will be routed through Wireguard. If not, it will be free  
<br>&gt; to bypass the VPN. Naturally, all apps will be default to being checked.
<br>
<br>If you base the UI on DialogPreference or MultiSelectListPreference, Android
<br>will take care of persisting the setting for you, and it would be easy to add to
<br>the settings page.
<br>
<br>&gt; This is an easy change to make for the GoBackend implementation using  
<br>&gt; VpnService.Builder.addDisallowedApplication(&lt;packageName&gt;), but would likely  
<br>&gt; be pretty complicated to add to WgQuickBackend. Perhaps this is something  
<br>&gt; that would only be possible for GoBackend users.
<br>
<br>For WgQuickBackend, we&#39;d need to modify the set_users function[1] in the
<br>wg-quick &quot;script&quot; to take a dynamic list of user IDs instead of hard coding it.
<br>PackageManager should provide us the UIDs of other applications. I&#39;m not sure
<br>the best way to communicate the ID list from the app to the script. Jason, thoughts?
<br>
<br>&gt; Any thoughts on this? I have everything working locally by simply adding  
<br>&gt; these two hardcoded lines to GoBackend.java:
<br>&gt;  
<br>&gt; builder.addDisallowedApplication(&quot;com.netflix.mediaclient&quot;);  
<br>&gt; builder.addDisallowedApplication(&quot;com.google.android.wearable.app”);
<br>&gt;  
<br>&gt; but I would like to make this more configurable and available to the rest of
<br>&gt;  Wireguard users if you’re agreeable to it. Thanks.
<br>
<br>Thank you,
<br>Samuel
<br>
<br>[1]:
<br><a href="https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick/android.c?id=dfd9827d5b08c506522bb3762cd3b0dbac640bbc#n291">https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick/android.c?id=dfd9827d5b08c506522bb3762cd3b0dbac640bbc#n291</a>
<br></div></div></span></blockquote></body></html>

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

* Re: Android app whitelist/blacklist feature
  2018-07-03  0:22   ` Eric Kuck
@ 2018-07-03  2:21     ` Jason A. Donenfeld
  2018-07-03  2:27       ` Eric Kuck
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2018-07-03  2:21 UTC (permalink / raw)
  To: eric; +Cc: WireGuard mailing list

Hey Eric,

Sorry for not responding earlier when you sent this to me directly.
I'm glad you sent it here and Samuel caught it, so your nice idea
won't go to waste.

On Tue, Jul 3, 2018 at 2:22 AM Eric Kuck <eric@bluelinelabs.com> wrote:
> If I were to do the work I initially proposed (new fragment + GoBackend i=
mplementation), would this be enough to get merged?

No, but I can write the C part and just provide you with some sane
interface for passing off the relevant information to wg-quick. Send
me offlist an SSH key, and I'll give you commit access to branches
that begin with `ek/`.

> My proposal is to add another Fragment that=E2=80=99s just a list of all =
apps installed on the phone with check boxes next to them.

How would one get to the Fragment? From the overflow menu, or from the
settings? I suspect the settings would be a more natural place for it.
Or were you thinking that this would actually be part of each
individual tunnel profile, stored within the configuration for the
tunnel somehow?

Regards,
Jason

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

* Re: Android app whitelist/blacklist feature
  2018-07-03  2:21     ` Jason A. Donenfeld
@ 2018-07-03  2:27       ` Eric Kuck
  2018-07-03  2:31         ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Kuck @ 2018-07-03  2:27 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

I was originally thinking the new fragment would be a per-tunnel thing (set
when you create the tunnel or edit it), but you’re right - making it a
general setting likely makes a whole lot more sense. I can’t think of any
use-cases for different tunnels handling different apps.

On July 2, 2018 at 9:21:23 PM, Jason A. Donenfeld (jason@zx2c4.com) wrote:

Hey Eric,

Sorry for not responding earlier when you sent this to me directly.
I'm glad you sent it here and Samuel caught it, so your nice idea
won't go to waste.

On Tue, Jul 3, 2018 at 2:22 AM Eric Kuck <eric@bluelinelabs.com> wrote:
> If I were to do the work I initially proposed (new fragment + GoBackend
implementation), would this be enough to get merged?

No, but I can write the C part and just provide you with some sane
interface for passing off the relevant information to wg-quick. Send
me offlist an SSH key, and I'll give you commit access to branches
that begin with `ek/`.

> My proposal is to add another Fragment that’s just a list of all apps
installed on the phone with check boxes next to them.

How would one get to the Fragment? From the overflow menu, or from the
settings? I suspect the settings would be a more natural place for it.
Or were you thinking that this would actually be part of each
individual tunnel profile, stored within the configuration for the
tunnel somehow?

Regards,
Jason

[-- Attachment #2: Type: text/html, Size: 2069 bytes --]

<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I was originally thinking the new fragment would be a per-tunnel thing (set when you create the tunnel or edit it), but you’re right - making it a general setting likely makes a whole lot more sense. I can’t think of any use-cases for different tunnels handling different apps.</div> <div id="bloop_sign_1530584671369398016" class="bloop_sign"></div> <br><p class="airmail_on">On July 2, 2018 at 9:21:23 PM, Jason A. Donenfeld (<a href="mailto:jason@zx2c4.com">jason@zx2c4.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Hey Eric,
<br>
<br>Sorry for not responding earlier when you sent this to me directly.
<br>I&#39;m glad you sent it here and Samuel caught it, so your nice idea
<br>won&#39;t go to waste.
<br>
<br>On Tue, Jul 3, 2018 at 2:22 AM Eric Kuck &lt;<a href="mailto:eric@bluelinelabs.com">eric@bluelinelabs.com</a>&gt; wrote:
<br>&gt; If I were to do the work I initially proposed (new fragment + GoBackend implementation), would this be enough to get merged?
<br>
<br>No, but I can write the C part and just provide you with some sane
<br>interface for passing off the relevant information to wg-quick. Send
<br>me offlist an SSH key, and I&#39;ll give you commit access to branches
<br>that begin with `ek/`.
<br>
<br>&gt; My proposal is to add another Fragment that’s just a list of all apps installed on the phone with check boxes next to them.
<br>
<br>How would one get to the Fragment? From the overflow menu, or from the
<br>settings? I suspect the settings would be a more natural place for it.
<br>Or were you thinking that this would actually be part of each
<br>individual tunnel profile, stored within the configuration for the
<br>tunnel somehow?
<br>
<br>Regards,
<br>Jason
<br></div></div></span></blockquote></body></html>

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

* Re: Android app whitelist/blacklist feature
  2018-07-03  2:27       ` Eric Kuck
@ 2018-07-03  2:31         ` Jason A. Donenfeld
  2018-07-03 18:12           ` Samuel Holland
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2018-07-03  2:31 UTC (permalink / raw)
  To: eric; +Cc: WireGuard mailing list

On Tue, Jul 3, 2018 at 4:27 AM Eric Kuck <eric@bluelinelabs.com> wrote:
>
> I was originally thinking the new fragment would be a per-tunnel thing (s=
et when you create the tunnel or edit it), but you=E2=80=99re right - makin=
g it a general setting likely makes a whole lot more sense. I can=E2=80=99t=
 think of any use-cases for different tunnels handling different apps.

It might actually make most sense to make it a per-tunnel thing. We'd
then have to introduce conf key called, "ExemptedApplications=3D" or
something. Samuel - any thoughts on this?

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

* Re: Android app whitelist/blacklist feature
  2018-07-03  2:31         ` Jason A. Donenfeld
@ 2018-07-03 18:12           ` Samuel Holland
  2018-07-03 18:17             ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Samuel Holland @ 2018-07-03 18:12 UTC (permalink / raw)
  To: Jason A. Donenfeld, eric; +Cc: WireGuard mailing list

On 07/02/18 21:31, Jason A. Donenfeld wrote:
> On Tue, Jul 3, 2018 at 4:27 AM Eric Kuck <eric@bluelinelabs.com> wrote:
>> 
>> I was originally thinking the new fragment would be a per-tunnel thing
>> (set when you create the tunnel or edit it), but you’re right - making it
>> a general setting likely makes a whole lot more sense. I can’t think of
>> any use-cases for different tunnels handling different apps.
> 
> It might actually make most sense to make it a per-tunnel thing. We'd then 
> have to introduce conf key called, "ExemptedApplications=" or something. 
> Samuel - any thoughts on this?

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?

Samuel

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

* Re: Android app whitelist/blacklist feature
  2018-07-03 18:12           ` Samuel Holland
@ 2018-07-03 18:17             ` Jason A. Donenfeld
  2018-07-04 22:19               ` Eric Kuck
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2018-07-03 18:17 UTC (permalink / raw)
  To: Samuel Holland; +Cc: Eric Kuck, WireGuard mailing list

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

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

* Re: Android app whitelist/blacklist feature
  2018-07-03 18:17             ` Jason A. Donenfeld
@ 2018-07-04 22:19               ` Eric Kuck
  2018-07-05 13:23                 ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Kuck @ 2018-07-04 22:19 UTC (permalink / raw)
  To: Jason A. Donenfeld, Samuel Holland; +Cc: WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

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’ve used
databinding for more than just a findViewById substitute, so it’s very
possible I didn’t 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 <samuel@sholland.org> 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.

[-- Attachment #2: Type: text/html, Size: 2403 bytes --]

<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">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’ve used databinding for more than just a findViewById substitute, so it’s very possible I didn’t do something canonically.</div> <br> <div id="bloop_sign_1530741231598432000" class="bloop_sign"></div> <br><p class="airmail_on">On July 3, 2018 at 1:17:27 PM, Jason A. Donenfeld (<a href="mailto:jason@zx2c4.com">jason@zx2c4.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>On Tue, Jul 3, 2018 at 8:12 PM Samuel Holland &lt;<a href="mailto:samuel@sholland.org">samuel@sholland.org</a>&gt; wrote:
<br>&gt; Right, trying to make it a global setting requires either some sort of
<br>&gt; out-of-band way to pass the information to wg-quick, or rewriting the
<br>&gt; configuration file every time the tunnel is brought up.
<br>&gt;
<br>&gt; Since from netd&#39;s point of view, this is a per-network setting anyway, I agree
<br>&gt; it makes sense to configure it per-tunnel. ExemptedApplications works as a
<br>&gt; configuration key, though I prefer ExcludedApplications--the application isn&#39;t
<br>&gt; just not required to use the tunnel, it&#39;s not allowed to use the tunnel.
<br>&gt;
<br>&gt; In that case, here are my UI suggestions:
<br>&gt; - Add a button in the editor that switches to a fragment or pops up a Dialog
<br>&gt; similar to a MultiSelectListPreference.
<br>&gt; - For consistency, checked means excluded -- everything defaults to unchecked.
<br>&gt; - The package names of excluded apps are put in the
<br>&gt; com.wireguard.config.Interface, and wg-quick handles package name to uid
<br>&gt; translation.
<br>&gt;
<br>&gt; How does that sound?
<br>
<br>All of that sounds right-on to me, and I think you&#39;re right that
<br>ExcludedApplications is the better key.
<br>
<br>(This also provides a good basis for later adding a
<br>&quot;ExcludeLocalNetwork&quot; option.)
<br>
<br> Eric&#39;s git access should be all setup now, so we can watch the
<br>commits coming on in.
<br></div></div></span></blockquote></body></html>

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

* Re: Android app whitelist/blacklist feature
  2018-07-04 22:19               ` Eric Kuck
@ 2018-07-05 13:23                 ` Jason A. Donenfeld
  2018-07-05 13:24                   ` Jason A. Donenfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Jason A. Donenfeld @ 2018-07-05 13:23 UTC (permalink / raw)
  To: Eric Kuck; +Cc: WireGuard mailing list

Hey Eric,

On cursory glance, this looks really good; well done. It might be
desirable to have an easy toolbar icon for deselecting all apps. Great
that you managed to use RecyclerView. We'd like to use that on the
main tunnel list fragment, but haven't done so yet [1] (if you feel so
inclined and want to give it a spin.)

I'll let Samuel do a proper of the code.

Regards,
Jason

[1] https://docs.google.com/document/d/15i0Z750eL_OlUyrypUFLF7Hoi5eoF-dTFWj-Rs4RXGI/edit

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

* Re: Android app whitelist/blacklist feature
  2018-07-05 13:23                 ` Jason A. Donenfeld
@ 2018-07-05 13:24                   ` Jason A. Donenfeld
  0 siblings, 0 replies; 11+ messages in thread
From: Jason A. Donenfeld @ 2018-07-05 13:24 UTC (permalink / raw)
  To: Eric Kuck; +Cc: WireGuard mailing list

On Thu, Jul 5, 2018 at 3:23 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> I'll let Samuel do a proper of the code.

Missing word: review

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

end of thread, back to index

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 20:35 Android app whitelist/blacklist feature Eric Kuck
2018-07-02 21:43 ` Samuel Holland
2018-07-03  0:22   ` Eric Kuck
2018-07-03  2:21     ` Jason A. Donenfeld
2018-07-03  2:27       ` Eric Kuck
2018-07-03  2:31         ` Jason A. Donenfeld
2018-07-03 18:12           ` Samuel Holland
2018-07-03 18:17             ` Jason A. Donenfeld
2018-07-04 22:19               ` Eric Kuck
2018-07-05 13:23                 ` Jason A. Donenfeld
2018-07-05 13:24                   ` Jason A. Donenfeld

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git