mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
general: several optimizations
This commit is contained in:
1 parent
f65a983da8
commit
167e6e5d29
14 files changed
+85
-104
No files matched your search
@@ -141,11 +141,7 @@ func (s *Socks5) Serve(c net.Conn) {
|
||||
|
||||
log.F("[socks5] %s <-> %s via %s", c.RemoteAddr(), tgt, dialer.Addr())
|
||||
|
||||
_, _, err = conn.Relay(c, rc)
|
||||
if err != nil {
|
||||
if err, ok := err.(net.Error); ok && err.Timeout() {
|
||||
return // ignore i/o timeout
|
||||
}
|
||||
if err = conn.Relay(c, rc); err != nil {
|
||||
log.F("[socks5] relay error: %v", err)
|
||||
s.proxy.Record(dialer, false)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user