monkeyWie / proxyee

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

开启https后,如果网页挂着一段时间后,会出现网页刷新卡死,看不到卡死的请求进来 #298

Open wqeqwerertert opened 2 days ago

wqeqwerertert commented 2 days ago

代码如下:

private ProxyeeServer() {

        HttpProxyServerConfig config = new HttpProxyServerConfig();

        // 设置Ciphers 用于改变 Client Hello 握手协议指纹
        Set<String> defaultCiphers = new LinkedHashSet<>();
        defaultCiphers.add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256");
        defaultCiphers.add("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
        defaultCiphers.add("TLS_RSA_WITH_AES_128_CBC_SHA");
        defaultCiphers.add("TLS_RSA_WITH_AES_128_GCM_SHA256");
        defaultCiphers.add("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA");
        config.setCiphers(defaultCiphers);

        config.setHandleSsl(true);
        config.setMaxInitialLineLength(16384);
        config.setMaxHeaderSize(16384);
        config.setHttpProxyAcceptHandler(new MyHttpAcceptHandler());

        httpProxyServer = new HttpProxyServer()
                .serverConfig(config)
                .proxyInterceptInitializer(new HttpProxyInterceptInitializer() {
                    @Override
                    public void init(HttpProxyInterceptPipeline pipeline) {
                        pipeline.addLast(new CertDownIntercept());
                        pipeline.addLast(new FullRequestIntercept()); // 获取request请求数据
                    }
                });
    }

ka

开启ssl后,打开网页挂着一段时间,多开几个窗口 大概等个几分钟时间,再全部刷新网页,网页有一部分会卡死,刷不出来。 后台debug或者打印url的时候,发现卡死的页面url没有访问进来

大佬能否帮忙看一下这个问题,是哪里没设置对吗,还是需要别的设置,非常感谢。。。

wqeqwerertert commented 2 days ago

config.setHttpProxyAcceptHandler(new MyHttpAcceptHandler()); 这行代码可以注释掉,不会影响复现问题


config.setHttpProxyAcceptHandler(new MyHttpAcceptHandler()); This line of code can be commented out and will not affect the reproduction problem

wqeqwerertert commented 2 days ago

好像加了这个就好使了,但这个配置是自己设置的,不知道大佬有没有更好的参数呢? config.setIdleStateCheck(new IdleStateCheck(2000,2000,5000));


It seems that adding this will help, but this configuration is set by myself. I wonder if the boss has better parameters? config.setIdleStateCheck(new IdleStateCheck(2000,2000,5000));