Skip to content

[network@cinnamon.org] - Try to fix #10225 - #11905

Merged
mtwebster merged 1 commit into
linuxmint:masterfrom
claudiux:network-applet_support-wireguard
Dec 24, 2023
Merged

mtwebster merged 1 commit into
linuxmint:masterfrom
claudiux:network-applet_support-wireguard

Conversation

@claudiux

Copy link
Copy Markdown
Member

Maybe fixes #10225 (at least partially).

@claudiux
claudiux marked this pull request as draft October 26, 2023 17:35
@claudiux claudiux changed the title [network@cinnamon.org] - Try to fix 10225 [network@cinnamon.org] - Try to fix #10225 Oct 26, 2023
@timur-g

timur-g commented Oct 26, 2023 •

Copy link
Copy Markdown

Tested .Seems to work, thanks.
Some notes, though - tested in Linux Mint 21.2 with Cinnamon:

  1. I cannot switch between tunnels with just clicking the other, need to turn of WG and turn on other tunnel (not grave)
  2. I still cannot import WF conf from file, that can be imported via nmcli (says no IP address on line 3)
  3. "WireGuard Connections" is turned ON on boot, even if it was turned OFF before (seems NOK and a bug, "VPN connections" does not behave like that )

@claudiux

Copy link
Copy Markdown
Member Author

I see. Thanx for the feedback.

@timur-g

timur-g commented Oct 27, 2023

Copy link
Copy Markdown

Plese see my edited 3., may be the bug.
Not related, but if you are willing to wok more on Network Manager, it has another annoying issue: does not show Hotspot to turn on/off with the same presets (so only command is possible).

@claudiux

claudiux commented Oct 27, 2023 •

Copy link
Copy Markdown
Member Author

I've never seen "WireGuard Connections" ON at startup, except when a WireGuard connection is already activated.
EDIT: Are you using another applet, like VPN-Sentinel?
EDIT2: Have you requested automatic connection to Wireguard?

@claudiux

claudiux commented Oct 27, 2023 •

Copy link
Copy Markdown
Member Author

I have some problems (and I need help!):

  • even when a Wireguard connection is active, the only active connection detected is "wired". The icon therefore remains that of the wired connection;
  • clicking on another Wireguard connection doesn't deactivate the old one.

@timur-g Can you give me a .conf file (containing fake data) to understand the origin of your problem? Or tell me if its structure is the same of the one in https://cinnamon-spices.linuxmint.com/applets/view/368 (Wireguard section).

@timur-g

timur-g commented Oct 30, 2023

Copy link
Copy Markdown

Here it is:

[Interface]
PrivateKey = 12345=
Address = 1.2.3.4/32
MTU = 1280


[Peer]
PresharedKey = 67890=
PublicKey = 11111=
AllowedIPs = 11.22.33.44,55.66.77.88
Endpoint = end.point.com:51820
PersistentKeepalive = 25

@claudiux

claudiux commented Oct 30, 2023 •

Copy link
Copy Markdown
Member Author

