Compare commits
2 Commits
v20220312.
...
v20220312.
Author | SHA1 | Date | |
---|---|---|---|
415cfa8ee7 | |||
0bf9fc463a |
@ -17,6 +17,8 @@ Execute `mullvad-best-server`. It outputs the code, e.g. `de05`. You can then co
|
||||
Usage of dist/mullvad-best-server_darwin_amd64/mullvad-best-server:
|
||||
-c string
|
||||
Server country code, e.g. ch for Switzerland (default "ch")
|
||||
-l string
|
||||
Log level. Allowed values: trace, debug, info, warn, error, fatal, panic (default "info")
|
||||
-o string
|
||||
Output format. 'json' outputs server json
|
||||
-t string
|
||||
|
3
main.go
3
main.go
@ -29,6 +29,9 @@ func main() {
|
||||
zerolog.SetGlobalLevel(level)
|
||||
servers := getServers(*typeFlag)
|
||||
bestIndex := selectBestServerIndex(servers, *countryFlag)
|
||||
if bestIndex == -1 {
|
||||
log.Fatal().Str("country", *countryFlag).Msg("No servers for country found.")
|
||||
}
|
||||
best := servers[bestIndex]
|
||||
log.Debug().Interface("server", best).Msg("Best latency server found.")
|
||||
hostname := strings.TrimSuffix(best.Hostname, "-wireguard")
|
||||
|
Reference in New Issue
Block a user