Skip to content

Instantly share code, notes, and snippets.

@mpontillo
Created April 2, 2015 19:26
Show Gist options
  • Save mpontillo/857bedeb103187212c73 to your computer and use it in GitHub Desktop.
Save mpontillo/857bedeb103187212c73 to your computer and use it in GitHub Desktop.
Print all proxy settings on OS X
#!/bin/bash
function print_proxy_settings() {
echo "$@"
networksetup -getwebproxy "$@"
echo ""
}
export -f print_proxy_settings
networksetup -listallnetworkservices | \
tail -n +2 | \
tr '\n' '\0' | \
xargs -0 -n 1 bash -c 'print_proxy_settings "$@"' _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment