How to setup V1 Relay in the new config

Hmmm, so the issue is that relay v2 doesn’t support the use of swarm keys. Well, that kinda sucks, it means that your only recourse is to set up proper port forwarding on all your client nodes instead then… :confused:

1 Like

I have 2 questions:

  1. I have not set up 147.75.195.153, 147.75.70.221. I guess it is hard coded in IPFS when no swarm.key, correct?
    ipfs swarm peers
    /ip4/147.75.195.153/tcp/4001/p2p/QmW9m57aiBDHAkKj9nmFSEn7ZqrcF1fZS4bipsTCHburei
    /ip4/147.75.70.221/tcp/4001/p2p/Qme8g49gm3q4Acp7xWBKg3nAa9fxZ1YmyDJdyGgoG6LsXh
    /ip4/147.75.70.221/tcp/4001/p2p/Qme8g49gm3q4Acp7xWBKg3nAa9fxZ1YmyDJdyGgoG6LsXh/p2p-circuit/p2p/12D3KooWFg9ApLqQiTdkaGhgFNTWFsiRMCSDGCQgZ1RuBwSMXAmS
    /ip4/52.221.249.235/tcp/4001/p2p/12D3KooWLjHvyiufBnv3whtWnJ1ZrZjkX4jmohbioQi1dym8LTab
    /ip4/54.169.103.175/tcp/4001/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP
  2. Do you have any documents relating to port forwarding setup
  3. Does relay v1 work with swarm.key (It seems susarlanikhilesh made it worked)
  1. no, it discovered those addresses in the dht (nodes on your network announced those addresses to the dht). actually, it looks like you connected to main net, which means you are using main net bootstrap addresses, not your own nodes. fix that.
  2. unfortunately, port forwarding is set up on your router (not ipfs, not your computer), and there’s a gazillion different routers on the market, so refer to your router’s manual. you need to forward tcp 4001 and udp 4001 to your computer’s private IP address.
  3. I assume it did, but I have no experience with it. v1 is still available as a stand alone daemon, you could run that on your C node instead of the ipfs daemon, and it should work (your client nodes will pick up either v1 or v2, they don’t care, they support both).

Should we raise an issue on go-ipfs project ?

The standalone daemon also does not support I believe.
If you referring to this.

Yeah, I’d let them know it’s something you care about. If enough people want it, I’m sure they’ll prioritize it.

1 Like

Using the relay-daemon and making it private we were able to connect and my client node is publishing the relay address as part of address. But they are dropping and those values to show up in the addresses take time. Where does this lie to check and to keep it alive as long as the ipfs is running.

what can be sometimes, that it advertises as a hop but does not publish the public address

{
        "ID": "12D3KooWNE76XyRBtKYhmVbnTryyAEE8wsFLocKHDrg9CG27sUau",
        "PublicKey": "CAESILhhI9FlJ1HlemKDgsW58+4umRZMaFhDG9pOrR197/2K",
        "Addresses": [
                "/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWNE76XyRBtKYhmVbnTryyAEE8wsFLocKHDrg9CG27sUau",
                "/ip4/172.28.1.135/tcp/4001/p2p/12D3KooWNE76XyRBtKYhmVbnTryyAEE8wsFLocKHDrg9CG27sUau",
                "/ip6/::1/tcp/4001/p2p/12D3KooWNE76XyRBtKYhmVbnTryyAEE8wsFLocKHDrg9CG27sUau"
        ],
        "AgentVersion": "go-ipfs/0.14.0-dev/ce7d41cc",
        "ProtocolVersion": "ipfs/0.1.0",
        "Protocols": [
                "/ipfs/bitswap",
                "/ipfs/bitswap/1.0.0",
                "/ipfs/bitswap/1.1.0",
                "/ipfs/bitswap/1.2.0",
                "/ipfs/id/1.0.0",
                "/ipfs/id/push/1.0.0",
                "/ipfs/lan/kad/1.0.0",
                "/ipfs/ping/1.0.0",
                "/libp2p/autonat/1.0.0",
                "/libp2p/circuit/relay/0.1.0",
                "/libp2p/circuit/relay/0.2.0/hop",
                "/libp2p/circuit/relay/0.2.0/stop",
                "/p2p/id/delta/1.0.0",
                "/x/"
        ]
}

I have added announce and it shows as a hop, but when I try to connect to the other node via the hop node it fails.

I have RelayService : true in the hop node. The other nodes have RelayClient: true and EnableHolePunching : true.

Error: connect 12D3KooWH9aQeFFqPRqQJzXpCYdDAQkYp9Wu5uqqX4rvQEdxjgnW failure: failed to dial 12D3KooWH9aQeFFqPRqQJzXpCYdDAQkYp9Wu5uqqX4rvQEdxjgnW:
  * [/ip4/pubilic-ip-addr/tcp/4002/p2p/12D3KooWNyfErMvXCm4PNWurKDPLM9Ua5EbJAv1xSaqBZDqncLy4/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
  * [/dnsaddr/dns-value/p2p/12D3KooWNyfErMvXCm4PNWurKDPLM9Ua5EbJAv1xSaqBZDqncLy4/p2p-circuit] concurrent active dial through the same relay failed with a protocol error
  * [/ip4/192.168.88.3/tcp/4001] dial tcp4 0.0.0.0:4001->192.168.88.3:4001: i/o timeout

Am I missing something?

You can’t force the announce of a relay circuit, that’s something only the node can do on its own after it gets a reservation on the relay server it chose (you can’t choose it yourself). If you force one, it won’t have a reservation on the relay you announce, so a connection won’t be possible. You can only announce static routes that you have verified you have (port forwarding).

2 Likes