Skip to content

fix(vpn): apply mobile memory limits on iOS only#541

Open
garmr-ulfr wants to merge 1 commit into
mainfrom
fix/drop-android-memory-restrictions
Open

fix(vpn): apply mobile memory limits on iOS only#541
garmr-ulfr wants to merge 1 commit into
mainfrom
fix/drop-android-memory-restrictions

Conversation

@garmr-ulfr

@garmr-ulfr garmr-ulfr commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

This pull request updates the logic for setting memory limits in the tunnel initialization process. Now, memory limits are only set on iOS devices, rather than on all mobile platforms.

Platform-specific behavior:

  • Changed the condition from common.IsMobile() to common.IsIOS() in tunnel.go to ensure memory limits are only applied on iOS, since Android does not enforce these restrictions.

Summary by CodeRabbit

  • Bug Fixes
    • Mobile memory tuning now applies only on iOS, preventing Android devices from using iOS-specific memory restrictions.
    • Improved platform handling for better behavior across mobile devices.

Android does not appear to apply memory restrictions, so the limits
are unnecessary there and only constrain available memory.
Copilot AI review requested due to automatic review settings June 26, 2026 19:05
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 242b3f1a-50f6-40ad-8aaf-a8c982df271e

📥 Commits

Reviewing files that changed from the base of the PR and between 687d6be and 18a98c6.

📒 Files selected for processing (1)
  • vpn/tunnel.go

📝 Walkthrough

Walkthrough

vpn/tunnel.go now applies mobile memory limits only on iOS, and the surrounding comment was updated to match that platform-specific condition.

Changes

iOS Memory Tuning

Layer / File(s) Summary
iOS-only memory limits
vpn/tunnel.go
tunnel.init now calls setMobileMemoryLimits() only when common.IsIOS() is true, and the comment reflects the iOS-specific behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A bunny hopped through tunnel light,
and nibbled rules just once tonight.
On iOS, limits softly stay,
while Android hops a freer way.
\o/

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the core change: memory limits now apply only on iOS.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/drop-android-memory-restrictions

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts tunnel initialization to apply Go runtime/conntrack memory tuning only on iOS, aligning the behavior with iOS’s enforced memory constraints while avoiding ineffective limits on Android.

Changes:

  • Switch memory-limit gating from common.IsMobile() to common.IsIOS() in tunnel.init.
  • Add an inline rationale comment explaining the iOS-only behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vpn/tunnel.go
@garmr-ulfr garmr-ulfr requested a review from myleshorton June 26, 2026 19:10
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