# Mullvad-Leta

This is the implementation of the Mullvad-Leta meta-search engine.

This engine REQUIRES that searxng operate within a Mullvad VPN

If using docker, consider using gluetun for easily connecting to the Mullvad

- https://github.com/qdm12/gluetun

Otherwise, follow instructions provided by Mullvad for enabling the VPN on Linux

- https://mullvad.net/en/help/install-mullvad-app-linux

Hint

The `EngineTraits` is empty by default. Maintainers have to run `make data.traits` (in the Mullvad VPN / `fetch_traits`) and rebase the modified JSON file `searx/data/engine_traits.json` on every single update of SearXNG!

searx.engines.mullvad_leta.assign_headers(headers: dict) → dict

  Assigns the headers to make a request to Mullvad Leta

searx.engines.mullvad_leta.fetch_traits(engine_traits: EngineTraits)

  Fetch languages and regions from Mullvad-Leta

  Warning

  Fetching the engine traits also requires a Mullvad VPN connection. If not connected, then an error message will print and no traits will be updated.

searx.engines.mullvad_leta.is_vpn_connected(dom: HtmlElement) → bool

  Returns true if the VPN is connected, False otherwise

searx.engines.mullvad_leta.response(resp: Response)

  Checks if connected to Mullvad VPN, then extracts the search results from the DOM resp: requests response object