WireGuard root-less support for android

Samuel Holland samuel at sholland.org
Wed Nov 8 06:15:06 CET 2017


On 11/06/17 22:38, Aurélien Chabot wrote:
> I worked on a set of change to add root-less support of WireGuard for
> android. The solution I choose is to use the wireguard-go library 
> inside the android application. Golang as a mechanism to export some 
> native binding quite easily to java. The set of patch need some 
> feedback but it's actually working well. I'd like to know if you 
> think this is a good direction to take for the android application.

Thanks for your contribution! This is definitely the direction we want
to work toward; the Go implementation is much more accessible to
non-rooted devices. I had assumed we would have to run wireguard-go as a
separate process (my only experience with Go-on-Android is syncthing[1],
which pretends its Go binary is a native library[2]). If we can run
wireguard-go in process, that would be much better!

[1]: https://github.com/syncthing/syncthing-android

> The patch are in the thread but I used a submodule to integrate the 
> wireguard-go library inside the wireguard-android so at least this 
> need to be change with the official url if it's get merge.

Also, your patch 2 won't work as-is with the upstream version since it
won't have the same commit hash.

> You can also find the set of change on my github : 
> https://github.com/trishika/wireguard-android 
> https://github.com/trishika/wireguard-go

I've started looking through your Java changes, and they're generally
looking good. The actual wireguard-go glue can't be merged until after
the changes to the other repository (hooray submodules!), but I'll go
ahead and try to integrate your service abstraction layer. That way I
can reuse it for switching the kernel-space interface from wg-quick to
wg proper (an existing to-do item).

> Aurélien

More information about the WireGuard mailing list