Last active
November 21, 2025 11:57
-
-
Save diemol/65eae1192e8b70233069e11cf5debdf6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ------------------------------------- | |
| # Demo: Set PAC Proxy on macOS | |
| # Network service: Ethernet | |
| # Public PAC URL: http://wpad.example.net/wpad.dat | |
| # ------------------------------------- | |
| NETWORK_SERVICE="Ethernet" | |
| PAC_URL="https://gist.github.com/diemol/9ef7fed6e0650953d9100122ed8accc4/raw/22ca0ae270d786dcc57f9ed0c6845015abdd445f/proxy.pac" | |
| echo "🔧 Setting PAC proxy for $NETWORK_SERVICE..." | |
| networksetup -setautoproxyurl "$NETWORK_SERVICE" "$PAC_URL" | |
| networksetup -setautoproxystate "$NETWORK_SERVICE" on | |
| echo "✅ PAC file applied:" | |
| echo " $PAC_URL" | |
| echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment