alexpiezo / WebRTC

Universal WebRTC XCFramework for iOS/macOS
Other
129 stars 39 forks source link

List of local candidates does not contain my public IP address #31

Open Yetiman35 opened 2 years ago

Yetiman35 commented 2 years ago

Any kind of help would be appreciated. :)

I am pretty new in the iOS/swift world.

I am writing a very simple iOS app with WebRTC to make a peer connection between server and client. No need an audio or video play, need RTCDataChannel to send the hello message to the server. But when WebRTC queries the STUN server and provides the list of local candidates that does not contain my public IP address. I am doing all of this because there is the NAT in middle of server and client.

Yetiman35 commented 2 years ago

More info...

The list of the local candidates is below, but none of them contains my public IP address.

candidate:1035519513 1 udp 2122066175 2600:380:92ec:8953:9c34:a8f:71ad:8ba 65047 typ host generation 0 ufrag 9bdV network-id 13 network-cost 900
candidate:1035519513 1 udp 2122066175 2600:380:92ec:8953:9c34:a8f:71ad:8ba 65047 typ host generation 0 ufrag 9bdV network-id 13 network-cost 900
candidate:3775918358 1 udp 2121937663 fd74:6572:6d6e:7573:c:9ef4:5cbe:8933 64400 typ host generation 0 ufrag 9bdV network-id 3 network-cost 50
candidate:3775918358 1 udp 2121937663 fd74:6572:6d6e:7573:c:9ef4:5cbe:8933 64400 typ host generation 0 ufrag 9bdV network-id 3 network-cost 50
candidate:2872146525 1 udp 2121872127 fd74:6572:6d6e:7573:d:9ef4:5cbe:8933 59086 typ host generation 0 ufrag 9bdV network-id 4 network-cost 50
candidate:2872146525 1 udp 2121872127 fd74:6572:6d6e:7573:d:9ef4:5cbe:8933 59086 typ host generation 0 ufrag 9bdV network-id 4 network-cost 50
candidate:3775918358 1 udp 2121806591 fd74:6572:6d6e:7573:c:9ef4:5cbe:8933 49446 typ host generation 0 ufrag 9bdV network-id 6 network-cost 50
candidate:3775918358 1 udp 2121806591 fd74:6572:6d6e:7573:c:9ef4:5cbe:8933 49446 typ host generation 0 ufrag 9bdV network-id 6 network-cost 50

Anybody can share an idea if you have solved this issue. Appreciate your help.