|
cipher
Previously, when a Shadowsocks access method was configured with an unsupported
cipher (e.g. xchacha20-ietf-poly1305), the daemon would log an error in a
background task but the UI reported the method as verified (false positive).
Root cause: `HttpsConnectorHandle::set_connection_mode` is fire-and-forget; cipher
validation errors in the background task were swallowed and never propagated back.
Fix: expose `validate_connection_mode` from `mullvad-api` that calls the existing
`InnerConnectionMode::try_from` synchronously, then call it:
- In `add_access_method` / `update_access_method` (reject invalid ciphers at save time)
- In `on_test_proxy_as_access_method` (reject before spawning the test task)
Adds `Error::InvalidAccessMethod` to the daemon's error enum and unit tests for
the new validation function in `mullvad-api`.
|