ehang-io / nps

一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
https://ehang.io/nps/documents
GNU General Public License v3.0
29.71k stars 5.36k forks source link

报异常,然后挂掉: panic: runtime error: slice bounds out of range [69:66] #1267

Open ladixiu opened 6 months ago

ladixiu commented 6 months ago

Describe the bug 使用UDP隧道,用上一会就会nps服务会挂掉,centos7系系统

错误堆栈 goroutine 49533 [running]: ehang.io/nps-mux.(sendWindow).WriteTo(0xc00045e000, 0x1000a2f803, 0xa54560, 0xc0006d3d58, 0x42, 0x0, 0x0) /home/runner/go/pkg/mod/ehang.io/nps-mux@v0.0.0-20210407130203-4afa0c10c992/conn.go:554 +0x2f2 ehang.io/nps-mux.(sendWindow).WriteFull(0xc00045e000, 0xc000a2f800, 0x42, 0x688, 0xc000000010, 0x40a37f, 0xc000010000, 0xaa0b00) /home/runner/go/pkg/mod/ehang.io/nps-mux@v0.0.0-20210407130203-4afa0c10c992/conn.go:608 +0x8e ehang.io/nps-mux.(conn).Write(0xc00050ab40, 0xc000a2f800, 0x42, 0x688, 0xc000558e38, 0x40b905, 0xaa0b00) /home/runner/go/pkg/mod/ehang.io/nps-mux@v0.0.0-20210407130203-4afa0c10c992/conn.go:63 +0x8e ehang.io/nps/lib/rate.(rateConn).Write(0xc000323140, 0xc000a2f800, 0x42, 0x688, 0xc000323140, 0x1, 0x0) /home/runner/work/nps/nps/lib/rate/conn.go:28 +0x55 ehang.io/nps/server/proxy.(UdpModeServer).process(0xc0004aa7e0, 0xc0003c94a0, 0xc000a2f800, 0x42, 0x688) /home/runner/work/nps/nps/server/proxy/udp.go:59 +0x8e3 created by ehang.io/nps/server/proxy.(UdpModeServer).Start /home/runner/work/nps/nps/server/proxy/udp.go:50 +0x2cc panic: runtime error: slice bounds out of range [69:66]