monkeyWie / proxyee

HTTP proxy server,support HTTPS&websocket.MITM impl,intercept and tamper HTTPS traffic.
MIT License
1.51k stars 566 forks source link

https请求失败并且无日志 #155

Closed zhish1228 closed 4 months ago

zhish1228 commented 3 years ago

hi,

  1. 我是spring项目集成了我们的proxyee,然后我启动代理后,http的请求可以代理,但是https的请求,chrome直接提示ERR_CONNECTION_CLOSED,日志层面只有以下内容.

13:21:23.491 [nioEventLoopGroup-3-1] DEBUG io.netty.handler.logging.LoggingHandler - [id: 0xe536e86a, L:/0:0:0:0:0:0:0:0:28888] READ: [id: 0x6799de55, L:/127.0.0.1:28888 - R:/127.0.0.1:53677] 13:21:23.491 [nioEventLoopGroup-3-1] DEBUG io.netty.handler.logging.LoggingHandler - [id: 0xe536e86a, L:/0:0:0:0:0:0:0:0:28888] READ COMPLETE

  1. 代码部分如下 public static void start() {

    HttpProxyServerConfig config = new HttpProxyServerConfig(); //enable HTTPS support //If not enabled, HTTPS will not be intercepted, but forwarded directly to the raw packet. config.setHandleSsl(true); new HttpProxyServer() .serverConfig(config) .proxyInterceptInitializer(new HttpProxyInterceptInitializer() { @Override public void init(HttpProxyInterceptPipeline pipeline) { pipeline.addLast(new FullResponseIntercept() { @Override public boolean match(HttpRequest httpRequest, HttpResponse httpResponse, HttpProxyInterceptPipeline pipeline) { //Insert js when matching to Baidu homepage return true; }

          @Override
          public void handleResponse(HttpRequest httpRequest, FullHttpResponse httpResponse,
              HttpProxyInterceptPipeline pipeline) {
            //Print raw packet
            System.out.println(httpResponse.toString());
            System.out.println(httpResponse.content().toString(Charset.defaultCharset()));
            //Edit response header and response body
          }
        });
      }
    })
    .start(28888);

    }

请问有什么好的排查思路么,因为怀疑项目的依赖包版本冲突,我已经把netty的版本都升级到4.1.59.Final

monkeyWie commented 3 years ago

根证书装好了吗