I’ve got a question, but I’m also looking for clarification that I’m understanding the landscape correctly.
Please correct me if any of these statements are incorrect:
- File passing between IPFS nodes uses bitswap.
- Circuit Relay v2 does not allow bitswap (file passing).
I just ran an experiment with three nodes using go-ipfs v13:
- One node has a public IP and was configured as a Circuit Relay.
- The other two nodes were behind a firewall.
- The firewalled nodes could connect to one another through the Circuit Relay, but they could not pass files to one another.
Is there a roadmap, GitHub Issue, or some other place that I can view to monitor the progress of file passing through Circuit Relay v2?
Is there some way to enable it, even if it involves advanced hacking?
Is there any plan or roadmap to get to a point where files can be passed through Circuit Relay v2?
As far as I know, it’s not planned. The reason being, v2 is only there as a means for nodes to connect directly to each other using hole punching (which is a way for nodes behind separate NAT routers to establish a direct connection). Make sure hole punching is enabled:
ipfs config --json Swarm.RelayClient.Enabled true
ipfs config --json Swarm.EnableHolePunching true
It is not that the relays do not support relaying anything. It is that in Kubo, specifically, the relay-server part is utilized to enable NAT hole punching now and only that, and as such it is limited to relaying small pieces of data.
If you want a general purpose relay, rather than using a Kubo node with Relay enabled in server mode as you did before, you can use GitHub - libp2p/go-libp2p-relay-daemon: A standalone libp2p circuit relay daemon providing relay service for versions v1 and v2 of the protocol..
Thank you so much for that link, @hector! It was exactly what I needed.
I read through the thread How to setup V1 Relay in the new config, and I was using a very similar network configuration as @susarlanikhilesh: The two nodes I wanted to connect were behind an unknown level of firewalls with no visibility into their network configuration. I needed a way to tunnel through any firewalls and pass files between the nodes. I followed the instructions carefully, but in my tests, hole punching was not successful and I was not able to get the two nodes to connect to one another directly. Reverting to a v1 Relay was my only option.
I was able to setup libp2p-relay-daemon as a V1 relay using this config:
Also a note for people who try this: You need to install Go v1.17.12. The project will not install with the current version of Go (v1.18.4).
I packaged go-libp2p-relay-daemon into a Docker container and created a Docker Compose file, for those who like to manage their servers with Docker.