diff --git a/main.go b/main.go index d1c350d..5970950 100644 --- a/main.go +++ b/main.go @@ -579,9 +579,12 @@ func main() { logger.Fatal("You must provide either a config file or a remote config URL, not both") } - // clean up the reomte config URL for backwards compatibility + // clean up the remote config URL for backwards compatibility + remoteConfigURL = strings.TrimRight(remoteConfigURL, "/") remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/gerbil/get-config") - remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/") + remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/gerbil/receive-bandwidth") + remoteConfigURL = strings.TrimSuffix(remoteConfigURL, "/gerbil") + remoteConfigURL = strings.TrimRight(remoteConfigURL, "/") var key wgtypes.Key // if generateAndSaveKeyTo is provided, generate a private key and save it to the file. if the file already exists, load the key from the file