mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
proxy: added the ability to log forwarder
This commit is contained in:
1 parent
c2425e67de
commit
063dc1bc01
22 files changed
+138
-141
No files matched your search
@@ -104,14 +104,14 @@ func (s *RedirProxy) Serve(c net.Conn) {
|
||||
return
|
||||
}
|
||||
|
||||
rc, err := s.dialer.Dial("tcp", tgt.String())
|
||||
rc, p, err := s.dialer.Dial("tcp", tgt.String())
|
||||
if err != nil {
|
||||
log.F("[redir] %s <-> %s, error in dial: %v", c.RemoteAddr(), tgt, err)
|
||||
log.F("[redir] %s <-> %s, %s, error in dial: %v", c.RemoteAddr(), tgt, err, p)
|
||||
return
|
||||
}
|
||||
defer rc.Close()
|
||||
|
||||
log.F("[redir] %s <-> %s", c.RemoteAddr(), tgt)
|
||||
log.F("[redir] %s <-> %s, %s", c.RemoteAddr(), tgt, p)
|
||||
|
||||
_, _, err = conn.Relay(c, rc)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user