Add `Routing.Type=delegated` to only use `Routing.DelegatedRouters`
Problem / User need
Right now (0.35) there is no easy way to disable Amino DHT AND only use Routing.DelegatedRouters.
This setup was requested by users (example), and allows them to turn off DHT client on Kubo and delegate it to a self-hosted instance of Someguy that exposes /routing/v1 caching proxy to Amino DHT and any other Delegated routing endpoints.
Implementation ideas
Since it is already possible to turn off routing with Routing.Type=none, we could add Routing.Type=delegated which would work the same way as Routing.Type=autoclient but without initializing Amino DHT client, and only initializing Delegated routers from Routing.DelegatedRouters
Caveats
- There is no Spec for Delegated Provides over HTTP.
ipfs daemonmust print a loud warning informing user that node running withRouting.Type=delegatedwill not be able to provide data on Amino DHT. Prior art: https://github.com/ipfs/kubo/blob/78ef5e9eebb83daa8b6a55e867b10ab41d2d8851/cmd/ipfs/kubo/daemon.go#L637-L639
Related to https://github.com/ipfs/kubo/issues/10097. We could add a noop provide system for Routing.Type=delegated.
I would like to take this up!
Hi @lidel! I just opened the PR aiming to solve this issue. I'm new to the IPFS space and contributing as a way to learn more about the project and its internals. Please let me know if I'm misunderstanding anything or if there's a better approach, I’m happy to iterate and improve the changes based on your feedback.
Thank you for contribution, we may need to park this and https://github.com/ipfs/kubo/pull/10874 until https://github.com/ipfs/kubo/pull/10883 lands.