Skip to content
generated from norskeld/rustafarian

CLI that helps to filter Mullvad servers and pick the closest one.

License

Notifications You must be signed in to change notification settings

norskeld/pingmole

Repository files navigation

pingmole

Checks

CLI that helps to filter Mullvad servers and pick the closest one.

Results example

* The actual output is not colored, this is just for demo purposes. :)

Installation

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.

From source (Cargo)

Make sure to install Rust toolchain first. After that you can install pingmole via Cargo:

cargo install --locked --git https://github.com/norskeld/pingmole

Features

  • 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.

Distance calculation

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.

Pinging

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.

License

MIT.

About

CLI that helps to filter Mullvad servers and pick the closest one.

Topics

Resources

License

Stars

Watchers

Forks

Languages