Skip to content

Fix mullvad vpn#2270

Open
kl wants to merge 4 commits into
greshake:masterfrom
kl:fix-mullvad-vpn
Open

Fix mullvad vpn#2270
kl wants to merge 4 commits into
greshake:masterfrom
kl:fix-mullvad-vpn

Conversation

@kl
Copy link
Copy Markdown

@kl kl commented Apr 24, 2026

The Mullvad status parsing was done by calling mullvad status and parsing this output which has changed so the country code was not extracted correctly.

This PR changes that instead parse the JSON output from mullvad status -j, which should be more robust.

It also adds a connecting state to the VPN block so that the error icon is not shown when the VPN is connecting. Note that I only implemented the connecting state for Mullvad, so the other VPNs will behave as they did before and show the error icon when connecting.

Closes: #1882

@ammgws
Copy link
Copy Markdown
Collaborator

ammgws commented Apr 25, 2026

Has the JSON output flag always been there or is it only in certain newer versions of mullvad cli?

@kl
Copy link
Copy Markdown
Author

kl commented Apr 27, 2026

It's been there since the beginning of 2025. Do you prefer adding a check to see if the flag is available and if not fall back to the old parsing?

@ammgws
Copy link
Copy Markdown
Collaborator

ammgws commented Apr 28, 2026

The goal is not to break user's config if it is not guaranteed that all users have a version > 2025. It depends how users usually install mullvad. If it is not from a distro package manager then likely we can assume most or all users will have the latest mullvad client version. Since I do not use mullvad I am not sure - can you advise?

@kl
Copy link
Copy Markdown
Author

kl commented May 5, 2026

I think it is fine in this case as I think very few users would be on such an old version and the app would warn them that they are using an outdated version as well. The offical Mullvad Ubuntu and Fedora repos as well as the AUR package all have the latest version of Mullvad.

I also added a commit fixing an issue I found with the mullvad json status command.

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] Add Connecting status to VPN block

2 participants