如果 RTCPeerConnection.createOffer() 只说我的本地 ip,另一端如何理解我的外部 ip?
How does other end understand what is my external ip if RTCPeerConnection.createOffer() says only my local ip?
我愿意:
configuration = {
iceServers: [
{
urls: [
'stun:stun1.l.google.com:19302',
],
},
],
iceCandidatePoolSize: 10,
};
local_conn = new RTCPeerConnection(configuration);
local_offer = await local_conn.createOffer()
local_conn.setLocalDescription(local_offer)
console.log(local_conn)
{type: "offer", sdp: "v=0 ↵o=- 5782587598134818591 2 IN IP4 127.0.0.1 ↵s=- ↵t=0 0 ↵a=msid-semantic: WMS ↵"}
IN IP4 127.0.0.1 为什么是 127.0.0.1,而不是像 151.101.1.69 这样的外部 IP?
ICE 候选人包括 IP 地址信息。
我愿意:
configuration = {
iceServers: [
{
urls: [
'stun:stun1.l.google.com:19302',
],
},
],
iceCandidatePoolSize: 10,
};
local_conn = new RTCPeerConnection(configuration);
local_offer = await local_conn.createOffer()
local_conn.setLocalDescription(local_offer)
console.log(local_conn)
{type: "offer", sdp: "v=0 ↵o=- 5782587598134818591 2 IN IP4 127.0.0.1 ↵s=- ↵t=0 0 ↵a=msid-semantic: WMS ↵"}
IN IP4 127.0.0.1 为什么是 127.0.0.1,而不是像 151.101.1.69 这样的外部 IP?
ICE 候选人包括 IP 地址信息。