Skip to content

Improve Local Network diagnostics, bounded retries, and log privacy - #124

Open
bradmb wants to merge 1 commit into
hugeBlack:mainfrom
bradmb:contribute/connection-diagnostics
Open

bradmb wants to merge 1 commit into
hugeBlack:mainfrom
bradmb:contribute/connection-diagnostics

Conversation

@bradmb

@bradmb bradmb commented Oct 26, 2026 •

Copy link
Copy Markdown

Summary

This PR improves OpenParsec's local network handling, connection reliability, error reporting, and privacy without changing the existing UI.

Changes:

  • Added the appropriate Local Network permission description without introducing unnecessary Bonjour services or multicast entitlements.
  • Improved connection errors to include actual error codes and more useful troubleshooting guidance for Local Network permissions, Wi-Fi isolation, VPNs, and firewalls. Initial connection failures also provide a shortcut to the app's settings.
  • Improved connection and approval polling so it only runs while the app is active, with limits on attempts and timeouts. Added a single controlled retry for peer connection setup and ensured polling stops when canceled or when the view disappears.
  • Simplified network detection to report the connection type without incorrectly treating internet connectivity as proof that Local Network access is available.
  • Removed potentially sensitive logging of saved sessions, authentication responses, and SDK payloads while retaining basic signaling failure information for troubleshooting.

Validation

  • Connection regression script passed all 7 assertions, including inactive polling, timeout handling, and retry limits.
  • Release device build passed using Xcode 26.3 and the iOS 26.2 SDK, maintaining the existing iOS 14 deployment target.
  • Release compilation also passed with Xcode 27.1 using a temporary iOS 15 build override. No deployment target changes were committed.
  • Project configuration, plist validation, and git diff --check all passed.

Notes

These changes are independent of the Duo layout work and do not modify any existing screen layouts or signing configuration.

One important distinction: error -6023 indicates a peer connection failure, not necessarily a Local Network permission issue. During testing, I had one Wi-Fi network consistently fail while another worked with the same device and permissions.

This PR improves how we handle permissions, connection attempts, and troubleshooting, but it does not resolve network-level restrictions caused by routers, firewalls, or Wi-Fi configurations.

Existing localization warnings are unrelated to these changes. No credentials, personal configuration, provisioning information, screenshots, or build artifacts are included.

Declare local-network usage, bound foreground connection polling and retries, surface actionable error codes, and avoid logging session or SDK payloads. Add standalone policy regressions.

Co-Authored-By: Warp <agent@warp.dev>
@bradmb
bradmb marked this pull request as ready for review October 26, 2026 21:12
@SandiyosDev

Copy link
Copy Markdown
Collaborator

should the local network hint also show on stun phase failures?
I can review your code after 2.0 is pushed and released, it will need to be rebased

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