我可以在http2.0中使用代理吗

时间:2019-10-31 01:41:20

标签: node.js proxy http2

我可以在http2.0中使用代理吗,在https http中可以使用https.agent中的代理,但是我找不到http2.0的api

就像


 if (options.proxy) {
    const proxy = options.proxy;
    if (proxy.auth) {
      options.httpsAgent = new HttpsProxyAgent(`http://${proxy.auth.username}:${proxy.auth.password}@${proxy.host}:${proxy.port}`);
    } else {
      options.httpsAgent = new HttpsProxyAgent(`http://${proxy.host}:${proxy.port}`);
    }
  }

0 个答案:

没有答案