I can’t find the document of libp2p and don’t how use it to do NAT travel, only can use internal ip, so how can i establish connection between two host after different NAT?
I believe it depends on the transports you use. Mostly you don’t have to worry about it (unless you’re writing a transport module).
WebRTC, for example, does NAT traversal automatically, but it needs a signalling server first. If you use libp2p with the webrtc-star
module it will use a signalling server provided by Protocol Labs, but everything will mostly work, in most of the times.