Revert ForceRelay default to false now that P2P issues are fixed#94
Revert ForceRelay default to false now that P2P issues are fixed#94MichaelUray wants to merge 1 commit intonetbirdio:mainfrom
Conversation
The default was set to true as a workaround for P2P stability issues on iOS. Now that the underlying ICE issues are fixed upstream (netbirdio/netbird: guard loop fix, candidate buffering, network address discovery), P2P connections work reliably and should be enabled by default. P2P connections are more efficient than relay for both performance and battery life, making the previous "battery optimization" rationale for forcing relay incorrect. Users who have explicitly toggled this setting will not be affected as their preference is persisted in UserDefaults.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 30 minutes and 22 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing in favor of the broader proposal at netbirdio/netbird#5989, which replaces the binary This is the iOS sibling of netbirdio/android-client#152 (also closed in favor of the broader proposal); both PRs were straightforward Rationale: the simple revert in this PR would address same-LAN P2P but reintroduce the battery cost of eager ICE for many idle peers — the original reason ForceRelay was set to true on mobile (netbirdio/netbird#1354, netbirdio/netbird#2138). The new dynamic modes give the same-LAN P2P benefit without that battery trade-off, while the proposal's phased framing avoids relitigating the default-flip question until field telemetry exists. |
Summary
The ForceRelay default was set to
trueon iOS as a workaround for P2P stability issues. Now that the underlying ICE issues have been fixed upstream (netbirdio/netbird: guard loop fix #5805, candidate buffering, network address discovery #5807), P2P connections work reliably and should be enabled by default.P2P connections are more efficient than relay for both performance and battery life, making the previous "battery optimization" rationale for forcing relay incorrect.
Changes
NetbirdKit/EnvVarPackager.swift: Remove iOS-specific#if os(iOS)block, setdefaultForceRelay = falsefor all platformsNetBird/Source/App/ViewModels/MainViewModel.swift: Change default fromtruetofalse, simplifygetForcedRelayConnectionEnabled()to remove iOS-specific branchNetBirdTests/SharedUserDefaultsTests.swift: Update test to assertfalseis the defaultUsers who have explicitly toggled this setting will not be affected as their preference is persisted in UserDefaults.
Related Issues
Related netbirdio/netbird#5589 — Default Force Relay to Off
Related netbirdio/netbird#3968 — Posture checks peer network range failed on iPhone
Related netbirdio/netbird#4657 — iOS Client loses all routes when Posture Checks are enabled