Go to file
Jeffrey Paul 7f736db2cc update readme 2024-06-09 09:08:56 -07:00
bin add bin/ dir 2024-06-09 07:53:46 -07:00
cmd/mullvadclosest latest 2024-06-09 07:40:44 -07:00
.gitignore update .gitignore and makefile 2024-06-09 07:53:11 -07:00
LICENSE add readme and license 2024-06-09 08:51:51 -07:00
Makefile update .gitignore and makefile 2024-06-09 07:53:11 -07:00
README.md update readme 2024-06-09 09:08:56 -07:00
embed.go latest 2024-06-09 07:40:44 -07:00
go.mod latest 2024-06-09 07:40:44 -07:00
go.sum latest 2024-06-09 07:40:44 -07:00
relays.2024-06-04.json initial 2024-06-05 00:24:36 -07:00



A small golang program that checks your latency to all of the known mullvad relays.

This will use your local relay database as installed by the mullvad client if it finds it. Otherwise, it will use a bundled copy which may be a bit out of date. If that happens, contact me and I'll update it.

This will show you the top 25 lowest latency relays (VPN servers) to you, and the 5 highest for comparison.


The go ICMP ping library I'm using doesn't work on OSX if you're not root, so the program requires it. Oh well.


Make sure you're disconnected from the VPN when you run this. It needs to be able to ping the relays directly, and if you're connected to the VPN you'll get the latency through the VPN server to which you're connected, which is not what you want.


GOPROXY=direct go run sneak.berlin/go/mullvadclosest/cmd/mullvadclosest@4dd5e871f830ff62bb30c2290623ad9d8c4d4554

The GOPROXY=direct means to download the code directly from my servers, not the Google-operated golang module proxy. Given that you're running this program as root from a random place on the internet, downloading it directly from me avoids the case where Google can serve you arbitrary code that runs on your machine.

The full git commit hash is provided to ensure that you're running the specific version of the code that I've tested and that you're expecting to run. Don't do "git run @latest" because it's just granting random people code exec on your machine. (Same goes for docker images that use any tag that uses : instead of a specific hash identified by @.)

Example output

Run from the southwestern US:

root@bastion:~# GOPROXY=direct go run sneak.berlin/go/mullvadclosest/cmd/mullvadclosest@latest
Checking liveness 100% |███████████████████████████████████████████████████████████████████████████████████████████████| (684/684, 78 it/s)
Measuring latency 100% |███████████████████████████████████████████████████████████████████████████████████████████████| (673/673, 7 it/s)
Total relays: 684
Live relays: 673
Dead relays: 11
Min latency: 11.240837ms (Relay(hostname=us-lax-wg-203, ip=, country=USA))
Max latency: 351.145942ms (Relay(hostname=sg-sin-wg-002, ip=, country=Singapore))
Median latency: 152.235439ms (Relay(hostname=de-fra-wg-106, ip=, country=Germany))
Mean latency: 122.094918ms
Stddev latency: 63.354381ms

Country              City                 Hostname                       Latency
USA                  Los Angeles, CA      us-lax-wg-203                  11.240837ms
USA                  Los Angeles, CA      us-lax-wg-303                  11.414964ms
USA                  Los Angeles, CA      us-lax-ovpn-201                11.575832ms
USA                  Los Angeles, CA      us-lax-wg-404                  12.160305ms
USA                  Los Angeles, CA      us-lax-wg-102                  12.189879ms
USA                  Los Angeles, CA      us-lax-ovpn-402                12.37345ms
USA                  Los Angeles, CA      us-lax-wg-403                  12.724075ms
USA                  Los Angeles, CA      us-lax-wg-401                  12.802629ms
USA                  Los Angeles, CA      us-lax-ovpn-202                13.044014ms
USA                  Los Angeles, CA      us-lax-wg-202                  13.129124ms
USA                  Los Angeles, CA      us-lax-wg-406                  13.655117ms
USA                  Los Angeles, CA      us-lax-wg-302                  13.804244ms
USA                  Los Angeles, CA      us-lax-wg-501                  13.854577ms
USA                  Los Angeles, CA      us-lax-wg-502                  14.668269ms
USA                  Los Angeles, CA      us-lax-br-401                  15.198631ms
USA                  Los Angeles, CA      us-lax-wg-405                  15.47022ms
USA                  Los Angeles, CA      us-lax-ovpn-102                15.764457ms
USA                  Los Angeles, CA      us-lax-wg-503                  15.918306ms
USA                  Los Angeles, CA      us-lax-ovpn-401                16.264245ms
USA                  Los Angeles, CA      us-lax-wg-103                  16.35017ms
USA                  Los Angeles, CA      us-lax-wg-201                  16.469779ms
USA                  Los Angeles, CA      us-lax-ovpn-101                16.655777ms
USA                  Los Angeles, CA      us-lax-ovpn-403                17.289434ms
USA                  Los Angeles, CA      us-lax-wg-402                  18.19131ms
USA                  Los Angeles, CA      us-lax-wg-101                  18.290308ms

South Africa         Johannesburg         za-jnb-wg-001                  288.186466ms
Singapore            Singapore            sg-sin-wg-001                  342.030852ms
Singapore            Singapore            sg-sin-wg-003                  346.614045ms
Singapore            Singapore            sg-sin-wg-002                  351.145942ms

Run from an LTE connection in Türkiye:

akrotiri:~$ GOPROXY=direct sudo go run sneak.berlin/go/mullvadclosest/cmd/mullvadclosest@latest
Checking liveness 100% |███████████████████████████████████████████████████████████████████████████████████████████| (684/684, 25 it/s)
Measuring latency 100% |███████████████████████████████████████████████████████████████████████████████████████████| (602/602, 5 it/s)
Total relays: 684
Live relays: 602
Dead relays: 82
Min latency: 87.088ms (Relay(hostname=nl-ams-ovpn-003, ip=, country=Netherlands))
Max latency: 560.733ms (Relay(hostname=th-bkk-wg-001, ip=, country=Thailand))
Median latency: 155.925ms (Relay(hostname=gr-ath-wg-101, ip=, country=Greece))
Mean latency: 175.519705ms
Stddev latency: 84.258738ms

Country              City                 Hostname                       Latency
Netherlands          Amsterdam            nl-ams-ovpn-003                87.088ms
Netherlands          Amsterdam            nl-ams-wg-006                  87.523ms
Netherlands          Amsterdam            nl-ams-wg-101                  89.472ms
Netherlands          Amsterdam            nl-ams-wg-201                  91.061ms
Netherlands          Amsterdam            nl-ams-ovpn-005                91.272ms
Netherlands          Amsterdam            nl-ams-wg-004                  91.527ms
Belgium              Brussels             be-bru-wg-102                  92.082ms
Netherlands          Amsterdam            nl-ams-ovpn-004                93.036ms
Belgium              Brussels             be-bru-wg-101                  93.22ms
Germany              Frankfurt            de-fra-wg-004                  94.146ms
Netherlands          Amsterdam            nl-ams-ovpn-001                94.465ms
Netherlands          Amsterdam            nl-ams-wg-007                  94.578ms
Germany              Frankfurt            de-fra-ovpn-003                94.681ms
Germany              Dusseldorf           de-dus-wg-002                  95.224ms
Netherlands          Amsterdam            nl-ams-wg-001                  95.555ms
UK                   London               gb-lon-wg-202                  96.297ms
UK                   London               gb-lon-wg-201                  96.468ms
Germany              Frankfurt            de-fra-ovpn-006                96.544ms
Germany              Frankfurt            de-fra-wg-006                  96.58ms
UK                   London               gb-lon-ovpn-002                96.775ms
UK                   London               gb-lon-wg-203                  96.822ms
Germany              Dusseldorf           de-dus-wg-001                  96.865ms
Belgium              Brussels             be-bru-ovpn-101                96.869ms
UK                   London               gb-lon-ovpn-301                96.922ms
UK                   London               gb-lon-ovpn-005                97.231ms

Australia            Perth                au-per-wg-302                  438.455ms
Singapore            Singapore            sg-sin-ovpn-102                444.711ms
Indonesia            Jakarta              id-jpu-wg-002                  504.1ms
Thailand             Bangkok              th-bkk-wg-001                  560.733ms


sneak <sneak@sneak.berlin>



Do with it what you will. There is no warranty, express or implied, including but not limited to merchantability or fitness for a particular purpose. Use at your own risk. Maybe clone it and read the code before you run random shit from some weirdo from the internet as root.