axodotdev / axodotdev/axoupdater

Suggest supporting `{app_name}_INSTALLER_GITHUB_API_BASE_URL` to avoid incorrect domain inference

Open
#279 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31
Forks
13
PR merge metrics
No merged PRs in 30d

Description

I'm using [astral-sh/uv](https://github.com/astral-sh/uv) and a proxy to access GitHub and set the following environment variable:

```powershell
$env:UV_INSTALLER_GITHUB_BASE_URL="https://gh-proxy.com/github.com"
```

When I run:

```shell
uv self update -vvv
```

It fails with a DNS error:

```text
DEBUG uv 0.8.3 (7e78f54e7 2025-07-24)
info: Checking for updates...
TRACE checkout waiting for idle connection: ("https", api.gh-proxy.com)
DEBUG starting new connection:
TRACE Http::connect; scheme=Some("https"), host=Some("api.gh-proxy.com"), port=None
TRACE checkout dropped for ("https", api.gh-proxy.com)
TRACE checkout waiting for idle connection: ("https", api.gh-proxy.com)
DEBUG starting new connection:
TRACE Http::connect; scheme=Some("https"), host=Some("api.gh-proxy.com"), port=None
TRACE checkout dropped for ("https", api.gh-proxy.com)
error: error sending request for url ()
Caused by: client error (Connect)
Caused by: dns error
Caused by: 不知道这样的主机。 (os error 11001)
```

This happens because `UV_INSTALLER_GITHUB_BASE_URL` is used to construct an API URL by prepending `api.` to the domain part, resulting in `https://api.gh-proxy.com`

This is incorrect for reverse proxy setups like `https://gh-proxy.com/api.github.com`.

## Suggested Fix

Support an additional environment variable: `{app_name}_INSTALLER_GITHUB_API_BASE_URL`

If this is set, it should be used as-is as the base URL for GitHub API requests, without any transformation.

This gives users full control and avoids incorrect assumptions based on domain heuristics.

Contributor guide

Open the contributing guide

Research direction

Start in axoupdater/src/release/github.rs at the URL construction around line 39, and trace how UV_INSTALLER_GITHUB_BASE_URL becomes the GitHub API endpoint. Verify the proposed {app_name}_INSTALLER_GITHUB_API_BASE_URL behavior against the proxy example; done means an explicitly supplied API base URL is used as-is without domain inference.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.