代码之家  ›  专栏  ›  技术社区  ›  Azize

代理后面的无服务器插件

  •  1
  • Azize  · 技术社区  · 8 年前

    如何使用命令 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 --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 回复  |  直到 8 年前
        1
  •  0
  •   Azize    8 年前

    这被确定为 serverless plugin 根据本期报道:
    https://github.com/serverless/serverless/issues/5480


    https://github.com/serverless/serverless/pull/5481

    无服务器插件 simple不支持 proxy 在此版本之前。

    推荐文章