Chrome远程调试端口无法通过SSH> https传递

时间:2018-08-30 09:14:26

标签: nginx ssh https google-chrome-devtools

使用铬(在电子应用中)

我需要在公共IP上使用remote-debugging-port。出于安全原因,Chrome不允许除“ localhost”之外的其他主机名进行访问。

为解决此问题,我在此命令中使用了ssh tunnel:

June 17, 2016

它工作正常,我可以通过http://:4101 /对其进行访问。但是现在我想通过https使用它。

为此,我尝试使用Nginx,因为我已经将其用于HTTPS:

ssh -L 0.0.0.0:4101:localhost:4100 localhost -N

但我收到此错误:

  

2018/08/28 16:28:22 [错误] 4234#4234:* 3上游提前关闭   从客户端读取响应标头时进行连接:   10.0.19.235,服务器:,请求:“ GET /favicon.ico HTTP / 1.1”,上游:“ http://127.0.0.1:4100/favicon.ico”,主机:“ myDomain.local:4101”,   引荐来源网址:“ https://myDomain.local:4101/

我尝试使用不同的值(例如$ server_addr,$ remote_addr,“ localhost”,127.0.0.1)更改此标头,但没有结果:

  server {
      listen 4101 ssl;
      proxy_connect_timeout 7d;
      proxy_send_timeout 7d;
      proxy_read_timeout 7d;
      ssl_certificate /etc/nginx/ssl/server.crt;
      ssl_certificate_key /etc/nginx/ssl/server.key;
      charset   utf-8;
      add_header Strict-Transport-Security "max-age=31536000";
      location / {
       proxy_pass http://127.0.0.1:4100/;
      }
  }

我认为有必要更改一些标头,以使我们想到来自本地主机的远程控制台,但是即使在阅读了Nginx文档之后,我也不知道是哪个控制台。

您有什么建议吗?

0 个答案:

没有答案