Skip to content

fix(darwin): disable PAC mode on set/unset global#11

Merged
github-actions[bot] merged 1 commit into
mainfrom
dev
Jul 4, 2026
Merged

fix(darwin): disable PAC mode on set/unset global#11
github-actions[bot] merged 1 commit into
mainfrom
dev

Conversation

@mar0ls

@mar0ls mar0ls commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Fixes stale PAC behavior on macOS: after unset --scope global, get could still return Auto Proxy URL.\n\nChanges:\n- disable autoproxy state in setGlobal\n- disable autoproxy state in unsetGlobal\n- disable autoproxy state in setGlobalMulti\n\nValidated with:\n- go test -race -count=1 ./...\n- golangci-lint run ./...\n- local smoke cycle set->get->unset with state restore

Ensure manual/global proxy operations turn off autoproxy state on macOS so get() no longer returns stale PAC after unset.
Copilot AI review requested due to automatic review settings July 4, 2026 19:23
@github-actions github-actions Bot merged commit 14e44f6 into main Jul 4, 2026
26 checks passed
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes a macOS-specific proxy-state inconsistency where PAC (Auto Proxy URL) could remain active after global proxy changes, causing get/GetConfig to report a stale PAC URL.

Changes:

  • Disable macOS auto-proxy (PAC) mode when setting a global manual proxy.
  • Disable macOS auto-proxy (PAC) mode when unsetting the global proxy.
  • Disable macOS auto-proxy (PAC) mode when applying multi-protocol global proxy settings.

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

Comment thread sysproxy_darwin.go
Comment on lines +22 to +23
// Ensure manual proxy mode is authoritative and PAC does not stay active.
_ = runNetworkSetup(ctx, "-setautoproxystate", svc, "off")
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