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

关于proxy关闭上下游连接时机的疑问 #564

Open Gypsying opened 5 months ago

Gypsying commented 5 months ago

https://github.com/snail007/goproxy/blob/853d324ee629eaae8bcf83f0003eb55afe4f9de1/services/http.go#L144

在IoBind过程中,不管是上下游的哪一方连接出现err,proxy都会把两个连接都close掉,这个行为是不是不太合理? 不考虑具体的err直接粗暴的关闭连接会不会造成数据丢失的问题?