com.unity.webrtc
com.unity.webrtc copied to clipboard
[Question] Limit WebRTC port range?
Is it possible to limit the port ranges used for WebRTC connections? I see, that for UDP connection ports above 60000 and for TCP port in the 54000ish range.
Is there a known default range for UDP or TCP? Also, can I configure a limited port range?
I guess the limitation of the port range should be controlled by the firewall rule.
example : GCP https://cloud.google.com/vpc/docs/firewalls
Hi @karasusan, thank you for your reply.
I guess I can limit the ports, which will be functioning (and returned as SERVER CANDIDATES from the STUN service) via blocks by firewall rules, but I want to know the port ranges, which will be tried in the first place.
Maybe this question is better located at https://github.com/Unity-Technologies/UnityRenderStreaming, what do you think?
The same question is posted on Unity forum. https://forum.unity.com/threads/unity-webrtc-restrict-datachannel-ports.1025188/
https://github.com/juju812/com.unity.webrtc/commit/3ef0c0e9d0f8d21f35cf060ecada156d68157914
Hi, @karasusan , here's one snippet implemented the port range feature.
But currently the port range is hard coded in Context
class (which is enough for my temporary use), the port range configuration need to be exposed.
@juju812 I am checking it. Thanks.
Hi @karasusan
Do you have any schedule to integrate the port range feature? If not, maybe I can follow current configuration tamplate and complete my code. Then I'll create a PR after implement finished.
@juju812 Thanks. I am sorry but the schedule of the feature will be a long time later.
memo: WRS-238