WireGuard

UUID: wireguard@nicoulaj.net
Last edited:
5 months ago 2024-07-04, 20:20
Last commit: [4207c2ae] Add Catalan translations (#6176)

Enable/disable WireGuard connections.

Log In To Comment!

14 Comments

marcogiorgio
marcogiorgio-3 months ago
is someone using the Papirus icon theme? When using this theme, the logo becomes a white "X" instead of showing the proper wireguard logo
ziogref
ziogref-10 months ago
Probably again for just future me, Make sure the following packages are installed apt install wireguard wireguard-tools resolvconf
ziogref
ziogref-3 months ago
in Linux mint 22 you need to remove resolvconf if you have it installed. sudo apt purge resolvconf
pzim
pzim-1 year ago
For not entering the password every times you want to connect or disconnect, replace in ~/.local/share/cinnamon/applets/wireguard@nicoulaj.net/applet.js 'pkexec' by 'sudo' line 123 : replace : ``` ['pkexec', 'wg-quick', enable ? 'up' : 'down', iface], ``` by : ``` ['sudo', 'wg-quick', enable ? 'up' : 'down', iface], ``` Then in sudo visudo add this line : with no empty line : ``` # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL YOUR_USER_NAME ALL=(ALL) NOPASSWD: /usr/bin/wg-quick # See sudoers(5) for more information on "@include" directives: ``` Replace YOUR_USER_NAME by your username or ALL ######################## The config files need to be in /etc/wireguard/ (e.g /etc/wireguard/wg0.conf) as @ziogref said And you must let access for reading to your username to the folder wiregard ######################## Finnaly restart Cinnamon to make it works
Pablo Gutierrez
Pablo Gutierrez-1 year ago
In the text # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL YOUR_USER_NAME ALL=(ALL) NOPASSWD: /usr/bin/wg-quick # See sudoers(5) for more information on "@include" directives: I should only place my username where it says YOUR_USER_NAME? or do i need to replace it where it says ALL as well?
pzim
pzim-1 year ago
- To let reading access for your username to the folder wiregard : sudo chmod o+r /etc/wireguard - To restart Cinnamon : ( Alt+F2, type r and hit enter)
pzim
pzim-1 year ago
And thank you to @nicoulaj for this usefull applet ;-) If you want to import NordVPN's Wireguard's conf files : https://gist.github.com/bluewalk/7b3db071c488c82c604baf76a42eaad3?permalink_comment_id=4189557#gistcomment-4189557 https://github.com/sfiorini/NordVPN-Wireguard
ziogref
ziogref-2 years ago
Wireguard config files need to be in /etc/wireguard/ (e.g /etc/wireguard/wg0.conf) Probably for future me, but this is where the plugin looks for the wireguard profiles.
oleole39
oleole39-2 years ago
Hello, glad to find this! Would you consider adding an option enabling to launch a given config automically at startup ?
johsoderi
johsoderi-4 years ago
I couldn't get this to work either, but If you only have one vpn you can use the applet "Bash Sensors" instead. Since wg-quick needs sudo, I added the following line with visudo: ALL ALL=(root) NOPASSWD: /usr/bin/wg-quick Warning: This is a huge security risk! Since wg_quick a bash script, you're giving root access to anyone who can edit it. I used these settings for Bash Sensors: - Refresh interval: 10 sec - Shell: sh - Command 1: echo '' - Two-line mode: Off - Dynamic icon: On - Cmd: ls /sys/class/net | grep <wg config name> > /dev/null && echo "<path to On icon>" || echo "<path to Off icon>" Note: PNG's can be used for icons. These are the ones I used: https://findicons.com/files/icons/1933/symbols/128/green_light.png https://findicons.com/files/icons/1933/symbols/128/red_light.png - Dynamic tooltip: On - Cmd: ls /sys/class/net | grep <wg config name> > /dev/null && echo "<wg config name>: UP" || echo "<wg config name>: DOWN" - Menu command (on applet left-click): ls /sys/class/net | grep <wg config name> > /dev/null && sudo wg-quick up <wg config name> || sudo wg-quick down <wg config name> - Display output: Off My config for the lazy (~/.cinnamon/configs/bash-sensors@pkkk/45.json): https://pastebin.com/KqQQNcJc
johsoderi
johsoderi-4 years ago
I can't find any way to edit my comment, but the "Menu command (on applet left-click)" part is wrong. It should be: "ls /sys/class/net | grep <wg config name> && sudo wg-quick down <wg config name> || sudo wg-quick up <wg config name>". The file on pastebin is updated, you can import it by clicking the "hamburger" icon and import. Then fix the icon paths and change all instances of "integrity_vpn" to the name of your WireGuard config.
nicoulaj
nicoulaj-3 years ago
Can you try latest version and file an issue at https://github.com/nicoulaj/cinnamon-applet-wireguard if it does not work ?
Michael Parker
Michael Parker-4 years ago
Hello everytime my kernel updates your extension breaks it seems it has to do with the name of the updated file i was wondering if you can update this applet to detect those changes
nicoulaj
nicoulaj-3 years ago
What distribution do you use ? Anyway wireguard is a kernel module, so after a kernel update you need to reboot or at least reload it, it depends on how it is handled on your distribution. But I guess the extension could detect this situation and show a proper error, please file an issue at https://github.com/nicoulaj/cinnamon-applet-wireguard