From b526da1b4f9d7f026fc53aa8eaa18c56b17965f3 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Thu, 11 Jan 2024 02:35:02 +0100 Subject: [PATCH] ipv6 fixes --- pkg/http/client.go | 1 + pkg/realdebrid/network.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/http/client.go b/pkg/http/client.go index 079b48c..a74b5b6 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -132,6 +132,7 @@ func NewHTTPClient(token string, maxRetries int, timeoutSecs int, restrictToHost restrictToHostsLen := len(restrictToHosts) randomHost := restrictToHosts[rand.Intn(restrictToHostsLen)] host = randomHost + address = net.JoinHostPort(host, port) } } ips, err := net.DefaultResolver.LookupIPAddr(ctx, host) diff --git a/pkg/realdebrid/network.go b/pkg/realdebrid/network.go index 88343cc..41943c8 100644 --- a/pkg/realdebrid/network.go +++ b/pkg/realdebrid/network.go @@ -162,7 +162,7 @@ func RunTest(testType string) { } } - fmt.Printf("Here are the results, you can copy-paste the following to your config.yml:\n\n") + fmt.Printf("complete!\n\nHere are the results, you can copy-paste the following to your config.yml:\n\n") fmt.Println("preferred_hosts:") for _, info := range okHosts { fmt.Printf(" - %s # hops: %d latency: %v\n", info.Address, info.Hops, info.Latency)