ipfs-examples / helia-examples

How to do most anything with your Helia node
https://verified-fetch.vercel.app
72 stars 62 forks source link

Can't connect to IPFS network (with port forwarding) #181

Open PedroBarcha opened 10 months ago

PedroBarcha commented 10 months ago

Hi everyone! I've been trying to connect to the IPFS network using Helia, but haven't been sucessful :(

Could you plese help me?

I have just made a port forwarding (4001) and tried connecting to the IPFS using kubo. With that, I have succesfully served content to the network. Now I am trying to do the same with Helia. From what I've understood, I don't need kubo anymore, since Helia should create a node for me right? So I have killed the kubo instance and tried the following code:

image

The output is:

Peer ID:  PeerId(12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG)
getPeers:  []
Multiaddrs: [
  Multiaddr(/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG),
  Multiaddr(/ip4/192.168.15.19/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG),
  Multiaddr(/ip4/172.26.0.1/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG),
  Multiaddr(/ip4/172.27.0.1/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG)
]

As you can see, I am not getting anything with helia.libp2p.getPeers(). Also, my peer isn't found when trying to use https://pl-diagnose.on.fleek.com:

image

Moreover, if if try to add some content, it doesn't get published to the IPFS network.

I suspect that my configuration isn't correct, could anyone check it, please? Also, am I right to assume that Helia will create a node that can connect to the IPFS network?

Finally, I'd like to say that Helia rocks 🤘. I managed to do all I need locally (publish, pin, MFS, IPNS...), the only thing I need now is to fix this. Thanks in advance!