Skip to content

Let mobile controls override the IP version policy - #13

Merged
MimoProxy merged 1 commit into
mainfrom
kernel/ip-version
Nov 22, 2026
Merged

MimoProxy merged 1 commit into
mainfrom
kernel/ip-version

Conversation

@MimoProxy

Copy link
Copy Markdown
Owner

Summary

  • profile.Controls gains ipVersion. Allowed values are dual, ipv4, ipv6, ipv4-prefer and ipv6-prefer; an empty value follows the profile. ApplyControls applies it to a copy of the compiled profile:
    • Every outbound that dials on its own, including the built-in direct outbound, uses the policy. direct now accepts a domain strategy through DirectSpec.
    • Outbounds chained through dialer.proxy keep their parent's socket options.
    • DNS answers AAAA queries unless the policy is ipv4.
  • ProfileStatus reports the active override as ipVersion.
  • Changing the policy updates the affected fingerprints, so those outbounds and the DNS service are rebuilt in place while the tunnel stays up.
  • Rebuilding every node in a large profile can exceed the draining limit. Packet tunnel sessions may now replace a batch larger than that limit, as long as the existing backlog stays within it. Desktop behavior is unchanged.

Tests

  • make test
  • go test ./mobile/packettunnel
  • vet on darwin, linux and android

🤖 Generated with Claude Code

Controls gains an ipVersion field. When it is set, every outbound that
dials on its own, including the built-in direct outbound, uses that
policy to resolve and connect, and DNS answers AAAA queries unless the
policy is IPv4 only. Chained outbounds keep following their parent.

Changing the policy rebuilds all affected outbounds at once, so packet
tunnel sessions may now replace a batch larger than the draining limit,
as long as the existing backlog stays within it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MimoProxy
MimoProxy enabled auto-merge November 22, 2026 00:52
@MimoProxy
MimoProxy merged commit b147a49 into main Nov 22, 2026
17 checks passed
@MimoProxy
MimoProxy deleted the kernel/ip-version branch November 22, 2026 01: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.

1 participant