ulikoehler / GuardMyWire

Generate wireguard configs for Linux and MikroTik devices
Apache License 2.0
24 stars 5 forks source link

[FR] Support for Included/Excluded Applications in Android WG Client #2

Open mario-tux opened 2 years ago

mario-tux commented 2 years ago

In the Android WG Client it is possible to customize the set of apps using the VPN. In my case the download of attachments in GMail doesn't work if the WG VPN is active (I don't understand why) and Google Maps sometimes says it is not connected. As a workaround I use the white/blacklist mechanism of the client.

If I need to reimport the configuration from GuardMyWire (for example if I add another node on my mesh network) I have to rebuild by-hands my white/blacklist of apps.

Exporting the configuration from the client I discovered that the lists are saved in the standard configuration. I'm wondering if you could add such fields in the peer configuration. This extra fields should not harm the other clients.

This is an example of backlist configuration:

[Interface]
Address = 192.168.210.3/24
ExcludedApplications = com.google.android.gm, com.google.android.apps.maps
PrivateKey = ...

This is an example of whitelist configuration:

[Interface]
Address = 192.168.210.3/24
IncludedApplications = org.rm3l.container_companion, com.android.chrome
PrivateKey = ...
ulikoehler commented 2 years ago

Interesting. I didn't know that IncludedApplication and ExcludedApplication exist ;-) I think we can easily add them to the rules like this:

{
    "rules": {
        "Mobile": {
            "connect_to": ["*"],
            "keepalive": 15,
            "IncludeedApplications": ["org.rm3l.container_companion", "com.android.chrome"]
        }
    },
    "peers": [ /* ... */ ]
}

etc.

mario-tux commented 2 years ago

Interesting. I didn't know that IncludedApplication and ExcludedApplication exist ;-)

I can't spot any official documentation: I discovered them by attempts. On the other side the Android client is the official one so the feature should be stable. In the worst case it will be ignored by the other clients.