curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: IPFS support in Curl

From: Chris Anderson via curl-library <curl-library_at_lists.haxx.se>
Date: Fri, 18 Feb 2022 12:15:09 -0800

On Feb 18, 2022 at 7:15:16 PM, Gavin Henry <ghenry_at_sentrypeer.org> wrote:

> The core IPFS protocol is based on a peer-to-peer distributed hash table.
> To participate in the network you’ve got to run a stateful peer (or a
> browser like Brave or Opera that includes a IPFS daemon.)
>
>
> Hi Chris,
>
> Is there a C lib for this DHT? I'm currently exploring OpenDHT (so I
> can run a node for my own project) and see on the IPFS page this is
> listed, but is now 404:
>

There are three implementations of IPFS: Go
<https://github.com/ipfs/go-ipfs>, JavaScript
<https://github.com/ipfs/js-ipfs>, and Rust
<https://github.com/rs-ipfs/rust-ipfs>. The IPFS DHT is it’s own project,
libp2p <https://libp2p.io>, with implementations in even more languages.
Libp2p is used not only by IPFS but also Ethereum and a bunch of other web3
tech. It might be a good fit for your use case.


> https://github.com/Agorise/c-ipfs
>
> GNUnet are also doing this https://lsd.gnunet.org/lsd0004/
>
> I'm trying to imagine just calling curl with a CLI arg or libcurl to
> bootstrap participating in a DHT and off you go but am also exploring
> other bootstrapping options:
>

I think bootstrapping is a little weird to do on each invocation, and it
doesn’t make sense to have a daemon component built into curl. The approach
I’ve outlined in my PR is compatible with running a daemon on localhost.
That way curl can connect to the local peer, and that peer can maintain the
state.


> https://github.com/SentryPeer/draft-henry-p2p-network-discovery-internet-XX
>
> OpenDHT started from this
> https://github.com/jech/dht/blob/master/dht.c (around 3k loc)
>
> What sort of size are other client side protocols in libcurl?
>

The smaller ones are less than 1k lines, FTP is on the bigger side at 4k
https://github.com/curl/curl/blob/master/lib/ftp.c

Cheers,
Chris


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-02-18