From f46bf77c801028152aef3636c88d9dbe72b0276d Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 21 Sep 2023 16:37:26 +0200 Subject: [PATCH] fix(migrations): use dweb.link (#10133) 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