Repository navigation
feat: add OpenVPN/WireGuard configuration importer, VPN settings editor, compact tray menu, and connection toast notifications - #134
Merged
Conversation
Contributor
|
Sorry @mbnunes, your pull request is larger than the review limit of 150,000 diff characters |
ericbsd
requested changes
Nov 10, 2026
ericbsd
self-requested a review
November 11, 2026 18:35
ericbsd
requested changes
Nov 11, 2026
ericbsd
previously approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces full OpenVPN (
.ovpn/.conf) and WireGuard (.conf) configuration import and management tonetworkmgr(modeled after Linux'sNetworkManager-openvpn), alongside a redesigned compact single-row Tray Menu UI and non-blocking desktop popup notifications when connecting or disconnecting networks.Key Features & Changes
1. OpenVPN & WireGuard Configuration Importer and Editor
NetworkMgr/openvpn_api.py):.ovpnand.confprofiles (parse_openvpn_config,save_openvpn_config,delete_openvpn_config,openvpn_dictionary,enable_openvpn,disable_openvpn).detect_vpn_file_type).<ca>,<cert>,<key>,<pkcs12>,<tls-auth>,<tls-crypt>,<tls-crypt-v2>,<secret>,<extra-certs>,<http-proxy-user-pass>) and<connection>blocks, storing certificates and keys safely with0600permissions under/usr/local/etc/openvpn/certs/<profile_id>/.tls,password,tls-password,static-key) and prompts for credentials viaOpenVPNAuthDialogwhen needed.ifconfig,route-gateway), Manual/Static IPv6 (ifconfig-ipv6,pull-filter ignore), and custom Static Routes (IPv4 & IPv6) (route,route-ipv6).# networkmgr-name:) and handles profile renaming cleanly whenimporting or editing a profile.
security/openvpnis installed (is_openvpn_installed) and shows a clear warning dialog(
show_openvpn_not_installed_alert) instead of raisingFileNotFoundErrorwhen/usr/local/sbin/openvpnis missing.NetworkMgr/wg_api.py):parse_wireguard_config,save_wireguard_config,delete_wireguard_config, anddefault_wireguard_configtoimport, create, edit, and remove WireGuard profiles in
/usr/local/etc/wireguard/.wgandwg-quicksubprocess calls against missing binaries (OSError/FileNotFoundError).NetworkMgr/vpn_dialog.py):import_vpn_file_dialogandVPNConnectionDialogwith 6 tabs for OpenVPN (VPN, IPv4 Settings, IPv6Settings, Advanced, Security & TLS, Proxies) plus WireGuard profile editing.
NetworkMgr/configuration.py):NetCardConfigWindowallowing users to view, Import VPN..., create New OpenVPN,Edit, Connect / Disconnect, and Delete VPN profiles directly from the configuration window.
2. Compact Single-Row Tray Menu UI/UX (
NetworkMgr/trayicon.py)<Name> Connected+Disable <Name>+Configure <Name>) into aclean, single-row layout for OpenVPN, WireGuard, and Ethernet (Wired) connections:
● <Connection Name> [Connect / Red X Disconnect] [⚙ Configure]GdkPixbuf.PixbufLoader:✕icon when connected.⚙) icon to open the profile or interface configuration window.3. Desktop Popup Toast Notifications (
NetworkMgr/vpn_dialog.py,NetworkMgr/trayicon.py,NetworkMgr/configuration.py)show_connection_notification(name, connected)using a non-blocking GTK3Gdk.WindowTypeHint.NOTIFICATIONpopup toastin the top-right corner of the primary monitor:
[✓] <Connection Name> Connected(green checkmark icon)[✕] <Connection Name> Disconnected(red X icon)notification daemons, never steals keyboard focus, and auto-dismisses after 3 seconds (or on click).
Files Changed
NetworkMgr/openvpn_api.py: OpenVPN configuration parser, exporter, certificate manager, anddaemon lifecycle management.
NetworkMgr/vpn_dialog.py: VPN file importer, tabbed VPN connection editor, authenticationdialog, and toast notification popup.
NetworkMgr/wg_api.py: WireGuard configuration parser, saver, and deleter.NetworkMgr/configuration.py: Added the VPN Settings tab and integrated VPN management andnotifications.
NetworkMgr/trayicon.py: Single-row connection items for OpenVPN, WireGuard, and Wired interfaces,VPN import entry, and connection notifications.
Testing
.ovpnand WireGuard.confprofiles (with both external and inline<ca>,<cert>,<key>,<tls-auth>,<tls-crypt>blocks) and verified generated configurations in/usr/local/etc/openvpn/and/usr/local/etc/wireguard/.openvpnis not yet installed.