Posted on 07-24-2015 12:54 PM
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?
Posted on 07-24-2015 01:10 PM
Have you checked out this
Posted on 07-24-2015 01:22 PM
@ 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?
Posted on 07-27-2015 06:33 AM
I use the networksetup command for this.
networksetup -setproxybypassdomains $networkservice "$EXCEPTION1" "$EXCEPTION2" "$EXCEPTION3" "$EXCEPTION4" "$EXCEPTION5" "$EXCEPTION6" "$EXCEPTION7" "$EXCEPTION8"
Posted on 08-12-2015 11:06 AM
@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" ?)
Posted on 08-12-2015 11:51 AM
Yes you can hardcode the values in like in your example. You can also hardcode the networkservice name (example: "Thunderbolt Ethernet") if appropriate.
Posted on 08-12-2015 01:20 PM
@Josh.Smith I thought to first test populating the field just through terminal, but I ran into this error:
Posted on 08-12-2015 01:51 PM
@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:
Posted on 08-12-2015 05:51 PM
@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") ???
Posted on 08-12-2015 06:07 PM
Just ran another test directed through the "Proxies" tab...no success populating the BP field....
So targeting the network database is the key component
Posted on 08-13-2015 05:34 AM
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"
Posted on 08-14-2015 12:09 AM
@Josh.Smith Works beautifully from the command line, Josh. Building a script to auto-populate the field and will test further.
Posted on 08-20-2015 05:33 PM
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.
Posted on 08-28-2019 11:30 AM
Is there anyway to set the proxy bypass domains on a global system level rather than network service by network service?