IPv6 hosts check
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/debridmediamanager/zurg/internal/handlers"
|
||||
"github.com/debridmediamanager/zurg/internal/torrent"
|
||||
"github.com/debridmediamanager/zurg/internal/universal"
|
||||
"github.com/debridmediamanager/zurg/pkg/hosts"
|
||||
"github.com/debridmediamanager/zurg/pkg/http"
|
||||
"github.com/debridmediamanager/zurg/pkg/logutil"
|
||||
"github.com/debridmediamanager/zurg/pkg/premium"
|
||||
@@ -35,7 +36,7 @@ func MainApp(configPath string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
apiClient := http.NewHTTPClient(config.GetToken(), config.GetRetriesUntilFailed(), config.GetRealDebridTimeout(), config, log.Named("httpclient"))
|
||||
apiClient := http.NewHTTPClient(config.GetToken(), config.GetRetriesUntilFailed(), config.GetRealDebridTimeout(), nil, config, log.Named("httpclient"))
|
||||
|
||||
rd := realdebrid.NewRealDebrid(apiClient, log.Named("realdebrid"))
|
||||
|
||||
@@ -51,7 +52,14 @@ func MainApp(configPath string) {
|
||||
utils.EnsureDirExists("data") // Ensure the data directory exists
|
||||
torrentMgr := torrent.NewTorrentManager(config, rd, p, log.Named("manager"))
|
||||
|
||||
downloadClient := http.NewHTTPClient(config.GetToken(), config.GetRetriesUntilFailed(), 0, config, log.Named("dlclient"))
|
||||
var ipv6List []string
|
||||
if config.ShouldForceIPv6() {
|
||||
ipv6List, err = hosts.FetchHosts(hosts.IPV6)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
downloadClient := http.NewHTTPClient(config.GetToken(), config.GetRetriesUntilFailed(), 0, ipv6List, config, log.Named("dlclient"))
|
||||
downloader := universal.NewDownloader(downloadClient)
|
||||
|
||||
router := chi.NewRouter()
|
||||
|
||||
@@ -16,8 +16,8 @@ func ShowVersion() {
|
||||
version.GetBuiltAt(), version.GetGitCommit(), version.GetVersion())
|
||||
}
|
||||
|
||||
func NetworkTest(netTestType string) {
|
||||
realdebrid.RunTest(netTestType)
|
||||
func NetworkTest(testType string) {
|
||||
realdebrid.RunTest(testType)
|
||||
}
|
||||
|
||||
func ClearDownloads() {
|
||||
|
||||
Reference in New Issue
Block a user