You can do this with containerd registry mirrors. The syntax of the rewrite rules is even the same.
I guess if you don't control the platform you are running on this is a way to do it in "userspace"
It was a mistake to make the image registry and its configuration hosted outside the cluster. It makes no sense. You should be able to configure containerd registries effortlessly from inside the cluster.