mirror of
https://github.com/fosrl/newt.git
synced 2026-02-09 06:26:42 +00:00
Handle / better
This commit is contained in:
5
main.go
5
main.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user