dariusc93 / rust-ipfs

The InterPlanetary File System (IPFS), implemented in Rust.
Apache License 2.0
36 stars 7 forks source link

feat: Connect to bootstrap peers #221

Open dariusc93 opened 1 month ago

dariusc93 commented 1 month ago

When initializing the ipfs node, one is able to add bootstrap peers via UninitializedIpfs::add_bootstrap, which would add them to kademlia routing table, however if the protocol is disabled, then nothing happens. What we should do instead is connect to the peers if the protocol is disabled (or maybe ensure that the connection is made regardless of protocol status), and maybe make the connection persistent since manual entry would indicate some form of trust. The persistent connection would likely need to be done through its own behaviour with the connection handler being kept alive, though the bootstrap peers may or may not have the same conditions to keep the connection alive.