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

Enable private addresses for ICE based on a per-endpoint flag. #2047

Merged
merged 3 commits into from
Sep 13, 2023

Conversation

bgrozev
Copy link
Member

@bgrozev bgrozev commented Sep 13, 2023

No description provided.

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #2047 (127bec5) into master (194c8f7) will increase coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 58.82%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2047      +/-   ##
============================================
+ Coverage     42.75%   42.76%   +0.01%     
  Complexity     1684     1684              
============================================
  Files           325      325              
  Lines         17144    17155      +11     
  Branches       2253     2255       +2     
============================================
+ Hits           7330     7337       +7     
- Misses         9098     9102       +4     
  Partials        716      716              
Files Changed Coverage
.../videobridge/colibri2/Colibri2ConferenceHandler.kt 0.00%
...main/kotlin/org/jitsi/videobridge/ice/IceConfig.kt ø
...rg/jitsi/videobridge/transport/ice/IceTransport.kt 20.00%
...rc/main/java/org/jitsi/videobridge/Conference.java 100.00%
.../src/main/kotlin/org/jitsi/videobridge/Endpoint.kt 100.00%
...c/main/kotlin/org/jitsi/videobridge/relay/Relay.kt 100.00%

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8d8a78...127bec5. Read the comment docs.

private fun LocalCandidate.toCandidatePacketExtension(advertisePrivateAddresses: Boolean): CandidatePacketExtension? {
if (!(advertisePrivateAddresses && IceConfig.config.advertisePrivateCandidates) &&
transportAddress.isPrivateAddress()
) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this logic is wrong?

@@ -255,7 +255,8 @@ videobridge {
# "NominateFirstValid", "NominateHighestPriority", "NominateFirstHostOrReflexiveValid", or "NominateBestRTT".
nomination-strategy = "NominateFirstHostOrReflexiveValid"

# Whether to advertise private ICE candidates, i.e. RFC 1918 IPv4 addresses and fec0::/10 and fc00::/7 IPv6 addresses.
# Whether to advertise private ICE candidates, i.e. RFC 1918 IPv4 addresses and fec0::/10 and fc00::/7 IPv6
# addresses for endpoints that have signaled support for private addresses.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You made the existing advertise-private-candidates config flag mean "advertise private addresses if jicofo requests it", which changes the current behavior -- I think we want it to be "advertise private candidates even if jicofo doesn't request it" to keep compatibility for community users setting the flag today (e.g. running entirely in a private network).

@@ -167,7 +167,7 @@ class Relay @JvmOverloads constructor(
private val sctpHandler = SctpHandler()
private val dataChannelHandler = DataChannelHandler()

private val iceTransport = IceTransport(id, iceControlling, useUniquePort, logger, clock)
private val iceTransport = IceTransport(id, iceControlling, useUniquePort, true, logger, clock)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment what this "true" means

@bgrozev bgrozev merged commit 461d805 into jitsi:master Sep 13, 2023
4 of 5 checks passed
@bgrozev bgrozev deleted the private-address-connectivity branch May 23, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants