snail007 / goproxy

🔥 Proxy is a high performance HTTP(S) proxies, SOCKS5 proxies,WEBSOCKET, TCP, UDP proxy server implemented by golang. Now, it supports chain-style proxies,nat forwarding in different lan,TCP/UDP port forwarding, SSH forwarding.Proxy是golang实现的高性能http,https,websocket,tcp,socks5代理服务器,支持内网穿透,链式代理,通讯加密,智能HTTP,SOCKS5代理,黑白名单,限速,限流量,限连接数,跨平台,KCP支持,认证API。
https://snail007.host900.com/goproxy/manual/zh/
GNU General Public License v3.0
15.86k stars 3.02k forks source link

Limit the number of goroutines #552

Closed windfgg closed 11 months ago

windfgg commented 11 months ago

为避免浪费时间,一切不按着issue模版填写的问题,一律默认忽略处理,谢谢合作!

Avoid waste time, any report not match the issue template will be ignored.

Expected Behavior

Current Behavior

I am using goproxy as a dependency in my proxy pool to maintain proxies for multiple IP agents

Possible Solution

When the request volume is high, goproxy can suddenly fill up the computer's CPU and memory. I don't know what the problem is, but I checked the code and it seems that there is no limit to the number of coroutines? Is it still a problem with TLS certificate encryption and decryption? Can configurable optimizations be added if possible?

Steps to Reproduce

https://github.com/windfgg/ProxyPool

Context (Environment)

  1. proxy version is : laster
  2. full command is :?
  3. system is : liunx or win

Detailed Description

Are you considering this optimization? Or provide a solution?

Possible Implementation