mirror of
https://github.com/amnezia-vpn/amneziawg-tools.git
synced 2026-12-03 18:12:41 +07:00
[PR #79] wg-quick: darwin: avoid redundant DNS preference writes #79
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-tools#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-tools/pull/79
Author: @mikhalytch
Created: 10/20/2026
Status: 🔄 Open
Base:
master← Head:fix/darwin-dns-idempotence📝 Commits (1)
f9284eewg-quick: darwin: avoid redundant DNS preference writes📊 Changes
1 file changed (+17 additions, -6 deletions)
View changed files
📝
src/wg-quick/darwin.bash(+17 -6)📄 Description
Context / Why
The Darwin route monitor calls set_dns() repeatedly. It currently rewrites DNS servers and search domains even when their values are unchanged, generating unnecessary SystemConfiguration notifications.
On an M1 Pro Mac with macOS 27.0.1, airportd sustained approximately 100–115% CPU. After this change, with the same CLI VPN connection active, it settled at 0.3–0.4%.
What changed
Files / Areas to focus
Risk assessment
The change is limited to Darwin DNS updates. Rollback consists of reverting this commit.
How to test
Notes
Reference implementation and regression tests:
github.com/mikhalytch/amneziawg-mac@8f8d19e2eaThe regression tests are maintained in the reference repository; this PR changes only the upstream Darwin script.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.