Does js-libp2p-webrtc-direct work behind NAT

Hi
If I set up two nodes on the internet and both behind NATs. Can I still use js-libp2p-webrtc-direct to make them connect to each other?

If yes, can you please give me an example of how to?
If not, what is the best libp2p transport to achieve that?

@ehsan6sha as far as I am aware libp2p-webrtc-direct will not work across NATs. You would need to leverage libp2p-webrtc-star to overcome NATs.

1 Like