Have there been any other attempts to automate adding: swcdn.apple.com, swdownload.apple.com, swquery.apple.com,swscan.apple.com, to the "Bypass Proxy Settings" field?
Have you checked out this
@ davidacland Yes, great post, and thanks for sharing. I've referenced this for auto-populating the URL proxy fields (i.e., http and https). But I'm working with the task of auto populating the huge field beneath. Researching which plist sees this field and how to write to it via script. This is an interesting alternative with not being having APNS in place. Any ideas?
I use the networksetup command for this.
networksetup -setproxybypassdomains $networkservice "$EXCEPTION1" "$EXCEPTION2" "$EXCEPTION3" "$EXCEPTION4" "$EXCEPTION5" "$EXCEPTION6" "$EXCEPTION7" "$EXCEPTION8"
@Josh.Smith Josh can I auto populate this into the ByPass field? (ex: networksetup -setproxybypassdomains $networkservice "swscan.apple.com" "swquery.apple.com" "swcdn.apple.com" "swdownload.apple.com" ?)
Yes you can hardcode the values in like in your example. You can also hardcode the networkservice name (example: "Thunderbolt Ethernet") if appropriate.
@Josh.Smith I thought to first test populating the field just through terminal, but I ran into this error:
@msample Try this (you'll need to enter your network service name, it may not be "Display Ethernet")
sudo networksetup -setproxybypassdomains "Display Ethernet" "swscan.apple.com" "swquery.apple.com" "swcdn.apple.com" "swdownload.apple.com"
Before:
After:
@Josh.Smith Dropped in the Network Service name (i.e., sudo networksetup -setproxybypassdomains "Thunderbolt-Ethernet" "swscan.apple.com" "swquery.apple.com" "swcdn.apple.com" "swdownload.apple.com"). but the error is the same...
I'm wondering if I add more specific direction with the proxies tab... (i.e., sudo networksetup -setproxybypassdomains "Thunderbolt-Ethernet" "Proxies" "swscan.apple.com" "swquery.apple.com" "swcdn.apple.com" "swdownload.apple.com") ???
Just ran another test directed through the "Proxies" tab...no success populating the BP field....
So targeting the network database is the key component
The issue is likely the hyphen in
Thunderbolt-Ethernet
To get the list of valid options on your system for that value run this:
networksetup -listallnetworkservices
My MBP connected to an Apple display gives these networkservices:
*Bluetooth DUN 5
Thunderbolt Ethernet
Display Ethernet
Display FireWire
*Wi-Fi
*Bluetooth PAN
Thunderbolt Bridge
So I could run any of these (or ideally use a script that pulls the names in dynamically and configures them as desired):
networksetup -setproxybypassdomains "Display Ethernet" "swscan.apple.com" "swquery.apple.com" "swcdn.apple.com" "swdownload.apple.com"
networksetup -setproxybypassdomains "Thunderbolt Ethernet" "swscan.apple.com" "swquery.apple.com" "swcdn.apple.com" "swdownload.apple.com"
networksetup -setproxybypassdomains "Wi-Fi" "swscan.apple.com" "swquery.apple.com" "swcdn.apple.com" "swdownload.apple.com"
@Josh.Smith Works beautifully from the command line, Josh. Building a script to auto-populate the field and will test further.
Figured out how to make it populate.
Created a policy, checked the "Custom" button...
- Custom Event jamf policy -trigger thenameofyourpolicy
- Execution Frequency once per user
- Recurring Check-in
Create a script to attach to the policy (#!/bin/sh not #!bin/bash), and add the Files and Processes payload.
In the File and Processes payload, configure the "Execute Command" field with:
networksetup -setproxybypassdomains "Thunderbolt Ethernet" .local 169.254/16 swscan.apple.com swquery.apple.com swdownload.apple.com swcdn.apple.com*
Tested not attaching a script to this, but the configuration never populated the bypass proxy field.
Is there anyway to set the proxy bypass domains on a global system level rather than network service by network service?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.