Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not bind a mainline DHT socket (#2296)
## Description By merging #2188 we unknowingly made `iroh` bind a socket for a mainline DHT. Pkarr includes code for querying records from the bittorent mainline DHT behind a `dht` feature flag, which is disabled in `iroh-net` but with #2188 is enabled in `iroh-dns-server`, and due to feature unification in cargo workspaces this silently also enabled the feature in `iroh-net`. The DHT is not used because we only use the `relay_` methods of the pkarr client in iroh-net. It is binding a socket, but not doing anything else because it has no bootstrap node configured. Still, this is unfortunate - we are shipping code and binding a socket for a feature we don't (yet) use. From a cursory skim of the source code, this would still be the same with the recently released `pkarr` v2. We should check the docs on feature unification if there is a clean way around that. For now, this PR makes iroh not bind a socket for an unused mainline DHT client. Instead, we just use reqwest directly, which is the same as what `PkarrClient::relay_put` would do here. ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
- Loading branch information