-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way of limiting the range of the ephemeral ports that are bound to by gather_candidates #47
Comments
I'm curious about what your use case for this is? Could you try submitting a PR which adds one or more keyword arguments to |
The use case is essentially a Matrix bridge (bot) that forwards cellular voice calls from a GSM modem to a Matrix chatroom. Matrix uses WebRTC for calls. When I have more time for this project, I'll get back here with a PR. Thanks! |
This would also make is much easier to run in a docker container where all ports must be published in advance. |
Any chance of a PR for this? |
I took a stab at an implementation #63 |
Looks like what I wanted at the time, as far as I recall. Thanks! I haven't been around to this stuff in a long time now, though. |
Hi!
Inside
get_component_candidates
under theConnection
class, the local UDP ports are randomly selected by the kernel, since 0 is provided as the port tocreate_datagram_endpoint
. I have a use-case where I need this port range to be limited. Indeed, it's possible to limit it on the whole machine, by setting the/proc/sys/net/ipv4/ip_local_port_range
under Linux. However, I need this to be controllable at a more fine grained level.Could an addition of some kind of
allowed_port_range
flag be considered? In the implementation, this would require manually trying to bind to ports in the range until success.Thanks!
The text was updated successfully, but these errors were encountered: