For the complete documentation index, see llms.txt. This page is also available as Markdown.

Linux

Linux 没有统一的全局代理设置——分 shell 环境变量、桌面环境(GNOME / KDE)、各应用自配几条线。本页给出实际需要的模式。

环境变量(命令行 + 多数应用)

事实标准。curl、wget、apt、pip、npm、git 及大多数服务都识别。

export http_proxy="http://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io:7777"
export https_proxy="$http_proxy"
export no_proxy="localhost,127.0.0.1,.local"
# 同时设大写变体——部分应用只认大写:
export HTTP_PROXY="$http_proxy"
export HTTPS_PROXY="$https_proxy"
export NO_PROXY="$no_proxy"

写到 ~/.bashrc~/.zshrc/etc/environment 实现持久化。

GNOME

gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.http  host 'gate.helodata.io'
gsettings set org.gnome.system.proxy.http  port 7777
gsettings set org.gnome.system.proxy.https host 'gate.helodata.io'
gsettings set org.gnome.system.proxy.https port 7777

GNOME 代理对话框不存凭证——用 secret-tool 或按应用配;更简单:在终端启动会话直接用环境变量。

KDE

系统设置 → 网络 → 代理 → 使用手动指定的代理。同样填 host/port,凭证存到 KWallet。

apt(Debian / Ubuntu)

新建 /etc/apt/apt.conf.d/99helo-proxy

yum / dnf(RHEL / Fedora)

写入 /etc/yum.conf(yum)或 /etc/dnf/dnf.conf(dnf):

Docker

守护进程级(影响镜像拉取):

容器级 — docker run/构建时 --env http_proxy=…

systemd 服务

让服务接收代理,在 unit 文件中加:

然后 systemctl daemon-reload && systemctl restart <service>

验证

常见陷阱

  • 环境变量区分大小写 — 部分应用只识小写 http_proxy,部分只识大写,两个都设

  • localhost bypass — 没有 no_proxy=localhost,本地开发服务器会被代理出去失败。

  • 密码含特殊字符 — 嵌入 http_proxy 前 URL 编码(@%40:%3A)。

最后更新于

这有帮助吗?