Created attachment 132058 [details] Screenshot of "WG Peers Properties" dialog box SUMMARY When importing a WireGuard config generated with wg-quick into plasma-nm, the Peer Properties information is not shown and cannot be edited. It *does* seem to be imported, though, as the connection is mostly functional, except for the config's DNS setting, which is apparently not imported or set by plasma-nm. STEPS TO REPRODUCE 1. Open network configuration. 2. Choose to add connection ("+" sign). 3. Select "Import VPN Connection...". 4. Import WireGuard config file. 5. Go to "WireGuard Interface" and open "Peers". 6. Observe that all fields are blank. OBSERVED RESULT 1. All fields in the "Wireguard Peers properties" dialog box are empty. 2. Changes made in the "Wireguard Peers properties" dialog box do not change the underlying configuration. 3. The connection made with the imported config file works for the most part, inspite of 1. 4. The config file's DNS setting is not implemented by plasma-nm. EXPECTED RESULT 1. Fields should be populated by the information contained in the WireGuard config file. 2. Changes made in fields should change the connection's settings. 3. A connection should not be possible with the peer information missing, but is indeed made. 4. Unimported DNS settings should not be applied, as they are indeed not. SOFTWARE/OS VERSIONS Windows: N/A macOS: N/A Linux/KDE Plasma: Kubuntu 20.04, kernel 5.4.0-050400-generic KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.68.0 Qt Version: 5.12.8 ADDITIONAL INFORMATION N/A
An additional observation that I just made. When I connect to WireGuard with the config file and `wg-quick`, the command `sudo wg` shows the following information: interface: WireGuard-Home public key: <REDACTED> private key: (hidden) listening port: 50392 fwmark: 0xca6c peer: <REDACTED> preshared key: (hidden) endpoint: <redacted>:51820 allowed ips: 0.0.0.0/0 latest handshake: 2 seconds ago transfer: 5.25 KiB received, 7.21 KiB sent persistent keepalive: every 30 seconds However, when I import the very same WireGuard config file into plasma-nm and connect from there, the only information shown by `sudo wg` is this: interface: PlasmaWG public key: <REDACTED> private key: (hidden) listening port: 43051 I'm not sure how the connection is even possible without peer information.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-nm/-/merge_requests/242
Git commit 70e3d1e8a7ac87b23f313833985fd8d5e40ff885 by Nicolas Fella. Committed on 29/04/2023 at 14:43. Pushed by nicolasfella into branch 'master'. Use nm_conn_wireguard_import to import WireGuard files This is more robust than our hand-rolled implementation Related: bug 420066, bug 468365, bug 452952, bug 423973 M +12 -0 kcm/kcm.cpp https://invent.kde.org/plasma/plasma-nm/commit/70e3d1e8a7ac87b23f313833985fd8d5e40ff885
Git commit 0237be91fd8a714efa3ef9d88c7ac157fcff488b by Nicolas Fella. Committed on 29/04/2023 at 14:46. Pushed by nicolasfella into branch 'Plasma/5.27'. Use nm_conn_wireguard_import to import WireGuard files This is more robust than our hand-rolled implementation Related: bug 420066, bug 468365, bug 452952, bug 423973 (cherry picked from commit 70e3d1e8a7ac87b23f313833985fd8d5e40ff885) M +12 -0 kcm/kcm.cpp https://invent.kde.org/plasma/plasma-nm/commit/0237be91fd8a714efa3ef9d88c7ac157fcff488b