Skip to content
acexyPublic

About

Command-line tool for viewing and changing macOS system proxy settings.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

proxy-ctl

pctl is a command-line tool for viewing and changing macOS system proxy settings.

Build

From the repository root, use Go 1.27 or later:

go build -o pctl .

Usage

./pctl status
./pctl set 127.0.0.1:7890
./pctl set -f --service "Wi-Fi" 127.0.0.1:7890
./pctl noproxy
./pctl noproxy --all
  • status shows the effective macOS proxy settings and the saved settings for the primary network service. Use --service NAME to inspect a specific service.
  • set HOST:PORT enables HTTP, HTTPS, and SOCKS on the same endpoint and turns off PAC and automatic proxy discovery. Pass -f to replace an existing enabled configuration that differs from the requested settings. An exact match succeeds without writing changes.
  • noproxy disables HTTP, HTTPS, SOCKS, PAC, and automatic proxy discovery. It preserves saved endpoints, PAC URLs, and bypass rules. Use --all to disable those modes across all configured network services in the current network location.

By default, write commands target the primary network service. If macOS reports different primary services for IPv4 and IPv6, or a single primary service cannot be resolved, pass --service NAME. Place flags before the endpoint when using set. Supply the endpoint explicitly and put IPv6 addresses in brackets, for example '[::1]:7890'. Changing settings can require administrator privileges.

Start the proxy server separately. pctl configures macOS to use the endpoint you provide.

License

Apache License 2.0

About

Command-line tool for viewing and changing macOS system proxy settings.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages