Expand description
A Hyper connector pooling Mullvad WireGuard tunnels.
Hyper owns HTTP connection pooling and request dispatch. New connections are assigned to healthy tunnels; failed tunnels are repaired for future connections without replaying requests.
use hyper_connector_mullvad::{LocationFilter, MullvadConnector};
use http_body_util::Empty;
use hyper::body::Bytes;
use hyper_util::{client::legacy::Client, rt::TokioExecutor};
let mullvad = MullvadConnector::builder()
.max_connections(3)
.location_filter(LocationFilter::parse("Sweden")?)
.build().await?;
let _client = Client::builder(TokioExecutor::new())
.build::<_, Empty<Bytes>>(mullvad.clone());
mullvad.shutdown().await;Structs§
- Connection
Snapshot - Non-sensitive state for an active pool slot.
- Mullvad
Connector - A cloneable Hyper connector routed through a pool of Mullvad tunnels.
- Mullvad
Connector Builder - Builder for
MullvadConnector. - Startup
Report - Summary of discovery and initial connection attempts.
Enums§
- Continent
- A supported continent/region.
- Error
- Errors produced during discovery, connection, or a single HTTP send.
- Location
Filter - A geographic restriction applied to discovered Mullvad relays.
Constants§
- DEFAULT_
MAX_ CONNECTIONS - The default number of Mullvad tunnels maintained by the connector.
- MULLVAD_
MAX_ CONNECTIONS - The maximum pool size supported by this crate.