ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.28k stars 110 forks source link

Add WireGuard Support #2101

Open marek22k opened 1 year ago

marek22k commented 1 year ago

Description of the feature

Hello,

Apart from OpenVPN, there is WireGuard. WireGuard uses a cryptography system that is easier to set up. Furthermore, it uses more modern algorithms and is faster. There are two implementations for WireGuard: A userspace implementation in Go and the reference implementation, which runs in the Linux kernel. It would be great if WireGuard VPN support could be added.

Illustrations

Are you ripping of another product? Maybe provide a screenshot to illustrate.

OpenVPN is complicated to set up on the server side compared to WireGuard. WireGuard is faster and uses more modern algorithms.

Are you a UI-Designer? Create a nice mockup to show what it could look like

I'm not a designer, but you could select WireGuard in the VPN setup dialog with options to set it up. (Private Key, Listen Port, Addresses for IPv4 and IPv6, Public Key of the Peer, PSK of the Peer, Endpoint of the Peer, AllowedIPs of the Peer).

Flohack74 commented 1 year ago

It is a bit difficult: Userspace is really confined and locked down in UT, and kernel drivers would needed to be added to each and every device kernel separatly, also Android kernels are quite old and messed but by unclean patching. I dont know anyone who would like to work on this :)

patrickjane commented 1 year ago

Isn’t wireguard supported kernel-side in focal?

likeadragonmaid commented 1 year ago

Wireguard support can be added in kernel of a UT port easily using this guide, https://forum.xda-developers.com/t/wireguard-kernel-rom-integration.3711635/ . There is also an app in OpenStore that lets you setup wireguard VPN. https://open-store.io/app/wireguard.davidv.dev . Mi A2 on UT also has wireguard patches in its kernel https://github.com/search?q=repo%3Aubports-xiaomi-sdm660%2Fandroid_kernel_xiaomi_sdm660+wireguard&type=commits

marek22k commented 1 year ago

Unfortunately, the app does not work. Once - if present - WireGuard is not recognized in the kernel. Furthermore, there is no support for IPv6. https://github.com/DavidVentura/Wireguard_qml/issues/23 https://github.com/DavidVentura/Wireguard_qml/issues/27

patrickjane commented 1 year ago

I am also very interested in Wireguard. I am using this currently on my iPhone & Macbook. Setting up OpenVPN additionally on my router would be very cumbersome. OpenVPN just is not that great.

Having Wireguard support in the OS would be great, although a working app-based solution would be okay for me too. On the iPhone, there is no builtin support either; you have to install the official wireguard app.

I also don't see an issue with the corresponding device ports needing to support this. So thats an upvote on the topic from my side. I don't think I can support on the implementation end, I am just an app developer. I would offer help for testing though. I have a volla phone & a OP7T.