Levi
Levi
Wow, thank you very much, let's just keep English, don't consider for the i18n in code comment. I wrote some Chinese, because my English is not good🤣.
有重现步骤吗
你是有自定义拦截器吗
@xiaoqiqiya 能贴一下你的代码吗
启动服务的代码
我看你有定义拦截器,可能是拦截器里的代码导致的内存泄漏 ``` intercepts.forEach(intercept -> { pipeline.addLast(intercept); }); ```
@xiaoqiqiya 有可能,或者你提供一个能复现的demo代码给我,我看看问题
直接return,不往下调用就行了。 示例: ```java pipeline.addLast(new HttpProxyIntercept() { @Override public void beforeRequest(Channel clientChannel, HttpRequest httpRequest, HttpProxyInterceptPipeline pipeline) throws Exception { if (HttpUtil.checkUrl(pipeline.getHttpRequest(), "^www.baidu.com$")) { //拦截到百度的请求,处理完直接返回响应 HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.FOUND); response.headers().set(HttpHeaderNames.LOCATION, "http://www.taobao.com");...
@wanxiangxin 抓请求体的话可以参考下[InterceptFullRequestProxyServer.java](https://github.com/monkeyWie/proxyee/blob/master/src/test/java/com/github/monkeywie/proxyee/InterceptFullRequestProxyServer.java),如果请求响应体都要抓的话可以参考[InterceptFullHttpProxyServer](https://github.com/monkeyWie/proxyee/blob/master/src/test/java/com/github/monkeywie/proxyee/InterceptFullHttpProxyServer.java)
@T0DDY You can use `pipeline` arg such as `pipeline.getClientChannel()`.