How do nodes communicate in the IPFS network? Aren't they still using HTTP?

If not, how is JS-IPFS able to interact directly with the IPFS network without the need for a HTTP gateway server?


IPFS uses peer-to-peer communication using the libp2p library which uses multiaddress(multiaddr). multiaddr is a way of communication using multiple protocols. The JS version of the libp2p library allows you to configure Transports which are used to communicate between peers. Here's a list of supported transports as shown on the configuration guide.

  • libp2p/js-libp2p-tcp
  • libp2p/js-libp2p-webrtc-star
  • libp2p/js-libp2p-webrtc-direct
  • libp2p/js-libp2p-websockets
  • libp2p/js-libp2p-utp (WIP)

The js-libp2p-tcp and js-libp2p-utp cannot be used in a browser.

IPFS & libp2p: https://docs.ipfs.io/concepts/libp2p/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.