CLI that helps to filter Mullvad servers and pick the closest one.
* The actual output is not colored, this is just for demo purposes. :)
Note
By default pingmole will try to locate the relays.json
file and use it to build the list of available servers. Otherwise, a request to Mullvad API will be performed.
Make sure to install Rust toolchain first. After that you can install pingmole via Cargo:
cargo install --locked --git https://github.com/norskeld/pingmole
- Filter servers by:
- Ping round-trip time;
- Used protocol: OpenVPN or WireGuard;
- Distance from the current location.
- Sort results by:
- Mean RTT;
- Median RTT (default);
- Distance;
- Country;
- City.
- Ping matching Mullvad servers.
- Print results in a table.
Note
While pingmole automatically detects your geolocation using the am.i.mullvad.net endpoint, I highly recommend specifying latitude
and longitude
via the corresponding CLI options to pinpoint your location. This is because often, detecting the geolocation using the IP address is simply wrong.
Distance is calculated using the haversine formula. This affects the accuracy of the results, but generally it's good enough.
Note
Results may vary depending on the number of factors, including the current network or target server load. It's a good idea to run the test multiple times and try to increase the number of pings, like 16.
Pinging is done using TCP, not ICMP. Reasons:
- ICMP pinging turned out to be harder to implement, so I've decided to roll with TCP.
- ICMP requires raw sockets and, consequently, elevated priviliges on Linux/macOS.
- ICMP pinging can be less precise due to lower handling/forwarding priority.
MIT.