Is your feature request related to a problem? Please describe.
My work setup is behind a proxy which uses a self-signed certificate. I can't use CocInstall because I get the following error: Error: self signed certificate in certificate chain
Describe the solution you'd like
Add a setting which lets me ignore certificate errors.
I have set http.proxyStrictSSL to false and am pointing npm.binPath at the correct npm install and have strict-ssl set to false in .npmrc.
Describe alternatives you've considered
Allow extensions to be installed in a different way?
Additional context
CocInfo:
## versions
vim version: VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 22 2019 19:03:04)
node version: v10.17.0
coc.nvim version: 0.0.74-6700e7468d
term: iTerm.app
platform: darwin
## Messages
Messages maintainer: Bram Moolenaar <[email protected]>
"~/.vim/coc-settings.json" 8L, 132C
[coc.nvim] Error on install coc-json: Error: self signed certificate in certificate chain
export NODE_TLS_REJECT_UNAUTHORIZED=0 first, and start vim to :CocInstall.
Thanks @fannheyward, that did the trick for installing but won't automatic updates still error out? A coc setting for this could fix it for good.
Try "https.rejectUnauthorized": false with master branch.
@fannheyward I think we need the same change to model/fetch.ts. Using this param doesn't actually allow the fetch code to download the list of packages from the repository website. Local testing confirms that adding the same option in fetch.ts resolves the issue fully.
We should use http.proxyStrictSSL which is used by VSCode and does the same as https.rejectUnauthorized
I am currently trying to use CoC behind a corporate proxy. I have setup the proxy settings correctly and disabled strictSSL in my coc config, npm config, and yarn config. I am still seeing TLS client disconnected issues. If I navigate to ~/.config/coc/extensions and no a yarn install, then the extensions are installed correctly. I am not entirely sure what else to do regarding setting this up.
coc-settings.json
{
"languageserver": {},
"git.enableGutter": true,
"http.proxyStrictSSL": false,
"http.proxy": "ex-proxy.com:80"
}
.npmrc
https-proxy=http://ex-proxy.com:80
strict-ssl=false
proxy=http://ex-proxy.com:80/
.yarnrc
https-proxy "http://ex-proxy.com:80"
lastUpdateCheck 1599605316642
proxy "http://ex-proxy.com:80"
strict-ssl false

@tristan957 add http schema part in your proxy url in coc-settings.json http.proxy.
馃う thanks @fannheyward. Thought it would be like VSCode's proxy settings. There I don't have the http://, but it still works.
Most helpful comment
export NODE_TLS_REJECT_UNAUTHORIZED=0first, and start vim to:CocInstall.