@timur-g To import this .conf file, try removing the `/32' part of Address.

@timur-g

timur-g commented Oct 30, 2023

Copy link
Copy Markdown

Even if removed, import does not work, says Line 10 needs valid IP. It is where there are 2 IP addresses IP1,IP2.

@claudiux

claudiux commented Oct 30, 2023 •

Copy link
Copy Markdown
Member Author

@timur-g Try replacing the comma by a space:

AllowedIPs = 11.22.33.44 55.66.77.88

@timur-g

timur-g commented Oct 31, 2023

Copy link
Copy Markdown

If comma is replaced by space, than GIU Import works, but puts that connection under VPN, which is expected, as it says "Import VPN". So it wouldbe good to have "Import Wireguard". Just saying. as import via nmcli works and it is one-time anyway.
So this is an improvement used daily - only issue for me is that auto start on boot.

@leigh123linux

Copy link
Copy Markdown
Member

@claudiux This could be ported to c-c-c

GNOME/gnome-control-center@475faaf

@claudiux

claudiux commented Nov 2, 2023

Copy link
Copy Markdown
Member Author

The icon problem seems solved now!

@timur-g

timur-g commented Nov 23, 2023

Copy link
Copy Markdown

I use this and it is great, should be in merged in Cinnamon IMO.
I noticed one more issue, not sure if that can be addressed here:
WireGuard has it's own section in addition to VPN Connections, which is fine.
But network connections have "Automatically connect to VPN" and there should also be another check box for "Automatically connect to Wireguard".

@claudiux

claudiux commented Nov 23, 2023 •

Copy link
Copy Markdown
Member Author

@timur-g Thanks for the feedback. Good suggestion, I'll try to take it into account.

@timur-g

timur-g commented Dec 21, 2023

Copy link
Copy Markdown

Hi @claudiux. Happy with this, just wondering will you work more or someone should check and merge PRs?
IDK how it goes here, should someone with permission be mentioned to look?
It would be pitty that this just stays like this.

@claudiux
claudiux marked this pull request as ready for review December 23, 2023 12:44
@claudiux
claudiux requested a review from mtwebster December 23, 2023 18:45
@claudiux
claudiux requested a review from rcalixte December 24, 2023 14:12
@mtwebster
mtwebster merged commit 993a53f into linuxmint:master Dec 24, 2023
@claudiux
claudiux deleted the network-applet_support-wireguard branch December 24, 2023 17:19
mtwebster pushed a commit to mtwebster/Cinnamon that referenced this pull request Feb 9, 2024
IvanTheGeek added a commit to IvanTheGeek/cinnamon that referenced this pull request Oct 3, 2026
WireGuard connections had a section of their own, "WIREGUARD
Connections", backed by a copy of the VPN code (NMDeviceWIREGUARD) and
a panel-icon override of its own. To the user both lists hold the same
kind of thing, a tunnel on top of the real link, and the separate path
gets the panel wrong. The override keyed off the WireGuard title
switch, so the tooltip said "Connected to WIREGUARD" while a tunnel
was still connecting or already disconnecting. The override is also
older than the VPN icon from linuxmint#12142 (it came with linuxmint#11905), so with
Wi-Fi as the main connection a WireGuard tunnel replaced the signal
bars with the plain VPN icon, where a VPN-plugin connection shows the
Wi-Fi bars with a padlock.

List WireGuard connections under "VPN Connections" instead.
NMDeviceVPN accepts both types and WireGuard maps to the VPN category,
so WireGuard runs through the VPN code: the multiple-connection
handling from linuxmint#12930, the removal of deleted profiles that linuxmint#13847
copied for WireGuard, and the panel icon from linuxmint#12142. That icon shows
the Wi-Fi bars with a padlock when Wi-Fi is the main connection, the
VPN icon otherwise, and the acquiring icon while a tunnel connects.
NMDeviceWIREGUARD, the WIREGUARD category and the override go away.

Every row is now a switch that turns its own connection on or off, as
WireGuard rows have been since linuxmint#13911. VPN-plugin rows used to be
click-to-toggle items with a dot. Nameless connections still read
"Connected (private)", and WireGuard rows now follow a rename, as VPN
rows already did. The section's title switch keeps its code, so it now
covers both kinds: off disconnects every tunnel, WireGuard included,
and on starts the most recently used connection, which may now be a
WireGuard one.

This drops the three WIREGUARD strings and adds none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mtwebster pushed a commit that referenced this pull request Nov 1, 2026
…s kind (#13913)

* network applet: list WireGuard connections in the VPN section

WireGuard connections had a section of their own, "WIREGUARD
Connections", backed by a copy of the VPN code (NMDeviceWIREGUARD) and
a panel-icon override of its own. To the user both lists hold the same
kind of thing, a tunnel on top of the real link, and the separate path
gets the panel wrong. The override keyed off the WireGuard title
switch, so the tooltip said "Connected to WIREGUARD" while a tunnel
was still connecting or already disconnecting. The override is also
older than the VPN icon from #12142 (it came with #11905), so with
Wi-Fi as the main connection a WireGuard tunnel replaced the signal
bars with the plain VPN icon, where a VPN-plugin connection shows the
Wi-Fi bars with a padlock.

List WireGuard connections under "VPN Connections" instead.
NMDeviceVPN accepts both types and WireGuard maps to the VPN category,
so WireGuard runs through the VPN code: the multiple-connection
handling from #12930, the removal of deleted profiles that #13847
copied for WireGuard, and the panel icon from #12142. That icon shows
the Wi-Fi bars with a padlock when Wi-Fi is the main connection, the
VPN icon otherwise, and the acquiring icon while a tunnel connects.
NMDeviceWIREGUARD, the WIREGUARD category and the override go away.

Every row is now a switch that turns its own connection on or off, as
WireGuard rows have been since #13911. VPN-plugin rows used to be
click-to-toggle items with a dot. Nameless connections still read
"Connected (private)", and WireGuard rows now follow a rename, as VPN
rows already did. The section's title switch keeps its code, so it now
covers both kinds: off disconnects every tunnel, WireGuard included,
and on starts the most recently used connection, which may now be a
WireGuard one.

This drops the three WIREGUARD strings and adds none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* network applet: show each VPN connection's kind next to its name

With WireGuard and VPN-plugin connections in one list, the name is all
a row has to go on, and connection names often do not say what kind
of tunnel they are. Show the kind next to the name, in the switch
row's status label: "WireGuard" for WireGuard connections, and for VPN
plugins a name looked up from the plugin's service type (OpenVPN,
PPTP, L2TP, OpenConnect, ...). A plugin that is not in the table shows
the last part of its service type, such as "iodine".

"WireGuard" reuses the translated string the applet already has for
the WireGuard device description. The plugin names are product and
protocol names and are left untranslated, so the change adds no
strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Support WireGuard connections in the Network Manager applet (network@cinnamon.org)

4 participants