безсерверный плагин за прокси - PullRequest
0 голосов
/ 13 ноября 2018

Как я могу использовать команду serverless plugin list за прокси?
Я получаю эту ошибку:

request to https://raw.githubusercontent.com/serverless/plugins/master/plugins.json failed, reason: connect ECONNREFUSED 151.101.84.133:443

Команда serverless deploy отлично работает с моим прокси, поэтому конфигурация прокси и / или прокси не должна быть проблемой.

Версия

$ node --version
v11.1.0

$ npm --version
6.4.1

Переменные среды

$ env | grep -i proxy
NO_PROXY=localhost,127.0.0.0/8,::1
http_proxy=http://localhost:3128/
npm_config_https_proxy=http://localhost:3128/
https_proxy=http://localhost:3128/
no_proxy=localhost,127.0.0.0/8,::1
npm_config_proxy=http://localhost:3128/

Curl

Даже если я curl, он отлично работает с моими настройками прокси. Усечено для краткости.

$ curl --verbose https://raw.githubusercontent.com/serverless/plugins/master/plugins.json
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 3128 (#0)
* Establish HTTP proxy tunnel to raw.githubusercontent.com:443
> CONNECT raw.githubusercontent.com:443 HTTP/1.1
> Host: raw.githubusercontent.com:443
> User-Agent: curl/7.47.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection established
< Connection: close
< 
* Proxy replied OK to CONNECT request
* found 155 certificates in /etc/ssl/certs/ca-certificates.crt
* found 625 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
*    server certificate verification OK
*    server certificate status verification SKIPPED
*    common name: www.github.com (matched)
*    server certificate expiration date OK
*    server certificate activation date OK
*    certificate public key: RSA
*    certificate version: #3
*    subject: C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=www.github.com
*    start date: Thu, 23 Mar 2017 00:00:00 GMT
*    expire date: Wed, 13 May 2020 12:00:00 GMT
*    issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA
*    compression: NULL
* ALPN, server accepted to use http/1.1
> GET /serverless/plugins/master/plugins.json HTTP/1.1
> Host: raw.githubusercontent.com
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
< Strict-Transport-Security: max-age=31536000
< X-Content-Type-Options: nosniff
< X-Frame-Options: deny
< X-XSS-Protection: 1; mode=block
< ETag: "53374f2ed929f6d42faf13ebb025e0ff985941f1"
< Content-Type: text/plain; charset=utf-8
< Cache-Control: max-age=300
< X-Geo-Block-List:
< X-GitHub-Request-Id: 447E:6762:1CABB8:1E679B:5BEAD6AF
< Content-Length: 45355
< Accept-Ranges: bytes
< Date: Tue, 13 Nov 2018 13:50:39 GMT
< Via: 1.1 varnish
< Connection: keep-alive
< X-Served-By: cache-bma1635-BMA
< X-Cache: MISS
< X-Cache-Hits: 0
< X-Timer: S1542117040.576321,VS0,VE107
< Vary: Authorization,Accept-Encoding
< Access-Control-Allow-Origin: *
< X-Fastly-Request-ID: 929450c7326d8ce7c7ffa13174cbd80c86ecc255
< Expires: Tue, 13 Nov 2018 13:55:39 GMT
< Source-Age: 0
< 
[

1 Ответ

0 голосов
/ 14 ноября 2018

Это было определено как ошибка в serverless plugin в соответствии с этой проблемой:
https://github.com/serverless/serverless/issues/5480

Решение будет исходить из этого PR:
https://github.com/serverless/serverless/pull/5481

serverless plugin simple не поддерживает proxy до этой версии.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...