I love iCloud private relay, but I need a way to turn it off. A command line utility would be amazing, along with the ability to turn off/on DNS-over-HTTP.
I love iCloud private relay, but I need a way to turn it off. A command line utility would be amazing, along with the ability to turn off/on DNS-over-HTTP.
You can turn if off in settings > iCloud. Either temporary for a day and auto back on, or permanently until you turn it back on.
Yep, but one cannot script that, make it a part of a bash or automator actions, which is a problem.
There's a PLIST entry possibly relevant to it in `~/Library/Preferences/com.apple.networkserviceproxy.plist`
I couldn't figure out how to get any changes to reflect but maybe it's a good pointer towards a solution?
EDIT: Reading into this, looks like they're very intentional about not allowing arbitrary enable/disable calls to it, likely to prevent a hostile entity from switching it off on unsuspecting users. The systems setting calls an XPC into a daemon that makes a web request, then validates the response from the API to update the PLIST structure.
> hostile entity from switching it off on unsuspecting users
I agree it's likely to prevent third parties from messing with the setting, but not hostile third parties specifically. Think of a VPN app or file sharing browser extensions who might want to disable the relay "to be helpful".
Because a truly hostile entity capable of changing local settings can already obtain the device's real IP and also capture traffic, the two things private relay is meant to prevent. There would be no point. If anything it might increase the odds of detection.
Apple often plays a game where they blend security and business interests, but represent it only as a security interest.
They own the OS and could do for private relay like what they do for screen recording: when it's in use, overlay an unhideable visual indicator that it's that it's in use. Make it visually obvious when it turns off.
Have you tried recording UI events in Automator and saving it as an Application? Then you could execute the .app via script. I haven't done this but in theory it should work.
osascript with System Events seems to work for opening the right modal in Settings and flipping the switch On, in a quick test.
I did not verify whether it works reliably.
If it does, one could probably package it as a .app and grant only that the Accessibility permission.
I desperately wish there was a "Turn off for five minutes, I'm dealing with dumb corpsec auth stuff" option.
On iOS: page menu —> kebab menu —> show IP address
In macOS view->reload and show IP address