Replies: 2 comments
-
Are you dialing Node B directly or Node C directly or trying to use a relay? Assuming the latter and based on what is mentioned and Node A is listening on the relay and B and C are behind a nat but not listening on a relay themselves, it would make sense for BA and CA to connect but BC unable to connect. The nodes would need some way to connect, either directly (which can be utilized by libp2p-upnp if youre behind a nat with upnp) or through a relay. Could you provide any code or logs, your behaviour setup, etc., which would give up a better idea? :) |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your reply. The current situation is that A, B and C cannot connect directly (drill holes), and must go through the relay. My method is to make A listen and reserve in the relay first, and then B and C connect to A through the relay. After the connection, AB and AC are normal. But B and C cannot connect. In fact, what I want to achieve is similar to Vlan virtual local area network, so that A, B and C can ping each other. I also have an idea to let A, B and C continue to listen and reserve in the relay. Then use B to connect to A through the relay, and C connects A and B. In fact, my goal is to let all my nodes connect through the relay. Of course, when the conditions of two nodes are met, they can automatically upgrade to P2P connection through autonat, but all node network types in my current test environment do not support P2P connection. ABCDEF... can all connect to each other, instead of all connecting to A while BCDEF cannot connect to each other. But I remember that I tested it before, a node can only listen in the relay. Or Dial, you can't Listen to the reservation first, then dial other nodes. I don't know if I'm wrong. I'm still testing it today. Client Behaviour Code
Client Swarm Build Code `pub async fn new() -> Result {
|
Beta Was this translation helpful? Give feedback.
-
I have 3 nodes. One user A listens directly to the relay for reservation. The rest of B and C dial to connect to A through the relay.
Now users AB and AC can communicate successfully, but BC cannot.
My previous idea was that A listens to the relay first, then B connects to A, C connects to A and B, and so on.
First of all, I am not sure if this idea is correct.
Secondly, when I implemented it, I used C to connect to A without any problem. When I connected to B, it prompted me that this node was not registered in the relay. Failed to connect to destination.: Failed to connect to destination.: Relay has no reservation for destination.)]
The problem is that a node can only have one mode in the relay, either Listen or Dial.
I tried Listen first, and then Dial, but it prompted me that I already have a connection.
How should this be solved? I have tried it myself for 2 days. I don't have any good ideas.
Beta Was this translation helpful? Give feedback.
All reactions