From 69bb5db15aa5332d1a92c187f4e8cfd74b8336d6 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Thu, 10 Apr 2025 20:12:49 -0400 Subject: [PATCH] fix some build errors --- net_mirror.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/net_mirror.go b/net_mirror.go index 09ce23a..33b7d5b 100644 --- a/net_mirror.go +++ b/net_mirror.go @@ -5,9 +5,7 @@ import ( "fmt" "net" "net/http" - "net/url" "os" - "strings" "github.com/go-i2p/go-meta-listener/mirror" ) @@ -48,27 +46,3 @@ func init() { http.DefaultClient = httpClient http.DefaultTransport = httpClient.Transport } - -func Dial(network, addr string) (net.Conn, error) { - // convert the addr to a URL - url, err := url.Parse(addr) - if err != nil { - return nil, err - } - // get the domain name - domain := url.Hostname() - // get the top-level domain - fr := strings.Split(domain, ".") - tld := fr[len(fr)-1] - switch tld { - case "i2p": - // I2P is a special case, we need to use the garlic dialer - return Garlic.Dial(addr) - case "onion": - // Onion is a special case, we need to use the onion dialer - return Onion.Dial(addr) - default: - // For everything else, we can use the default dialer - return net.Dial(network, addr) - } -}