-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Support for Wireguard #134
Comments
Excited to see this under consideration. With wireguard being merged into the 5.6 kernel, it would be awesome to see kernel space support in addition to user space support via the wireguard-go. Assuming the host's kernel is 5.6+ (or has been backported like in Ubuntu or Debain), I believe you could install wireguard in the container with It looks like there are a couple of examples (cmulk/wireguard-docker and activeeos/wireguard-docker) that attempt to even install the OOT kernel module in the host. Instead of doing that, maybe it would make the most sense to enable kernel support for hosts running 5.6+ / backported wireguard and wireguard-go for hosts running earlier kernels? 😄 Wireguard's official container framework is probably the most performant, but doesn't look particularly docker-friendly since it requires a lot of host-level config. I'd guess sharing the kernel module would still be more performant than wireguard-go, but I haven't done any testing. For what it's worth, it looks like wireguard-go has come a long way in the last few months. |
Hi there, thanks for the good read 👍 So wireguard-go is probably fast enough for pretty much any personal need. It might not be suitable if you have huge loads and multiple clients. But Go is very quick at networking things, it is a system language originally. There is also a Rust version of Wireguard the team is developing, which is again faster, as fast or faster than C, so it should be very close to the kernel space implementation although it could run in a container in user space. We could indeed add instructions on how to use the kernel space Wireguard if you have it setup on your host, that would be a nice addition. |
Cool, sounds good to me. Also I just noticed that LinuxServer.io added a Wireguard container last month here: linuxserver/docker-wireguard. In case it's helpful. |
@burkasaurusrex Thanks, unfortunately it's the same problem I want to avoid:
For now it seems only kernel based docker images exist out there which seem pointless to me, you might as well just run it without Docker in that case. Luckily a Go version exists (and a Rust one too) which can work across platforms, cpu arch and kernels 😉 |
There is also a NordVPN docker container that uses Wireguard... https://github.com/bubuntux/nordvpn they call it "NordLynx" if that helps any. Doesn't seem to do any voodoo on the host... |
It installs Wireguard on your host kernel |
… On Sat, Aug 22, 2020 at 3:18 PM Quentin McGaw ***@***.***> wrote:
NordLynx - NordVpn wireguard implementation (3x-5x times faster). NOTE:
Requires --cap-add=SYS_MODULE and --sysctl net.ipv4.conf.all.rp_filter=2
It installs Wireguard on your host kernel --cap-add=SYS_MODULE, not
really a big fan of giving access to the Kernel to a container (even mine
😄). Gluetun already has net admin capability and runs the entrypoint as
root (no way around it) but I would ideally like to avoid it for security
reasons. Especially since it does tunneling to vpn servers which are not
the safest places either (i. e. other VPN malicious clients). But I'll plug
in the Go implementation of Wireguard (Windows GUI uses it too), it should
give fast enough performance and won't require to modify the kernel. I did
Shadowsocks in Go last weekend (#220
<#220>) to replace the C Alpine one,
this weekend will be about being able to persist and update ip addresses of
vpn servers (for now it's hardcoded). I can try doing Wireguard next or
next next weekend 😉
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#134 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFHXQC66AJCVCN36BYCPXU3SB7ASPANCNFSM4MGNIPWA>
.
|
Sorry everyone for the big delay. I'm working hard on getting Wireguard ready for Mullvad and PIA. I have some pre-pre-alpha program based on the official Go wireguard Code. It's quite nice since it tries to use the Kernel wireguard module if it's there and otherwise falls back to a Go implementation (which is also decently fast). So performance should be quite nice. Anyway, I'll report back with image tags and instructions especially to test it for other providers than Mullvad. Cheers! |
That's probably the best way to do it, awesome! Looking forward to it. |
Do you plan to add Wireguard for GyberGhost VPN too? I checked both OVPN and Wireguard protocols with their app and Wireguard one is 3 or more times faster, when with OVPN i reach 100 Mbit with Wireguard i reach 300 ... |
Will NordLynx (the protocol used by NordVPN, which seems to be based on Wireguard) be supported? 😄 |
Thank you so much |
I have a question that you can answer for your VPN provider. So far for Mullvad:
so I would like to have environment variables How is it for PIA, Cyberghost and NordVPN? (download multiple config files and check what's common or not really). Thanks! Anyway, I made some good progress today, almost there. I have it working for a single Mullvad server and it tunnels everything correctly. What's nice is it really doesn't cry about sysctl or kernel modules unlike |
Related to the ones testing NordVPN.. The WireGuard configs are not available in their server config download tool. You need to use their Linux version of their NordVPN app to get the WireGuard configs. A small reddit guide here Not sure if I have the time in the near future, as I don't have a Linux device available atm to test this method. |
@VP-EN OK I think I should design something to easily extract that information. I guess some debian based image with nordlynx and wireguard installed and some shell scripting would do (e. g. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Note you can now use /gluetun/wireguard/wg0.conf to set fields (with all VPN providers), see this wiki section |
@macdis Would you be able to share how you were able to do this? I'm also wondering if you are able to issue commands to change regions on the fly with this configuration? |
I just butchered the pia-foss/manual-connections scripts in order to do things exactly how I wanted them done, putting everything into one script. It basically depends on your setup and needs. Everything you need is in the scripts except for how you use the output in gluetun. Regarding gluetun integration, I just use
HOWEVER, now that wg0.conf files are supported by gluetun (see here and here), you can presumably use the pia-foss scripts to generate a wg0.conf file and just use that (set As for region switching, look at the |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Will ProtonVPN wiregaurd be natively supported in the future?
I know this is old to reply to, but ProtonVPN does allow the same private key across multiple wireguard sever IPs & public-keys like Nord, so I assume ProtonVPN could be native too. Proton even has an article stating their client doesn't generate new private keys until it's completely logged out. I tested a few server IP+public-keys in gluetun using the same private key and it works fine. The reason I was looking into this was because my one custom provider entry kept failing (protonVPN server was offline) resulting unhealthy status and I couldn't figure out how to have multiple proton sever IP & pubkey sets with the custom provider option. I started trying to run my own script to update wg0.conf from the proton server list here: https://api.protonmail.ch/vpn/logicals ...but I'm not having any luck. |
See #2320 this is work in progress 😉
Not for now (same problem as PIA), since it needs network access before the tunnel is up, which is - for now - a no-go for Gluetun. I moved Privado to the Requires API section.
I'm looking into this now! 😉 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
For your information, the provider Privadodo can be connected via "custom". Maybe you can adjust this in the description above. |
I was trying to get custom to work but then I saw this: So that is pointless, don't want to re-setup gluetun every month, so sadly privado is a no go for me |
VPN providers support
Natively
Using provider
custom
Supported since 8645d97 using
VPN_SERVICE_PROVIDER=custom
ProtonVPNRequires API
This is not done, and requires API communication to get the Wireguard keys etc.
Wireguard not supported
Extraction needed
This requires to extract the wireguard config from their proprietary app. Let's face it, this is a lot of work for little result, and I might never get to it. But here is the list still:
following supported devices using VyprVPN version 4.0 and higher and Wireguard is not available to configure with Manual setup
Extra todos
openvpn
orwireguard
depending on VPN chosen instead ofvpn
Read keys from files/secretssee Feature request: Allow WIREGUARD_PRIVATE_KEY to be specified via a secret file #614VPNSP=custom
#610The text was updated successfully, but these errors were encountered: