Any possibility to run wireguard-go with android vpnservice?
KeXianbin(http://diyism.com)
kexianbin at diyism.com
Wed Mar 10 00:31:27 UTC 2021
Thanks, but I knew android-gui, it used gomobile JNI,
What I'm trying to do is use the same control script (I've integrated
PHP into android) to manage wireguard process cross multiple
platforms (for example: Android phone and armbian linux TV).
So in my case, command line wireguard accessibility is in first priority.
I saw that someone did it with
tun2socks(https://github.com/jackyflame/Yysk/blob/8ac2b21c1b11eba30205d92e8f96c6d80caaa1dd/app/src/main/java/im/socks/yysk/ssr/SsrTunnel.java#L286):
first Runtime.getRuntime().exec( ... tun2socks --tunfd
vpnConn.getFd() --sock-path /local/data/tmp/wg0.sock ...)
then System.sendFd(vpnConn.getFd(), "/local/data/tmp/wg0.sock");
So I'm trying to imitate it with wireguard-go arm64 binary, but I got
no progress
Thanks for your great work
Malcolm Ke
On Wed, Mar 10, 2021 at 5:26 AM Jason A. Donenfeld <Jason at zx2c4.com> wrote:
>
> What you're trying to do has actually already been done and is
> available with a nice Java wrapper:
>
> https://git.zx2c4.com/wireguard-android/about/#embedding
> https://search.maven.org/artifact/com.wireguard.android/tunnel
> https://javadoc.io/doc/com.wireguard.android/tunnel/latest/index.html
>
> This should hopefully save you a bunch of time.
More information about the WireGuard
mailing list