answered
2019-02-06 12:55:18 +0200
I managed to get wireguard running on Sailfish X. I used userspace go-based implementation of wireguard available here https://git.zx2c4.com/wireguard-go/about/.
Instructions
Inside Sailfish SDK docker:
- download golang i386 compiler
https://dl.google.com/go/go1.11.5.linux-386.tar.gz
- unpack to /usr/local/, add PATH to /usr/local/go/bin
- download and extract wireguard-go sources
- cross compile to ARMHFv7: GOOS=linux GOARCH=arm make
- single statically-linked executable is generated 'wireguard-go'
- extract wg utility from Ubuntu wireguard-ppa and libmnl0 from main repo
Push 'wireguard-go', 'wg' and 'libmnl0.so' on your phone, and enjoy wireguard vpn.
Update
Here is prepared 'package' with all needed binaries, scripts and systemd files: wireguard.tar.gz
If you create proper configuration file for given wireguard interface (e.g. /etc/default/wg0.conf) then you can enable automatic startup with:
systemd enable wg-quick@wg0.service
systemd start wg-quick@wg0.service
If given endpoint has dynamic IP, you can force automatic refresh of endpoint DNS (currently refreshes every 6 hours):
systemd enable wireguard_reresolve-dns.timer
systemd start wireguard_reresolve-dns.timer
or trigger it manually:
systemd start wireguard_reresolve-dns.service
If you are configuring wireguard manually don't forget to set WG_I_PREFER_BUGGY_USERSPACE_TO_POLISHED_KMOD=1 env var before running 'wireguard-go', or 'wg-quick'.
@Edz: too early for writing right english today ;-)
cy8aer ( 2018-03-31 17:53:04 +0200 )editi dont know it. but another open source alternative to openvpn- id vote for that.
kaktux ( 2018-04-01 12:24:43 +0200 )editWireGuard requires at least Linux kernel version 3.10; it will be mainlined in Linux 5.6 in a few weeks.
If Jolla won't allow kernel modules loading, then we will have to resort to userland versions.
Alfonso ( 2019-12-27 10:00:06 +0200 )editConnman 1.38 now supports WireGuard (source) but it doesn't help that much because the kernel bits are missing... :(
Direc ( 2020-02-19 11:21:51 +0200 )edit