Closed milouse closed 8 months ago
Is this not moving forward? Wireguard is included even in Linux Kernel. It would be really nice that the Elementary OS supported by default. Since I used Wireguard for the first time I left OpenVPN. It's a bit pity when you try to add a Wireguard connection and it gives you an error.
@danirabbit I just rebase this MR on master. Do you mind have a look at it? I’d be great to have it merged. It’d help a lot for a day to day work with wireguard.
This MR is unrelated with the other I opened for the wingpanel applet. This MR build just fine and works exactly as expected.
Thank you very much.
From what I can see here, the code looks alright. I do not have a way to quickly test this. Maybe @danirabbit can or knows somebody who can?
(rebase are better to read in a MR than wild merge. Do not hesitate to ask for a rebase :) )
Hey, naive question but should I be able to build and install this on the current version of elementary OS, or does this need to be on a newer build/release?
I have a wireguard config setup to be used with wgquick but it isn't picked up by the network manager. I can't see it in the switchboard plug or the wingpanel indicator. And as far as I can tell, this does not allow one to create WG configs from the switchboard.
Yes, you can have a try. The most simple way to test it is to do the following:
cp /usr/lib/switchboard/network/libnetworking.so ~/
libnetworking.so
file in the ./build/src
subfolder. Copy this file in /usr/lib/switchboard/network
(overwriting the packaged one).Nothing more to do. Try to start the settings app and go to the network section. You should see any wireguard configuration there. If anything goes wrong (settings app crashes…) just replace your built libnetworking.so
file with the backup you made on step 1 and everything will come back as before.
That said, I’m not sure what "wg-quick" really is. The current MR only deals with wireguard connection configured through NetworkManager (i.e. your wireguard config must be setup/appear in nm-connection-editor
).
cp /usr/lib/switchboard
The directory there doesn't even exist. rather: /usr/lib/x86_64-linux-gnu/switchboard/network/libnetworking.so
But replacing that does not seem to do the trick. ( my wireguard config is visible as home
with nm-connection-editor
). And what i mean by the trick, is that I can neither see my existing wireguard conf or create a new one.
wg-quick is just a commandline tool for quickly bringing up a wireguard config
On which system are you? I’m on archlinux on my side, the install path to switchboard libs can vary from one distribution to another. For the same reason, you might have to change a little the README instruction to match your distribution environment.
But if it compiled without any error and produces a .so file in the end, it’s weird that you don’t see your home connection in the VPN list of switchboard. Maybe you’ll need to log-out/log in again your user session to make it works? Just in case (sorry for the stupid question), are you sure you cloned my "wireguard" branch from my own cloned repository (and not build from this repository) ?
Right, I figured it out. But for anyone reading this:
I have tested this on Ubuntu 22.04 with elementary Desktop installed (and will on elementary too, and update here accordingly)
procedure to install:
git clone https://github.com/milouse/switchboard-plug-network.git
cd switchboard-plug-network
git switch wireguard
meson build --prefix=/usr
cd build
ninja
sudo cp src/libnetworking.so /usr/lib/x86_64-linux-gnu/switchboard/network/libnetworking.so
sudo chmod 644 /usr/lib/x86_64-linux-gnu/switchboard/network/libnetworking.so
sudo chown root:root /usr/lib/x86_64-linux-gnu/switchboard/network/libnetworking.so
any wireguard connection you wish to manage this way should be set up using nm-connection-editor
On Ubuntu with elementary Desktop: It works very well. On elmentary OS: It also works very well.
I've seen no inconsistency in functionality on either system, it just works.
This MR is an up-to-date (continuously rebased) follow up of the #302 MR plus some little adjustments.
From my point of view every thing is working as expected, but I’m open to discussion :)