Skip to content

Commit 053293f

Browse files
authored
feat: v1.20 with check.ipfs.network button (#301)
* fix: add diagnostic-service-url flag adds RAINBOW_DIAGNOSTIC_SERVICE_URL configuration option to expose boxo/gateway's DiagnosticServiceURL setting. when gateway returns 504 timeout, users will see "Inspect retrievability of CID" button linking to diagnostic service with CID as query parameter. defaults to https://check.ipfs.network, can be disabled by setting to empty string. related to ipshipyard/roadmaps#14 * docs: clarify diagnostic service provider and self-hosting option * chore: release v1.20.0
1 parent 64a9088 commit 053293f

File tree

6 files changed

+32
-3
lines changed

6 files changed

+32
-3
lines changed

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,24 @@ The following emojis are used to highlight certain changes:
1717

1818
### Changed
1919

20-
- Upgrade go-ds-pebble to [v0.5.3](https://github.com/ipfs/go-ds-pebble/releases/tag/v0.5.3)
21-
2220
### Fixed
2321

2422
### Removed
2523

2624
### Security
2725

2826

27+
## v1.20.0
28+
29+
### Added
30+
31+
- `--diagnostic-service-url` / `RAINBOW_DIAGNOSTIC_SERVICE_URL`: Configure URL for CID retrievability diagnostic service (default: `https://check.ipfs.network`). When gateway returns 504 timeout, users see "Inspect retrievability of CID" button linking to diagnostic service. Set to empty string to disable.
32+
33+
### Changed
34+
35+
- Upgrade go-ds-pebble to [v0.5.3](https://github.com/ipfs/go-ds-pebble/releases/tag/v0.5.3)
36+
37+
2938
## v1.19.0
3039

3140
### Added

docs/environment-variables.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- [`RAINBOW_MAX_CONCURRENT_REQUESTS`](#rainbow_max_concurrent_requests)
3030
- [`RAINBOW_RETRIEVAL_TIMEOUT`](#rainbow_retrieval_timeout)
3131
- [`RAINBOW_MAX_RANGE_REQUEST_FILE_SIZE`](#rainbow_max_range_request_file_size)
32+
- [`RAINBOW_DIAGNOSTIC_SERVICE_URL`](#rainbow_diagnostic_service_url)
3233
- [Experiments](#experiments)
3334
- [`RAINBOW_SEED_PEERING`](#rainbow_seed_peering)
3435
- [`RAINBOW_SEED_PEERING_MAX_INDEX`](#rainbow_seed_peering_max_index)
@@ -313,6 +314,16 @@ Set to `0` to disable this limit and allow range requests for files of any size
313314

314315
Default: `5368709120` (5 GiB - matches Cloudflare's threshold to prevent excess billing)
315316

317+
### `RAINBOW_DIAGNOSTIC_SERVICE_URL`
318+
319+
URL for a service to diagnose CID retrievability issues. When the gateway returns a 504 Gateway Timeout error, an "Inspect retrievability of CID" button will be shown that links to this service with the CID appended as `?cid=<CID-to-diagnose>`.
320+
321+
The default service is provided by [Shipyard](https://ipshipyard.com) on best-effort basis, but anyone can run their own instance of [ipfs-check](https://github.com/ipfs/ipfs-check) and point this setting to it.
322+
323+
Set to empty string to disable the button.
324+
325+
Default: `https://check.ipfs.network`
326+
316327
## Experiments
317328

318329
### `RAINBOW_SEED_PEERING`

handlers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ func setupGatewayHandler(cfg Config, nd *Node) (http.Handler, error) {
320320
MaxConcurrentRequests: cfg.MaxConcurrentRequests, // When exceeded, returns 429 with Retry-After: 60 (hardcoded in boxo)
321321
RetrievalTimeout: cfg.RetrievalTimeout,
322322
MaxRangeRequestFileSize: cfg.MaxRangeRequestFileSize,
323+
DiagnosticServiceURL: cfg.DiagnosticServiceURL,
323324
}
324325
gwHandler := gateway.NewHandler(gwConf, backend)
325326

main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,12 @@ Generate an identity seed and launch a gateway:
486486
EnvVars: []string{"RAINBOW_MAX_RANGE_REQUEST_FILE_SIZE"},
487487
Usage: "Maximum file size in bytes for which range requests are supported. Range requests for larger files will return 501. Set to 0 to disable limit",
488488
},
489+
&cli.StringFlag{
490+
Name: "diagnostic-service-url",
491+
Value: "https://check.ipfs.network",
492+
EnvVars: []string{"RAINBOW_DIAGNOSTIC_SERVICE_URL"},
493+
Usage: "URL for a service to diagnose CID retrievability issues. When the gateway returns a 504 Gateway Timeout error, an \"Inspect retrievability of CID\" button will be shown. Set to empty string to disable",
494+
},
489495
&cli.StringSliceFlag{
490496
Name: "dnslink-resolvers",
491497
Value: cli.NewStringSlice(". : auto"),
@@ -720,6 +726,7 @@ share the same seed as long as the indexes are different.
720726
MaxConcurrentRequests: cctx.Int("max-concurrent-requests"),
721727
RetrievalTimeout: cctx.Duration("retrieval-timeout"),
722728
MaxRangeRequestFileSize: cctx.Int64("max-range-request-file-size"),
729+
DiagnosticServiceURL: cctx.String("diagnostic-service-url"),
723730
}
724731

725732
// Store original values for display

setup.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ type Config struct {
178178
MaxConcurrentRequests int
179179
RetrievalTimeout time.Duration
180180
MaxRangeRequestFileSize int64
181+
DiagnosticServiceURL string
181182
}
182183

183184
func SetupNoLibp2p(ctx context.Context, cfg Config, dnsCache *cachedDNS) (*Node, error) {

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "v1.19.0"
2+
"version": "v1.20.0"
33
}

0 commit comments

Comments
 (0)