[GH-ISSUE #6025] [Question]: Custom proxy for /usr/bin/x-ui update #4172

Closed
opened 2026-10-31 20:37:43 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @pythonfree on GitHub (Jul 18, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6025

What are you trying to do?

How to set a custom proxy server for /usr/bin/x-ui update?

What have you already tried?

No response

3x-ui version

3.5.0

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Screenshots or config snippets

No response

Before submitting

  • I read the Wiki and searched existing issues.
  • This is a usage question, not a bug report.
  • This question is written in English.
Originally created by @pythonfree on GitHub (Jul 18, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6025 ### What are you trying to do? How to set a custom proxy server for /usr/bin/x-ui update? ### What have you already tried? _No response_ ### 3x-ui version 3.5.0 ### How did you install 3x-ui? install.sh script ### Operating system Ubuntu 24.04 ### Screenshots or config snippets _No response_ ### Before submitting - [x] I read the [Wiki](https://github.com/MHSanaei/3x-ui/wiki) and searched [existing issues](../issues?q=is%3Aissue). - [x] This is a usage question, not a bug report. - [x] This question is written in English.
bsakaguchi 2026-10-31 20:37:43 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jul 18, 2026):

/usr/bin/x-ui update has no proxy option of its own. It is the x-ui.sh script (installed to /usr/bin/x-ui); the update subcommand dispatches to the update() function (x-ui.sh), which runs:

bash <(curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/update.sh)

The downloaded update.sh then makes several more plain curl calls of its own: the GitHub API version lookup, the release tarball (x-ui-linux-<arch>.tar.gz), the refreshed x-ui.sh, and (only if missing from the tarball) a systemd unit file. None of these scripts read any x-ui-specific proxy variable — there's no --proxy flag, no config setting, nothing in install.sh/update.sh/x-ui.sh handling this. They rely entirely on curl's own standard proxy environment variables, so set those before running the update:

export https_proxy="http://proxy-host:port"
export http_proxy="http://proxy-host:port"
x-ui update

or for a SOCKS5 proxy:

export https_proxy="socks5h://127.0.0.1:1080"
export http_proxy="socks5h://127.0.0.1:1080"
x-ui update

Use export (or prefix the one-off command, e.g. https_proxy=... http_proxy=... x-ui update) rather than a plain shell variable — update() launches a fresh bash process, and only exported variables are inherited by that process and by every subsequent curl call inside the downloaded update.sh.

Separately: if you instead use the panel's own "Update" button in the web UI, there is a related but narrower setting — Settings → General → "Panel Traffic Outbound" (panelOutbound, internal/web/service/setting.go) — which routes the panel's own GitHub version check and its fetch of update.sh through a configured Xray outbound. It does not cover the release tarball download itself, which still happens via plain curl inside the launched update.sh regardless of how the update was triggered. So for the CLI flow you're using, the environment-variable approach above is what actually controls it end-to-end.

This reply was generated automatically and a maintainer may follow up.

<!-- gh-comment-id:5009938851 --> @github-actions[bot] commented on GitHub (Jul 18, 2026): `/usr/bin/x-ui update` has no proxy option of its own. It is the `x-ui.sh` script (installed to `/usr/bin/x-ui`); the `update` subcommand dispatches to the `update()` function (`x-ui.sh`), which runs: ```bash bash <(curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/update.sh) ``` The downloaded `update.sh` then makes several more plain `curl` calls of its own: the GitHub API version lookup, the release tarball (`x-ui-linux-<arch>.tar.gz`), the refreshed `x-ui.sh`, and (only if missing from the tarball) a systemd unit file. None of these scripts read any x-ui-specific proxy variable — there's no `--proxy` flag, no config setting, nothing in `install.sh`/`update.sh`/`x-ui.sh` handling this. They rely entirely on curl's own standard proxy environment variables, so set those before running the update: ```bash export https_proxy="http://proxy-host:port" export http_proxy="http://proxy-host:port" x-ui update ``` or for a SOCKS5 proxy: ```bash export https_proxy="socks5h://127.0.0.1:1080" export http_proxy="socks5h://127.0.0.1:1080" x-ui update ``` Use `export` (or prefix the one-off command, e.g. `https_proxy=... http_proxy=... x-ui update`) rather than a plain shell variable — `update()` launches a fresh `bash` process, and only exported variables are inherited by that process and by every subsequent `curl` call inside the downloaded `update.sh`. Separately: if you instead use the panel's own "Update" button in the web UI, there is a related but narrower setting — Settings → General → "Panel Traffic Outbound" (`panelOutbound`, `internal/web/service/setting.go`) — which routes the panel's own GitHub version check and its fetch of `update.sh` through a configured Xray outbound. It does not cover the release tarball download itself, which still happens via plain `curl` inside the launched `update.sh` regardless of how the update was triggered. So for the CLI flow you're using, the environment-variable approach above is what actually controls it end-to-end. *This reply was generated automatically and a maintainer may follow up.*
Author
Owner

@pythonfree commented on GitHub (Jul 18, 2026):

Thx!

<!-- gh-comment-id:5010560913 --> @pythonfree commented on GitHub (Jul 18, 2026): Thx!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4172
No description provided.