Linux HTTP 和 HTTPS 代理设置指南
在 Linux 中,可以设置 HTTP 代理和 HTTPS 代理的文件有:
-
/etc/environment:在此文件中设置的代理将适用于整个系统。可以使用以下格式设置代理:http_proxy='http://proxy.example.com:8080/' https_proxy='http://proxy.example.com:8080/' -
/etc/profile:在此文件中设置的代理将适用于所有用户。可以使用以下格式设置代理:export http_proxy='http://proxy.example.com:8080/' export https_proxy='http://proxy.example.com:8080/' -
~/.bashrc:在此文件中设置的代理将仅适用于当前用户。可以使用以下格式设置代理:export http_proxy='http://proxy.example.com:8080/' export https_proxy='http://proxy.example.com:8080/' -
~/.bash_profile:在此文件中设置的代理将仅适用于当前用户。可以使用以下格式设置代理:export http_proxy='http://proxy.example.com:8080/' export https_proxy='http://proxy.example.com:8080/'
请注意,以上文件的路径可能因 Linux 发行版的不同而有所差异。在设置代理之后,需要重新启动终端或使用 source 命令使更改生效。
原文地址: https://www.cveoy.top/t/topic/fNDD 著作权归作者所有。请勿转载和采集!