Skip to content

Instantly share code, notes, and snippets.

@macmule
Created November 21, 2021 20:24
Show Gist options
  • Select an option

  • Save macmule/7fcb1d72b62f346dfb0797981855e03e to your computer and use it in GitHub Desktop.

Select an option

Save macmule/7fcb1d72b62f346dfb0797981855e03e to your computer and use it in GitHub Desktop.
#!/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