命令行走代理,http_proxy和https_proxy设置问题
windows中命令行要使用代理,http_proxy和https_proxy有如下写法:
1、有引号
set http_proxy="socks5://127.0.0.1:13569"
set https_proxy="socks5://127.0.0.1:13569"
2、无引号
set http_proxy=socks5://127.0.0.1:13569
set https_proxy=socks5://127.0.0.1:13569
问题:
1、加上引号使用会报错:
D:\vagrant_env
λ set http_proxy="socks5://127.0.0.1:13569"
D:\vagrant_env
λ set https_proxy="socks5://127.0.0.1:13569"
D:\vagrant_env
λ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): http://"socks5://127.0.0.1:13569" (URI::InvalidURIError)
2、不加引号好像同样翻不了:
D:\vagrant_env
λ set http_proxy=socks5://127.0.0.1:13569
D:\vagrant_env
λ set https_proxy=socks5://127.0.0.1:13569
D:\vagrant_env
λ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Vagrant failed to load a configured plugin source. This can be caused
by a variety of issues including: transient connectivity issues, proxy
filtering rejecting access to a configured plugin source, or a configured
plugin source not responding correctly. Please review the error message
below to help resolve the issue:
no such name (https://gems.hashicorp.com/specs.4.8.gz)
Source: https://gems.hashicorp.com/
所以,应该怎么写才对?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为 socks5://127.0.0.1:13569 这是 socks5 代理, 不是 http 代理.