{"id":21442094,"url":"https://github.com/norskeld/pingmole","last_synced_at":"2025-07-14T17:32:43.672Z","repository":{"id":224436194,"uuid":"763244648","full_name":"norskeld/pingmole","owner":"norskeld","description":"CLI that helps to filter Mullvad servers and pick the closest one.","archived":false,"fork":false,"pushed_at":"2024-04-16T11:28:34.000Z","size":268,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-16T14:37:05.130Z","etag":null,"topics":["cli","mullvad","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/norskeld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-25T22:54:39.000Z","updated_at":"2024-03-20T19:32:54.000Z","dependencies_parsed_at":"2024-02-26T00:23:12.634Z","dependency_job_id":"a5efc822-6772-4d08-b58a-9595f81f2ff3","html_url":"https://github.com/norskeld/pingmole","commit_stats":null,"previous_names":["norskeld/pingmole"],"tags_count":0,"template":false,"template_full_name":"norskeld/rustafarian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norskeld%2Fpingmole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norskeld%2Fpingmole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norskeld%2Fpingmole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/norskeld%2Fpingmole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/norskeld","download_url":"https://codeload.github.com/norskeld/pingmole/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225990484,"owners_count":17556153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","mullvad","rust"],"created_at":"2024-11-23T01:48:35.379Z","updated_at":"2024-11-23T01:48:35.951Z","avatar_url":"https://github.com/norskeld.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pingmole\n\n[![Checks](https://img.shields.io/github/actions/workflow/status/norskeld/pingmole/checks.yml?style=flat-square\u0026colorA=22272d\u0026colorB=22272d\u0026label=checks)](https://github.com/norskeld/pingmole/actions/workflows/checks.yml)\n\nCLI that helps to filter [Mullvad] servers and pick the closest one.\n\n![Results example](/.github/assets/results.png)\n\n\u003csup\u003e\u003csub\u003e* The actual output is not colored, this is just for demo purposes. :)\u003c/sub\u003e\u003c/sup\u003e\n\n## Installation\n\n\u003e [!NOTE]\\\n\u003e 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.\n\n### From source (Cargo)\n\nMake sure to [install Rust toolchain][rust-toolchain] first. After that you can install pingmole via **Cargo**:\n\n```shell\ncargo install --locked --git https://github.com/norskeld/pingmole\n```\n\n## Features\n\n- [x] Filter servers by:\n  - [x] Ping round-trip time;\n  - [x] Used protocol: OpenVPN or WireGuard;\n  - [x] Distance from the current location.\n- [x] Sort results by:\n  - [x] Mean RTT;\n  - [x] Median RTT (default);\n  - [x] Distance;\n  - [x] Country;\n  - [x] City.\n- [x] Ping matching Mullvad servers.\n- [x] Print results in a table.\n\n## Distance calculation\n\n\u003e [!NOTE]\\\n\u003e While pingmole automatically detects your geolocation using the [am.i.mullvad.net](https://am.i.mullvad.net/json) 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.\n\nDistance is calculated using the [haversine formula][haversine]. This affects the accuracy of the results, but generally it's good enough.\n\n## Pinging\n\n\u003e [!NOTE]\\\n\u003e 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.\n\nPinging is done using TCP, not ICMP. Reasons:\n\n- ICMP pinging turned out to be harder to implement, so I've decided to roll with TCP.\n- ICMP requires raw sockets and, consequently, elevated priviliges on Linux/macOS.\n- ICMP pinging can be less precise due to lower handling/forwarding priority.\n\n## License\n\n[MIT](LICENSE).\n\n\u003c!-- Links. --\u003e\n\n[mullvad]: https://mullvad.net\n[rust-toolchain]: https://rust-lang.org/tools/install\n[haversine]: https://en.wikipedia.org/wiki/Haversine_formula\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorskeld%2Fpingmole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorskeld%2Fpingmole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorskeld%2Fpingmole/lists"}