Sharing a silly little preset that someone else may find useful...
Provides two touchbar indicator icons (red: off, green: on) for local Tor service status and system proxy status.
Looks for the homebrew tor service - Documentation here and tap actions will load/unload the service.
Looks at the system proxy status - Tap actions to enable/disable system wide proxy.
My (forced) use case was using public/open wifi and wanting to be aware of my tunnel status.
The same logic can be used to create/monitor/toggle ssh tunnels too, however this example is Tor only.
Note that this doesn't set the system proxy values it assumes you have already set them (typically SOCKS 127.0.0.1:9050