change: Mullvad import is WireGuard-only #145

Merged
mysticalsoap merged 1 commit from change/mullvad-wireguard-only into trunk 2026-08-24 13:04:26 -04:00
Owner

Problem

Mullvad removed OpenVPN on 2026-01-15, server-side included, and the scraped /en/servers table no longer exists — the scrape raised before the WireGuard section could run, so Mullvad import was dead end-to-end. Probe details on #32 (this addresses that issue's Mullvad half; the Windscribe half stays open).

Fix

MullvadProvider.fetch keeps only the relay-list path: the page scrape, the four-entry OpenVPN protocol table and the certificate downloads (which served only OpenVPN configs) are gone. The protocol table shrinks to WireGuard's single fixed port rather than disappearing, because create_server_dict and the gui protocol tab index the provider's entry unguarded.

One guard rides along in the gui: the re-import carry-forward copied the previously selected protocol into the new table without checking it still exists, so a selection from the old four-entry table would dangle and crash the next connect. It now falls back to protocol_1.

Verification

pytest — 328 passed. The Mullvad characterization tests now pin the WG-only shape (all servers WireGuard, single-entry protocol table); the legacy-scrape fixture and the tableless-page test are deleted with the behavior they pinned. Key-upload and auth-failure tests unchanged. ruff + compileall gates clean. Note: the live WG key-upload endpoint answers but needs a real-account test before 0.9.2 ships Mullvad as working — the legacy /wg/ API may be retired in favor of the devices API at any point.

  • The relay parse ran each country's inner loop once per JSON key (for k,v in c.items() with an unused k,v) — output identical, work tripled. Dropped.
  • resources/Mullvad_config and the seeded openvpn.conf are now vestigial for Mullvad (nothing can connect over OpenVPN); left in place — their fate is #143's template restructuring.

🤖 Generated with Claude Code

## Problem Mullvad removed OpenVPN on 2026-01-15, server-side included, and the scraped `/en/servers` table no longer exists — the scrape raised before the WireGuard section could run, so Mullvad import was dead end-to-end. Probe details on #32 (this addresses that issue's Mullvad half; the Windscribe half stays open). ## Fix `MullvadProvider.fetch` keeps only the relay-list path: the page scrape, the four-entry OpenVPN protocol table and the certificate downloads (which served only OpenVPN configs) are gone. The protocol table shrinks to WireGuard's single fixed port rather than disappearing, because `create_server_dict` and the gui protocol tab index the provider's entry unguarded. One guard rides along in the gui: the re-import carry-forward copied the previously selected protocol into the new table without checking it still exists, so a selection from the old four-entry table would dangle and crash the next connect. It now falls back to `protocol_1`. ## Verification `pytest` — 328 passed. The Mullvad characterization tests now pin the WG-only shape (all servers WireGuard, single-entry protocol table); the legacy-scrape fixture and the tableless-page test are deleted with the behavior they pinned. Key-upload and auth-failure tests unchanged. `ruff` + compileall gates clean. Note: the live WG key-upload endpoint answers but needs a real-account test before 0.9.2 ships Mullvad as working — the legacy `/wg/` API may be retired in favor of the devices API at any point. ## Related fixes (found along the way, technically out of scope) - The relay parse ran each country's inner loop once per JSON key (`for k,v in c.items()` with an unused k,v) — output identical, work tripled. Dropped. - `resources/Mullvad_config` and the seeded `openvpn.conf` are now vestigial for Mullvad (nothing can connect over OpenVPN); left in place — their fate is #143's template restructuring. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
change: Mullvad import is WireGuard-only
All checks were successful
ci / test (pull_request) Successful in 29s
ci / test (push) Successful in 27s
9e70e84ef4
Mullvad removed OpenVPN entirely on 2026-01-15, server-side included,
and the scraped /en/servers table is gone from the live site -- the
scrape raised before the WireGuard section could run, so import was
dead end-to-end (#32). The routine drops the scrape, the OpenVPN
protocol table and the certificate downloads that only served OpenVPN
configs, keeping the relay-list path. The protocol table shrinks to
WireGuard's single fixed port rather than disappearing: create_server_dict
and the protocol tab index the provider's entry unguarded.

The gui's re-import carry-forward copied the previously selected
protocol into the new table without checking it still exists -- a
selection from the old four-entry table would dangle and crash the next
connect. It now falls back to protocol_1 when the carried selection is
gone.

The relay parse also drops a stray 'for k,v in c.items()' that re-ran
each country's inner parse once per JSON key; output was identical, the
work was tripled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mysticalsoap deleted branch change/mullvad-wireguard-only 2026-08-24 13:04:26 -04:00
Sign in to join this conversation.
No description provided.