Proxy on base url

Is there a way to be a proxy on the prompts send to every model? not only openai models.
Hooks does not work without project open or on remote SSH.
Something like Claude Code base url so you can host and proxy the prompt.