From 1e8687e944b75d7855cf72c95670e27db68c620c Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 20 Sep 2023 19:04:31 +0200 Subject: [PATCH] fix(migrations): use dweb.link this is a quick fix to allow users who's ISP is blocking ipfs.io to benefit from HTTPS mirror --- repo/fsrepo/migrations/httpfetcher.go | 3 ++- repo/fsrepo/migrations/migrations.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/repo/fsrepo/migrations/httpfetcher.go b/repo/fsrepo/migrations/httpfetcher.go index 1f3d575a949..9665a1e98ce 100644 --- a/repo/fsrepo/migrations/httpfetcher.go +++ b/repo/fsrepo/migrations/httpfetcher.go @@ -10,7 +10,8 @@ import ( ) const ( - defaultGatewayURL = "https://ipfs.io" + // default is different name than ipfs.io which is being blocked by some ISPs + defaultGatewayURL = "https://dweb.link" // Default maximum download size. defaultFetchLimit = 1024 * 1024 * 512 ) diff --git a/repo/fsrepo/migrations/migrations.go b/repo/fsrepo/migrations/migrations.go index 6894d73a777..e612b8abb20 100644 --- a/repo/fsrepo/migrations/migrations.go +++ b/repo/fsrepo/migrations/migrations.go @@ -153,7 +153,7 @@ func ReadMigrationConfig(repoRoot string, userConfigFile string) (*config.Migrat // GetMigrationFetcher creates one or more fetchers according to // downloadSources,. func GetMigrationFetcher(downloadSources []string, distPath string, newIpfsFetcher func(string) Fetcher) (Fetcher, error) { - const httpUserAgent = "go-ipfs" + const httpUserAgent = "kubo/migration" const numTriesPerHTTP = 3 var fetchers []Fetcher