Y.Thomas
Y.Thomas

Reputation: 5

In the WebRTC source code, how to receive the public network IP and PORT returned by STUN, where in the code, can I change this PORT to a fixed value

In the WebRTC source code, how to receive the public network IP and PORT returned by STUN. Where is it in the code? Can I change this PORT to a fixed value? I can't find it, but I need use a specific port to replace the port that returned by STUN.

Upvotes: 0

Views: 160

Answers (1)

Philipp Hancke
Philipp Hancke

Reputation: 17275

STUN as a protocol will tell the the facts about the network connection. Changing the port returned in the source code will not change those facts.

If you want to control the port e.g. to accomplish something like "outgoing udp traffic needs to happen on port 51234" you will need to run a TURN server on that port.

Upvotes: 1

Related Questions