Summary
Hello!
Following the introduction of an Astral mirror which is used to fetch Ruff release metadata, Ruff, CPython and uv itself, I was wondering whether it could be made possible to customize these URLs.
In isolated environments, access to github.com or releases.astral.sh might not permitted, and it is currently impossible to proxy requests to proxy repositories or internal mirrors. Thus, it is impossible to download Ruff using uv, uv cannot update itself, and the uv version must be provided explicitly when installing uv using its standalone installer.
I believe that adding support for customizing the base URL of the Astral mirror could solve these issues.
I know that the updater does not fetch uv release metadata and uv archives from an Astral mirror yet, but I believe that this is already on Astral's roadmap.
Design-wise, I believe that adding configuration support using a single environment variable would be enough.
Example
Considering that UV_ASTRAL_MIRROR_URL could be set to customize the base URL of the Astral mirror, it could be used as such:
$ curl https://github.com/
curl: (6) Could not resolve host: github.com
$ curl https://releases.astral.sh/
curl: (6) Could not resolve host: releases.astral.sh
$ export UV_ASTRAL_MIRROR_URL="https://nexus.example.com/repository/releases.astral.sh"
$ uv python install 3.14 # uv fetches CPython from the proxy repository.
$ uv format # uv fetches Ruff release metadata and Ruff from the proxy repository.
$ uv self update # The updater fetches uv release metadata and uv from the proxy repository.
Summary
Hello!
Following the introduction of an Astral mirror which is used to fetch Ruff release metadata, Ruff, CPython and uv itself, I was wondering whether it could be made possible to customize these URLs.
In isolated environments, access to github.com or releases.astral.sh might not permitted, and it is currently impossible to proxy requests to proxy repositories or internal mirrors. Thus, it is impossible to download Ruff using uv, uv cannot update itself, and the uv version must be provided explicitly when installing uv using its standalone installer.
I believe that adding support for customizing the base URL of the Astral mirror could solve these issues.
I know that the updater does not fetch uv release metadata and uv archives from an Astral mirror yet, but I believe that this is already on Astral's roadmap.
Design-wise, I believe that adding configuration support using a single environment variable would be enough.
Example
Considering that
UV_ASTRAL_MIRROR_URLcould be set to customize the base URL of the Astral mirror, it could be used as such: