monkeyWie / proxyee

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

TCP 链接数量一致在增加 #271

Closed fellowming closed 1 year ago

fellowming commented 1 year ago

TCP 链接数量一致在增加, 经排查是有大量的链接没有关闭。 请问能通过什么配置 来设置自动关闭超时的链接吗?

monkeyWie commented 1 year ago

是客户端到代理服务的TCP连接吗

fellowming commented 1 year ago

是的 使用 sudo ss -tuna | grep ESTAB 查看 都是到代理的链接 image 443 为代理监听的端口

monkeyWie commented 1 year ago

加一个IdleStateHandler做存活检查应该就行了,你有兴趣来个PR吗

fellowming commented 1 year ago

OK,我搞个哈

monkeyWie commented 1 year ago

嗯嗯,对应的代码在这里:https://github.com/monkeyWie/proxyee/blob/9f41e9ffbb3f86d2b59704411b7efef2a6130931/src/main/java/com/github/monkeywie/proxyee/handler/HttpProxyInitializer.java#L27

monkeyWie commented 1 year ago

相关修复pr:https://github.com/monkeyWie/proxyee/pull/279