Toggle iCloud Private Relay

Apple's iCloud Private Relay feature is a great way to improve privacy and security while you are browsing online. Its effect is similar to a VPN, but neither Apple nor the target website know both your IP address and the URL you are visiting.

However, some websites insist on seeing this information, often because they use it for identification purposes. You can reveal your IP address for a single page by right-clicking the Reload arrow in Safari's URL field, but some websites include redirections that keep this from working. Our university's SSO mechanism is one example. In these cases, you want to turn Private Relay on and off quickly, but Apple does not provide a quick way to do so.

So I wrote a macro that lets you toggle Private Relay on and off with a single keypress or mouse click. It opens the System Settings window and clicks the right buttons to toggle that status; you can see it at work while it is running. You can map this to a single keypress (I use Fn-F6 because of its 'Do Not Disturb' moon icon), or you can trigger it from a menubar icon. I even designed a cute icon for it.

It currently works for macOS 15.2. You might need to tweak it slightly for newer macOS releases since the System Settings UI tends to change a bit. Or just check back at the URL below; I may have already done that for you:

2 Likes

Nice...

Note that you can replace the first few actions with

image

...the full URL being

x-apple.systempreferences:com.apple.systempreferences.AppleIDSettings?iCloud

...which will open System Settings at the correct pane for you.

1 Like

I appreciate your work. But how would the target website know that the IP address is not your real address? Consider that a large portion of internet users live behind a firewall and their "real" IP address is always invisible to the world.

1 Like

Some work/education networks block QUIC (which Private Relay relies on) so you can't avoid their network access monitoring/auditing. Services might require that you have an IP address from a certain range, eg the work wireless network, or use a VPN (which Private Relay can conflict with). And so on.

Apple have a page about preparing for users who use Private Relay. Most work/education environments will say "No, you can prepare yourself by turning it off" when the user is a member of staff trying to access business services...

1 Like