mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
proxy: optimize timeout handling in udp copy
This commit is contained in:
1 parent
4b313a3fe1
commit
2ad3498abd
15 files changed
+46
-41
No files matched your search
@@ -165,8 +165,8 @@ func (s *VLess) ServeUoT(c net.Conn, tgt string) {
|
||||
pc := NewPktConn(c)
|
||||
log.F("[vless] %s <-tcp-> %s - %s <-udp-> %s", c.RemoteAddr(), c.LocalAddr(), rc.LocalAddr(), tgt)
|
||||
|
||||
go proxy.RelayUDP(rc, tgtAddr, pc, 2*time.Minute)
|
||||
proxy.RelayUDP(pc, nil, rc, 2*time.Minute)
|
||||
go proxy.CopyUDP(rc, tgtAddr, pc, 2*time.Minute, 5*time.Second)
|
||||
proxy.CopyUDP(pc, nil, rc, 2*time.Minute, 5*time.Second)
|
||||
}
|
||||
|
||||
// ServerConn is a vless client connection.
|
||||
|
||||
Reference in new issue
Block a user