Linux 兼容性:设置 `https_proxy` 环境变量

Author: tomcupCreated Sep 29, 2026Updated Sep 29, 2026
LabelsBug
  • 你是否在现有 Issue列表 中搜索过相同问题,但未找到?

Ⅰ. 请说明操作系统及DS的版本号:

  1. 操作系统:Void Linux x86_64-glibc
  2. DS版本号:2.2.0

Ⅱ. 问题描述:

环境变量 https_proxy http_proxy 没有设置。

可能的原因:使用了自定义的 wayland 桌面,或由于发行版没有 systemd 和 init.d 导致的。因而没有任何系统级别的网络代理管理,比如 KDE GNOME 都有该功能,所以需要手动设置环境变量。

注意到 man chromium 中关于代理的描述,就很能说明问题:

man
ENVIRONMENT
       Chromium obeys the following environment variables:

       ...

       http_proxy, https_proxy, ftp_proxy
              The proxy servers used for HTTP, HTTPS, and FTP.  Note: because
              Gnome/KDE proxy settings may propagate into these variables in
              some terminals, this variable is ignored (in preference for
              actual system proxy settings) when running under Gnome or KDE.
              Use the command-line flags to set these when you want to force
              their values.

Ⅲ. 期望的结果:

环境变量 https_proxy 被正确设置。

其值默认应为,注意是 http:

http://127.0.0.1:81131