Created
November 21, 2021 20:24
-
-
Save macmule/7fcb1d72b62f346dfb0797981855e03e 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/sh | |
| #################################################################################################### | |
| # | |
| # License: http://macmule.com/license/ | |
| # | |
| #################################################################################################### | |
| # Detects all network hardware & creates services for all installed network hardware | |
| /usr/sbin/networksetup -detectnewhardware | |
| IFS=$'\n' | |
| #Loops through the list of network services | |
| for i in $(/usr/sbin/networksetup -listallnetworkservices | tail +2 ); | |
| do | |
| # Turn off auto proxy | |
| /usr/sbin/networksetup -setautoproxystate "$i" off | |
| echo "Turned off auto proxy for interface $i" | |
| done | |
| unset IFS | |
| echo "Auto proxy for all interfaces turned off" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment