首页 > 解决方案 > 值必须匹配正则表达式 '^https?://([^@

问题描述

我正在尝试通过在我的 VSCode 中导入我的代理来更新我的设置。

我收到以下错误:

Value must match regex '^https?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$'

我在我的设置下拥有的是

"http.proxy": "http://user:sample.proxy.com:123"
"https.proxy": "http://user:sample.proxy.com:123"
"http.proxyStrictSSL": false

有什么我需要改变的吗?

标签: visual-studio-codeproxyvscode-settings

解决方案


该错误为您提供了所需的所有信息;它与所需的格式不匹配。

通常,如果您想包含用于身份验证的用户名和密码,则需要采用以下格式:

http://<user>:<password>@<url><:port>

"http.proxy": "http://user:password@sample.proxy.com:port#"

推荐阅读