我正在为windows设计一个VPN,我想在系统上设置代理,
有几种方法可以做到这一点(例如,从注册表或命令行),但我正在寻找更好的解决方案(如包或其他)
有没有更好的解决方案来在电子桌面应用程序的操作系统上设置代理?
发布于 2020-07-09 18:50:41
对于bash和sh用户,将上面给出的导出行添加到名为/etc/profile.d/http_proxy.sh file: copy的新文件中
echo "export http_proxy=http://proxy.example.com:3128/" > /etc/profile.d/http_proxy.sh对于csh和tcsh用户,使用以下命令在名为/etc/profile.d/http_proxy.csh file的新文件中设置http_proxy变量:
echo "setenv http_proxy http://proxy.example.com:3128/" > /etc/profile.d/http_proxy.csh这些文件的扩展名决定了哪个shell将读取它们。这些命令不可互换。
当用户名或密码使用@符号时,请在@前添加反斜杠(),例如:
export http_proxy=http://DOMAIN\\USERN\@ME:PASSWORD@SERVER:PORT对于windows,
setx http_proxy http://user:password@proxyIP:proxyPort/https://stackoverflow.com/questions/62813126
复制相似问题