[other] 如何在终端里设置全局系统代理
Tofloor
poster avatar
lsl
deepin
2023-12-27 01:29
Author

在终端里设置 http-p r o x y等环境变量只对当前终端生效,在KDE环境里可以使用 kwriteconfig5,在Gnome里 gsettings命令可以设置系统代理,在DDE里有类似的设置全局代理的命令吗?

Reply Favorite View the author
All Replies
北冥夜未央
deepin
Ecological co-builder
2023-12-27 01:52
#1

我昨天反馈在设置里加环境变量设置,一群人喷,别人都大佬,不会考虑我们普通人的需求的。

Reply View the author
Bryan
deepin
2023-12-27 01:54
#2

你可以参考一下我的方法。

如果你用的是bash的话,可以考虑在 .bash_profile 下添加如下内容(把空格删掉)

export http_p r o x y="http://ip:port"
export https_p r o x y="$http_p r o x y"
export all_p r o x  y="$http_p r o x y"

如果是zsh的话,则将上面的内容放到.zprofile里面。

最后注销,重新登录。

Reply View the author
安洛
deepin
2023-12-27 01:57
#3

Deepin也可以用gsettings。Deepin wrap了gsettings里面跟gnome系统代理有关的选项,会将相关修改自动同步到Deepin设置中。只需要用修改gnome系统代理相同的命令,就可以修改Deepin的系统代理。

这个做法的好处是可以不需要注销或者重启就可以修改系统代理,实时生效。

Reply View the author
👀偷偷观察
deepin
2023-12-27 02:09
#4

v2raya 的透明代理,不需要设置,都可以走代理、

Reply View the author
neko
deepin
Ecological co-builder
2023-12-27 03:09
#5

控制中心-网络

Reply View the author
忘记、过去
deepin
2023-12-27 07:06
#6

和 gnome 的设置命令基本通用,DDE 里面也是通过 gsettings 设置管理的

Reply View the author
babyfengfjx
Super Moderator
CQA
2023-12-27 21:51
#7

好像这里设置后,在终端里是一个效果:
image.png

Reply View the author
momo
deepin
2024-04-19 11:52
#8

在root模式下,能获取普通用户设置的代理信息吗

Reply View the author