Handle / better

This commit is contained in:
Owen
2025-03-12 20:37:57 -04:00
parent 5e673c829b
commit 067e079293

View File

@@ -214,6 +214,9 @@ func resolveDomain(domain string) (string, error) {
host = strings.TrimPrefix(host, "https://")
}
// if there are any trailing slashes, remove them
host = strings.TrimSuffix(host, "/")
// Lookup IP addresses
ips, err := net.LookupIP(host)
if err != nil {
@@ -354,6 +357,8 @@ func main() {
host = strings.TrimPrefix(host, "https://")
}
host = strings.TrimSuffix(host, "/")
// Create WireGuard service
wgService, err = wg.NewWireGuardService(interfaceName, mtuInt, generateAndSaveKeyTo, host, id, client)
if err != nil {