Skip to content
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

Supports webrtc interface filtering on server #2460

Merged

Conversation

PieterFabry
Copy link
Contributor

For security and ICE optimization purposes, it would be good to add the ability to restrict ICE candidates on the server based on the network interfaces available. This is a common feature for WebRTC servers.

Usage:

Added a webrtcICEInterfaces interface to the mediamtx.yml under webrtc.
webrtcICEInterfaces takes in a string array of the network interfaces available on the server for ICE candidate resolution to happen.

eg:
webrtcICEInterfaces: [ "eno1", "enp2s0"]

The string array is then applied on the SetInterfaceFilter method in pion.
//https://pkg.go.dev/github.com/pion/webrtc/v3#SettingEngine.SetInterfaceFilter

@aler9
Copy link
Member

aler9 commented Oct 5, 2023

Hello, yes, normally the server sends the list of all its local IPs to clients, and this option allows to filter this list.

Change the code in order to fix CI errors and this will get merged. Thanks.

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #2460 (255e5e9) into main (a6f929d) will decrease coverage by 0.39%.
Report is 6 commits behind head on main.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main    #2460      +/-   ##
==========================================
- Coverage   61.89%   61.50%   -0.39%     
==========================================
  Files         129      130       +1     
  Lines       14540    14645     +105     
==========================================
+ Hits         8999     9008       +9     
- Misses       4871     4965      +94     
- Partials      670      672       +2     
Files Coverage Δ
internal/conf/conf.go 75.96% <100.00%> (+0.10%) ⬆️
internal/core/core.go 86.16% <100.00%> (+0.04%) ⬆️
internal/core/webrtc_source.go 50.44% <100.00%> (ø)
internal/core/webrtc_manager.go 57.53% <9.09%> (-1.79%) ⬇️

... and 7 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@aler9 aler9 merged commit 3c4039b into bluenviron:main Oct 7, 2023
6 of 8 checks passed
@aler9
Copy link
Member

aler9 commented Oct 7, 2023

merged, thanks!

@aler9
Copy link
Member

aler9 commented Oct 15, 2023

added in v1.2.0

@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants