Skip to content

How to limit webrtc UDP connections to a specific port range? #352

Answered by k0nserv
D1plo1d asked this question in Q&A
Discussion options

You must be logged in to vote

This can be configured via SettingEngine::set_udp_network as follows

let mut ephemeral_udp = EphemeralUDP::default();
ephemeral_udp.set_ports(4000, 4050)?;

let mut setting_engine = SettingEngine::default();
setting_engine.set_udp_network(UDPNetwork::Ephemeral(ephemeral_udp));

let api = APIBuilder::new()
    .with_setting_engine(setting_engine)
    .build();

EDIT: Updated to use public API so it actually compiles.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@D1plo1d
Comment options

@k0nserv
Comment options

Answer selected by D1plo1d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants