chrome.proxy不适用于HTTPS

时间:2017-12-02 14:05:13

标签: google-chrome google-chrome-extension proxy

我正在尝试使用以下方式路由所有请求:

  var config = {
    mode: "fixed_servers",
    rules: {
      singleProxy: {
        scheme: "https",
        host: "localhost"
      },
      bypassList: ["foobar.com"]
    }
  };
  chrome.proxy.settings.set(
      {value: config, scope: 'regular'},
      function() {});

这适用于所有http://个网站,但不适用于https://。在这些情况下,Chrome似乎甚至无法连接到代理,只是返回ERR_EMPTY_RESPONSE(来自Chrome的VPN中没有数据包)

1 个答案:

答案 0 :(得分:0)

https代理与http代理不同。它是HTTPS协议,而不是HTTP。 https://en.wikipedia.org/wiki/HTTPS 据我所知,您在本地计算机上运行代理,因此您需要https代理软件。 像这样的人https://www.npmjs.com/package/https-proxy-agent http://和https://表示协议。所以ftp,pop,smtp,ed2k,比特币......等等。

相关问题