Skip to content

fix(vpn): remove deprecated endpoint-independent NAT from tun defaults#563

Merged
garmr-ulfr merged 2 commits into
mainfrom
remove-endpoint-independent-nat
Jul 13, 2026
Merged

fix(vpn): remove deprecated endpoint-independent NAT from tun defaults#563
garmr-ulfr merged 2 commits into
mainfrom
remove-endpoint-independent-nat

Conversation

@garmr-ulfr

@garmr-ulfr garmr-ulfr commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This pull request makes a small change to the default inbound configuration in vpn/boxoptions_default.go. The EndpointIndependentNat option was removed from the returned struct in the baseInbounds function. EndpointIndependentNat is only supported on gVisor stacks and is deprecated, so drop it from the system stack tun configuration.

Summary by CodeRabbit

  • Bug Fixes
    • Updated TUN networking configuration while preserving existing interface, routing, and system stack settings.
    • Removed endpoint-independent NAT behavior from the default VPN inbound configuration.

`EndpointIndependentNat` is only supported on gVisor stacks and is
deprecated, so drop it from the system stack tun configuration.
Copilot AI review requested due to automatic review settings July 13, 2026 18:04
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@garmr-ulfr, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8469a260-822d-48b6-a90b-1dfe7119b740

📥 Commits

Reviewing files that changed from the base of the PR and between 15a9ace and 7a96ac6.

📒 Files selected for processing (1)
  • vpn/boxoptions_default.go
📝 Walkthrough

Walkthrough

The default utun225 TUN inbound configuration removes EndpointIndependentNat while retaining its interface, addresses, routing settings, and initial system stack.

Changes

TUN inbound configuration

Layer / File(s) Summary
Update default TUN options
vpn/boxoptions_default.go
Removes the EndpointIndependentNat assignment from the utun225 TUN inbound options while preserving the existing routing and stack settings.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: copilot, reflog

🚥 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 clearly matches the main change: removing deprecated EndpointIndependentNat from the VPN TUN default configuration.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-endpoint-independent-nat

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.

❤️ Share

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

Removes the deprecated EndpointIndependentNat setting from the default TUN inbound options, aligning the default system-stack configuration with current sing-box support expectations.

Changes:

  • Drops EndpointIndependentNat: true from baseInbounds()’s O.TunInboundOptions defaults.
  • Removes the inline rationale comment that was tied to enabling endpoint-independent NAT by default.

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

Comment thread vpn/boxoptions_default.go
@atavism

atavism commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

LGTM

@garmr-ulfr

Copy link
Copy Markdown
Collaborator Author

Thanks @atavism!

@garmr-ulfr garmr-ulfr merged commit b483735 into main Jul 13, 2026
3 checks passed
@garmr-ulfr garmr-ulfr deleted the remove-endpoint-independent-nat branch July 13, 2026 18:37
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.

3 participants