Skip to content

feat(desktop): add a SetDNS toggle to the Core CLI - #171

Merged
yiguodev merged 1 commit into
mainfrom
feat/desktop-set-dns-toggle
Nov 8, 2026
Merged

yiguodev merged 1 commit into
mainfrom
feat/desktop-set-dns-toggle

Conversation

@yiguodev

@yiguodev yiguodev commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make the desktop Core's process DNS override optional while preserving the default behavior.

xray run
├─ -set-dns=true (default): require DNS/interface → SetDNS → Core → ResetDNS
└─ -set-dns=false: Core without the libXray resolver override

The disabled mode accepts omitted or unused -dns and -interface values. Configuration remains required, and the English and Chinese CLI documentation describe the boolean flag syntax.

Evidence

  • Before: Every desktop run required DNS/interface arguments and installed the process resolver override.
    After: Tests cover default and explicit enablement, disabled mode with omitted or unused DNS arguments, invalid flags, and disabled execution reaching the real configuration parser.
  • go test -mod=readonly ./desktop_bin -count=1 -v: passed on Windows amd64.
  • python build/main.py windows: succeeded. Both outputs are AMD64; the DLL exports CGoInvoke and CGoFree. Temporary module changes were restored.
  • git diff --check: passed. Validation did not start a VPN.

Merge Danger

Door: two-way

Blast Radius: Desktop

Resolver bypass applies only when a caller explicitly supplies -set-dns=false. Live VPN connectivity was not exercised.

@yiguodev
yiguodev merged commit 645bf9a into main Nov 8, 2026
3 checks passed
@yiguodev
yiguodev deleted the feat/desktop-set-dns-toggle branch November 8, 2026 03:59
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