Skip to content

Commit 1bf59f7

Browse files
authored
Merge pull request #257 from ipfs/http/new-options
http retrieval: add denylist option and update boxo
2 parents a85c2fe + 6f63426 commit 1bf59f7

File tree

7 files changed

+62
-28
lines changed

7 files changed

+62
-28
lines changed

CHANGELOG.md

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

1818
### Changed
1919

20-
- upgrade to Boxo [v0.29.0](https://github.com/ipfs/boxo/releases/tag/v0.29.0)
21-
- upgrade go-ds-xxx packages to support `go-datastore` [v0.8.2](https://github.com/ipfs/go-datastore/releases/tag/v0.8.2) query API
22-
- updated go-libp2p to [v0.41.0](https://github.com/libp2p/go-libp2p/releases/tag/v0.41.0)
23-
2420
### Fixed
2521

2622
### Removed
2723

28-
### Fixed
24+
### Security
25+
26+
27+
## [1.13.0]
28+
29+
### Added
30+
31+
- New option `--http-retrieval-denylist`. It can be used to avoid connecting to disallowed hosts.
32+
33+
### Changed
34+
35+
- upgrade to Boxo [v0.29.1+](https://github.com/ipfs/boxo/releases/tag/v0.29.1)
36+
- upgrade go-ds-xxx packages to support `go-datastore` [v0.8.2](https://github.com/ipfs/go-datastore/releases/tag/v0.8.2) query API
37+
- updated go-libp2p to [v0.41.0](https://github.com/libp2p/go-libp2p/releases/tag/v0.41.0)
2938

3039
### Security
3140

41+
- This release upgrades quic-go to [v0.50.1](https://github.com/quic-go/quic-go/releases/tag/v0.50.1). It contains a fix for a remote-triggered panic.
3242

3343
## [1.12.0]
3444

docs/environment-variables.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [`ROUTING_IGNORE_PROVIDERS`](#routing_ignore_providers)
2020
- [`RAINBOW_HTTP_RETRIEVAL_ENABLE`](#rainbow_http_retrieval_enable)
2121
- [`RAINBOW_HTTP_RETRIEVAL_ALLOWLIST`](#rainbow_http_retrieval_allowlist)
22+
- [`RAINBOW_HTTP_RETRIEVAL_DENYLIST`](#rainbow_http_retrieval_denylist)
2223
- [`RAINBOW_HTTP_RETRIEVAL_WORKERS`](#rainbow_http_retrieval_workers)
2324
- [Experiments](#experiments)
2425
- [`RAINBOW_SEED_PEERING`](#rainbow_seed_peering)
@@ -186,8 +187,21 @@ Comma-separated list of hostnames that are allowed for HTTP retrievals.
186187

187188
When HTTP retrieval is enabled, this setting limits HTTP retrievals to only the specified hostnames. This provides a way to restrict which gateways Rainbow will attempt to retrieve blocks from.
188189

190+
Example: `example.com,ipfs.example.com`
191+
189192
Default: not set (when HTTP retrieval is enabled, all hosts are allowed)
190193

194+
### `RAINBOW_HTTP_RETRIEVAL_DENYLIST`
195+
196+
Comma-separated list of hostnames that are allowed for HTTP retrievals.
197+
198+
When HTTP retrieval is enabled, this setting disables retrieval from the specified hostnames. This provides a way to restrict specific hostnames that should not be used for retrieval.
199+
200+
Example: `example.com,ipfs.example.com`
201+
202+
Default: not set (when HTTP retrieval is enabled, all no hosts are disabled)
203+
204+
191205
### `RAINBOW_HTTP_RETRIEVAL_WORKERS`
192206

193207
The number of concurrent worker threads to use for HTTP retrievals.

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/felixge/httpsnoop v1.0.4
1111
github.com/ipfs-shipyard/nopfs v0.0.14
1212
github.com/ipfs-shipyard/nopfs/ipfs v0.25.0
13-
github.com/ipfs/boxo v0.29.0
13+
github.com/ipfs/boxo v0.29.2-0.20250401090827-fcc26de2640b
1414
github.com/ipfs/go-block-format v0.2.0
1515
github.com/ipfs/go-cid v0.5.0
1616
github.com/ipfs/go-datastore v0.8.2
@@ -25,7 +25,7 @@ require (
2525
github.com/ipfs/go-test v0.2.1
2626
github.com/ipfs/go-unixfsnode v1.10.0
2727
github.com/ipld/go-codec-dagpb v1.6.0
28-
github.com/libp2p/go-libp2p v0.41.0
28+
github.com/libp2p/go-libp2p v0.41.1
2929
github.com/libp2p/go-libp2p-kad-dht v0.30.2
3030
github.com/libp2p/go-libp2p-record v0.3.1
3131
github.com/libp2p/go-libp2p-routing-helpers v0.7.5
@@ -36,7 +36,7 @@ require (
3636
github.com/multiformats/go-multiaddr-dns v0.4.1
3737
github.com/multiformats/go-multicodec v0.9.0
3838
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
39-
github.com/prometheus/client_golang v1.21.0
39+
github.com/prometheus/client_golang v1.21.1
4040
github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529
4141
github.com/shirou/gopsutil/v3 v3.24.5
4242
github.com/stretchr/testify v1.10.0
@@ -80,7 +80,7 @@ require (
8080
github.com/francoispqt/gojay v1.2.13 // indirect
8181
github.com/fsnotify/fsnotify v1.7.0 // indirect
8282
github.com/gabriel-vasile/mimetype v1.4.6 // indirect
83-
github.com/gammazero/chanqueue v1.0.0 // indirect
83+
github.com/gammazero/chanqueue v1.1.0 // indirect
8484
github.com/gammazero/deque v1.0.0 // indirect
8585
github.com/getsentry/sentry-go v0.27.0 // indirect
8686
github.com/go-logr/logr v1.4.2 // indirect
@@ -160,14 +160,14 @@ require (
160160
github.com/pion/datachannel v1.5.10 // indirect
161161
github.com/pion/dtls/v2 v2.2.12 // indirect
162162
github.com/pion/dtls/v3 v3.0.4 // indirect
163-
github.com/pion/ice/v4 v4.0.6 // indirect
163+
github.com/pion/ice/v4 v4.0.8 // indirect
164164
github.com/pion/interceptor v0.1.37 // indirect
165165
github.com/pion/logging v0.2.3 // indirect
166166
github.com/pion/mdns/v2 v2.0.7 // indirect
167167
github.com/pion/randutil v0.1.0 // indirect
168168
github.com/pion/rtcp v1.2.15 // indirect
169169
github.com/pion/rtp v1.8.11 // indirect
170-
github.com/pion/sctp v1.8.36 // indirect
170+
github.com/pion/sctp v1.8.37 // indirect
171171
github.com/pion/sdp/v3 v3.0.10 // indirect
172172
github.com/pion/srtp/v3 v3.0.4 // indirect
173173
github.com/pion/stun v0.6.1 // indirect
@@ -184,7 +184,7 @@ require (
184184
github.com/prometheus/common v0.62.0 // indirect
185185
github.com/prometheus/procfs v0.15.1 // indirect
186186
github.com/quic-go/qpack v0.5.1 // indirect
187-
github.com/quic-go/quic-go v0.50.0 // indirect
187+
github.com/quic-go/quic-go v0.50.1 // indirect
188188
github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect
189189
github.com/raulk/go-watchdog v1.3.0 // indirect
190190
github.com/rogpeppe/go-internal v1.13.1 // indirect

go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos
132132
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
133133
github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc=
134134
github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc=
135-
github.com/gammazero/chanqueue v1.0.0 h1:FER/sMailGFA3DDvFooEkipAMU+3c9Bg3bheloPSz6o=
136-
github.com/gammazero/chanqueue v1.0.0/go.mod h1:fMwpwEiuUgpab0sH4VHiVcEoji1pSi+EIzeG4TPeKPc=
135+
github.com/gammazero/chanqueue v1.1.0 h1:yiwtloc1azhgGLFo2gMloJtQvkYD936Ai7tBfa+rYJw=
136+
github.com/gammazero/chanqueue v1.1.0/go.mod h1:fMwpwEiuUgpab0sH4VHiVcEoji1pSi+EIzeG4TPeKPc=
137137
github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34=
138138
github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo=
139139
github.com/garyburd/redigo v1.1.1-0.20170914051019-70e1b1943d4f/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
@@ -254,8 +254,8 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.25.0 h1:OqNqsGZPX8zh3eFMO8Lf8EHRRnSGBMqcd
254254
github.com/ipfs-shipyard/nopfs/ipfs v0.25.0/go.mod h1:BxhUdtBgOXg1B+gAPEplkg/GpyTZY+kCMSfsJvvydqU=
255255
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
256256
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
257-
github.com/ipfs/boxo v0.29.0 h1:clzd7PglUcE+Ufq1KucS3aKID7pzGVaSgcdRsW395t4=
258-
github.com/ipfs/boxo v0.29.0/go.mod h1:c3R52nMlgMsN1tADffYcogKoVRsX1RJE1TMYSpJ4uVs=
257+
github.com/ipfs/boxo v0.29.2-0.20250401090827-fcc26de2640b h1:JVmBJtkQPbpuobkHqJLwYZhTSSndZoraLrf3eIS0z5A=
258+
github.com/ipfs/boxo v0.29.2-0.20250401090827-fcc26de2640b/go.mod h1:omQZmLS7LegSpBy3m4CrAB9/SO7Fq3pfv+5y1FOd+gI=
259259
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
260260
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
261261
github.com/ipfs/go-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ=
@@ -395,8 +395,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ
395395
github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs=
396396
github.com/libp2p/go-flow-metrics v0.2.0 h1:EIZzjmeOE6c8Dav0sNv35vhZxATIXWZg6j/C08XmmDw=
397397
github.com/libp2p/go-flow-metrics v0.2.0/go.mod h1:st3qqfu8+pMfh+9Mzqb2GTiwrAGjIPszEjZmtksN8Jc=
398-
github.com/libp2p/go-libp2p v0.41.0 h1:JRaD39dqf/tBBGapJ0T38N73vOaDCsWgcx3mE6HgXWk=
399-
github.com/libp2p/go-libp2p v0.41.0/go.mod h1:Be8QYqC4JW6Xq8buukNeoZJjyT1XUDcGoIooCHm1ye4=
398+
github.com/libp2p/go-libp2p v0.41.1 h1:8ecNQVT5ev/jqALTvisSJeVNvXYJyK4NhQx1nNRXQZE=
399+
github.com/libp2p/go-libp2p v0.41.1/go.mod h1:DcGTovJzQl/I7HMrby5ZRjeD0kQkGiy+9w6aEkSZpRI=
400400
github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94=
401401
github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8=
402402
github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g=
@@ -542,8 +542,8 @@ github.com/pion/dtls/v2 v2.2.12 h1:KP7H5/c1EiVAAKUmXyCzPiQe5+bCJrpOeKg/L05dunk=
542542
github.com/pion/dtls/v2 v2.2.12/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE=
543543
github.com/pion/dtls/v3 v3.0.4 h1:44CZekewMzfrn9pmGrj5BNnTMDCFwr+6sLH+cCuLM7U=
544544
github.com/pion/dtls/v3 v3.0.4/go.mod h1:R373CsjxWqNPf6MEkfdy3aSe9niZvL/JaKlGeFphtMg=
545-
github.com/pion/ice/v4 v4.0.6 h1:jmM9HwI9lfetQV/39uD0nY4y++XZNPhvzIPCb8EwxUM=
546-
github.com/pion/ice/v4 v4.0.6/go.mod h1:y3M18aPhIxLlcO/4dn9X8LzLLSma84cx6emMSu14FGw=
545+
github.com/pion/ice/v4 v4.0.8 h1:ajNx0idNG+S+v9Phu4LSn2cs8JEfTsA1/tEjkkAVpFY=
546+
github.com/pion/ice/v4 v4.0.8/go.mod h1:y3M18aPhIxLlcO/4dn9X8LzLLSma84cx6emMSu14FGw=
547547
github.com/pion/interceptor v0.1.37 h1:aRA8Zpab/wE7/c0O3fh1PqY0AJI3fCSEM5lRWJVorwI=
548548
github.com/pion/interceptor v0.1.37/go.mod h1:JzxbJ4umVTlZAf+/utHzNesY8tmRkM2lVmkS82TTj8Y=
549549
github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
@@ -557,8 +557,8 @@ github.com/pion/rtcp v1.2.15 h1:LZQi2JbdipLOj4eBjK4wlVoQWfrZbh3Q6eHtWtJBZBo=
557557
github.com/pion/rtcp v1.2.15/go.mod h1:jlGuAjHMEXwMUHK78RgX0UmEJFV4zUKOFHR7OP+D3D0=
558558
github.com/pion/rtp v1.8.11 h1:17xjnY5WO5hgO6SD3/NTIUPvSFw/PbLsIJyz1r1yNIk=
559559
github.com/pion/rtp v1.8.11/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4=
560-
github.com/pion/sctp v1.8.36 h1:owNudmnz1xmhfYje5L/FCav3V9wpPRePHle3Zi+P+M0=
561-
github.com/pion/sctp v1.8.36/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE=
560+
github.com/pion/sctp v1.8.37 h1:ZDmGPtRPX9mKCiVXtMbTWybFw3z/hVKAZgU81wcOrqs=
561+
github.com/pion/sctp v1.8.37/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE=
562562
github.com/pion/sdp/v3 v3.0.10 h1:6MChLE/1xYB+CjumMw+gZ9ufp2DPApuVSnDT8t5MIgA=
563563
github.com/pion/sdp/v3 v3.0.10/go.mod h1:88GMahN5xnScv1hIMTqLdu/cOcUkj6a9ytbncwMCq2E=
564564
github.com/pion/srtp/v3 v3.0.4 h1:2Z6vDVxzrX3UHEgrUyIGM4rRouoC7v+NiF1IHtp9B5M=
@@ -588,8 +588,8 @@ github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX
588588
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
589589
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
590590
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
591-
github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA=
592-
github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
591+
github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk=
592+
github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
593593
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
594594
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
595595
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
@@ -602,8 +602,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg
602602
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
603603
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
604604
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
605-
github.com/quic-go/quic-go v0.50.0 h1:3H/ld1pa3CYhkcc20TPIyG1bNsdhn9qZBGN3b9/UyUo=
606-
github.com/quic-go/quic-go v0.50.0/go.mod h1:Vim6OmUvlYdwBhXP9ZVrtGmCMWa3wEqhq3NgYrI8b4E=
605+
github.com/quic-go/quic-go v0.50.1 h1:unsgjFIUqW8a2oopkY7YNONpV1gYND6Nt9hnt1PN94Q=
606+
github.com/quic-go/quic-go v0.50.1/go.mod h1:Vim6OmUvlYdwBhXP9ZVrtGmCMWa3wEqhq3NgYrI8b4E=
607607
github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 h1:4WFk6u3sOT6pLa1kQ50ZVdm8BQFgJNA117cepZxtLIg=
608608
github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66/go.mod h1:Vp72IJajgeOL6ddqrAhmp7IM9zbTcgkQxD/YdxrVwMw=
609609
github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk=

main.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,20 @@ Generate an identity seed and launch a gateway:
417417
Name: "http-retrieval-allowlist",
418418
Value: cli.NewStringSlice(),
419419
EnvVars: []string{"RAINBOW_HTTP_RETRIEVAL_ALLOWLIST"},
420-
Usage: "When HTTP retrieval is enabled, allow it only to the given hosts. Empty means 'everyone'",
420+
Usage: "Allow HTTP retrieval only from given hosts. Empty means 'everyone'. Ex: 'example.com,ipfs.example.com'",
421+
},
422+
&cli.StringSliceFlag{
423+
Name: "http-retrieval-denylist",
424+
Value: cli.NewStringSlice(),
425+
EnvVars: []string{"RAINBOW_HTTP_RETRIEVAL_DENYLIST"},
426+
Usage: "Disable HTTP retrieval from given hosts. Ex: 'example.com,ipfs.example.com'",
421427
},
422428
&cli.IntFlag{
423429
Name: "http-retrieval-workers",
424430
Value: 32,
425431
EnvVars: []string{"RAINBOW_HTTP_RETRIEVAL_WORKERS"},
426432
Usage: "Number of workers to use for HTTP retrieval",
427433
},
428-
429434
&cli.StringSliceFlag{
430435
Name: "dnslink-resolvers",
431436
Value: cli.NewStringSlice(extraDNSLinkResolvers...),
@@ -565,6 +570,8 @@ share the same seed as long as the indexes are different.
565570
httpRetrievalEnable := cctx.Bool("http-retrieval-enable")
566571
httpRetrievalWorkers := cctx.Int("http-retrieval-workers")
567572
httpRetrievalAllowlist := cctx.StringSlice("http-retrieval-allowlist")
573+
httpRetrievalDenylist := cctx.StringSlice("http-retrieval-denylist")
574+
568575
if httpRetrievalEnable {
569576
routerFilterProtocols = append(routerFilterProtocols, httpRouterGatewayProtocol)
570577
fmt.Printf("HTTP block-retrievals enabled. Workers: %d. Allowlist set: %t\n",
@@ -629,6 +636,7 @@ share the same seed as long as the indexes are different.
629636
// HTTP Retrieval config
630637
HTTPRetrievalEnable: httpRetrievalEnable,
631638
HTTPRetrievalAllowlist: httpRetrievalAllowlist,
639+
HTTPRetrievalDenylist: httpRetrievalDenylist,
632640
HTTPRetrievalWorkers: httpRetrievalWorkers,
633641
}
634642
var gnd *Node

setup.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ type Config struct {
170170
// HTTP Retrieval configuration
171171
HTTPRetrievalEnable bool
172172
HTTPRetrievalAllowlist []string
173+
HTTPRetrievalDenylist []string
173174
HTTPRetrievalWorkers int
174175
}
175176

setup_bitswap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func setupBitswapExchange(ctx context.Context, cfg Config, h host.Host, cr routi
3333
htnet := httpnet.New(h,
3434
httpnet.WithHTTPWorkers(cfg.HTTPRetrievalWorkers),
3535
httpnet.WithAllowlist(cfg.HTTPRetrievalAllowlist),
36+
httpnet.WithDenylist(cfg.HTTPRetrievalDenylist),
3637
)
3738
exnet = network.New(h.Peerstore(), bn, htnet)
3839
} else {

0 commit comments

Comments
 (0)