Skip to content

Conversation

tmshlvck
Copy link

@tmshlvck tmshlvck commented Oct 4, 2025

Add the ability to view, activate, and deactivate VPN connections directly from the network applet dropdown menu.

Changes:

  • Add VPN connection discovery via NetworkManager D-Bus API
  • Implement VPN activate/deactivate handlers
  • Add collapsible VPN connections section in the UI
  • Display VPN status (connected/disconnected) with toggle functionality
  • Position VPN section below wireless networks for easy access

VPN connections are discovered from NetworkManager settings and displayed in a dropdown list. Users can click to connect/disconnect VPNs without opening network settings. Active VPN connections show a 'Connected' status.

Supports both 'vpn' and 'wireguard' connection types.

Add the ability to view, activate, and deactivate VPN connections directly
from the network applet dropdown menu.

Changes:
- Add VPN connection discovery via NetworkManager D-Bus API
- Implement VPN activate/deactivate handlers
- Add collapsible VPN connections section in the UI
- Display VPN status (connected/disconnected) with toggle functionality
- Position VPN section below wireless networks for easy access

VPN connections are discovered from NetworkManager settings and displayed
in a dropdown list. Users can click to connect/disconnect VPNs without
opening network settings. Active VPN connections show a 'Connected' status.

Supports both 'vpn' and 'wireguard' connection types.
@tmshlvck
Copy link
Author

tmshlvck commented Oct 4, 2025

The resulting menu with 3 VPNs:
Screenshot_2025-10-04_10-15-27

tracing::error!("Failed to connect to NetworkManager: {:?}", e);
_ = output
.send(NetworkManagerEvent::RequestResponse {
req: NetworkManagerRequest::ActivateVpn(uuid.clone()),
Copy link
Contributor

@Cheong-Lau Cheong-Lau Oct 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤓 I have a small nit, uuid can just be moved here without cloning, since the error path returns afterwards and doesn't use it anymore. Same thing with name on line 363

Sorry, I had to 🙃, it lgtm otherwise

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are absolutely right! Fixed in fa88dcd

Avoid cloning strings that are not needed after move
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.

2 participants