Add support for automatically using windows system proxy#6325
Add support for automatically using windows system proxy#6325waruqi merged 2 commits intoxmake-io:devfrom
Conversation
|
感觉可以把使用系统代理作为默认行为,不需要设置 |
It feels like using system proxy can be used as the default behavior, and there is no need to set |
那还得每次配置都去探测一番,没啥必要,而且被系统干扰行为,很容易出现很多用户不感知的问题,比如被一些软件偷偷改了系统代理环境,到时候下载失败,用户查问题都得查半天。 还不如让用户主动去配置,至少用户心里清楚当前在干什么,什么时候需要代理。 |
Then you have to detect every configuration. There is no need, and the behavior is interfered with by the system. It is easy to have many problems that users do not perceive, such as some software secretly modifying the system proxy environment. If the download fails, users will have to check the problem for a long time. It is better to let the user take the initiative to configure it, at least the user knows what he is currently doing and when he needs an agent. |
在 Windows 上即使开启了系统代理,打开终端后终端也不会继承(Ubuntu 是继承的),暂时不知道 Mac 如何。如果打开终端以后什么都不做,xmake install 或者 xmake update 从 github 执行下载就会出错。
新增功能:如果先全局设置
xmake g --proxy=system,就会自动使用 Windows 系统代理。默认不开。这个功能是参考 vcpkg 的。