Skip to content

Commit

Permalink
remove PrivateAddressesOnWanDHT
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Apr 2, 2024
1 parent f0b5c32 commit 6ba19f5
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion config/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ type Routing struct {
AcceleratedDHTClient bool

LoopbackAddressesOnLanDHT bool
PrivateAddressesOnWanDHT bool

Routers Routers

Expand Down
1 change: 0 additions & 1 deletion core/node/libp2p/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func Host(mctx helpers.MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (out P2PHo
OptimisticProvide: cfg.Experimental.OptimisticProvide,
OptimisticProvideJobsPoolSize: cfg.Experimental.OptimisticProvideJobsPoolSize,
LoopbackAddressesOnLanDHT: cfg.Routing.LoopbackAddressesOnLanDHT,
PrivateAddressesOnWanDHT: cfg.Routing.PrivateAddressesOnWanDHT,
}
opts = append(opts, libp2p.Routing(func(h host.Host) (routing.PeerRouting, error) {
args := routingOptArgs
Expand Down
4 changes: 0 additions & 4 deletions core/node/libp2p/routingopt.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ type RoutingOptionArgs struct {
OptimisticProvide bool
OptimisticProvideJobsPoolSize int
LoopbackAddressesOnLanDHT bool
PrivateAddressesOnWanDHT bool
}

type RoutingOption func(args RoutingOptionArgs) (routing.Routing, error)
Expand Down Expand Up @@ -121,9 +120,6 @@ func constructDHTRouting(mode dht.ModeOpt) RoutingOption {
wanOptions := []dht.Option{
dht.BootstrapPeers(args.BootstrapPeers...),
}
if args.PrivateAddressesOnWanDHT {
wanOptions = append(wanOptions, dht.AddressFilter(nil))
}
lanOptions := []dht.Option{}
if args.LoopbackAddressesOnLanDHT {
lanOptions = append(lanOptions, dht.AddressFilter(nil))
Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/v0.28.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The Object API commands deprecated back in [2021](https://github.com/ipfs/kubo/i

##### Kubo ignores loopback addresses on LAN DHT and private addresses on WAN DHT

Kubo no longer keeps track of loopback and private addresses on the LAN and WAN DHTs, respectively. This means that other nodes will not try to dial likely undialable addresses. If, for some reason, you need this, we have added two new boolean options to the configuration: `Routing.LoopbackAddressesOnLanDHT` and `Routing.PrivateAddressesOnWanDHT`.
Kubo no longer keeps track of loopback and private addresses on the LAN and WAN DHTs, respectively. This means that other nodes will not try to dial likely undialable addresses.

### 📝 Changelog

Expand Down
9 changes: 0 additions & 9 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ config file at runtime.
- [`Routing.Type`](#routingtype)
- [`Routing.AcceleratedDHTClient`](#routingaccelerateddhtclient)
- [`Routing.LoopbackAddressesOnLanDHT`](#routingloopbackaddressesonlandht)
- [`Routing.PrivateAddressesOnWanDHT`](#routingprivateaddressesonwandht)
- [`Routing.Routers`](#routingrouters)
- [`Routing.Routers: Type`](#routingrouters-type)
- [`Routing.Routers: Parameters`](#routingrouters-parameters)
Expand Down Expand Up @@ -1623,14 +1622,6 @@ Default: `false`

Type: `bool` (missing means `false`)

### `Routing.PrivateAddressesOnWanDHT`

Whether private addresses should not be ignored on the WAN DHT.

Default: `false`

Type: `bool` (missing means `false`)

### `Routing.Routers`

**EXPERIMENTAL: `Routing.Routers` configuration may change in future release**
Expand Down

0 comments on commit 6ba19f5

Please sign in to comment.