kubo icon indicating copy to clipboard operation
kubo copied to clipboard

Add `Routing.Type=delegated` to only use `Routing.DelegatedRouters`

Open lidel opened this issue 7 months ago • 1 comments

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 daemon must print a loud warning informing user that node running with Routing.Type=delegated will 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

lidel avatar Jun 04 '25 14:06 lidel

Related to https://github.com/ipfs/kubo/issues/10097. We could add a noop provide system for Routing.Type=delegated.

guillaumemichel avatar Jun 13 '25 07:06 guillaumemichel

I would like to take this up!

KapilSareen avatar Jul 16 '25 21:07 KapilSareen

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.

KapilSareen avatar Jul 17 '25 00:07 KapilSareen

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.

lidel avatar Jul 24 '25 15:07 lidel