Commit 60a30a1f authored by ginuerzh's avatar ginuerzh

add auth info for http log (#286)

parent 31257903
...@@ -239,9 +239,14 @@ func (h *httpHandler) handleRequest(conn net.Conn, req *http.Request) { ...@@ -239,9 +239,14 @@ func (h *httpHandler) handleRequest(conn net.Conn, req *http.Request) {
} }
} }
log.Logf("[http] %s <-> %s", cc.LocalAddr(), host) var su string
if u != "" {
su = u + "@"
}
log.Logf("[http] %s%s <-> %s", su, cc.LocalAddr(), host)
transport(conn, cc) transport(conn, cc)
log.Logf("[http] %s >-< %s", cc.LocalAddr(), host) log.Logf("[http] %s%s >-< %s", su, cc.LocalAddr(), host)
} }
func (h *httpHandler) forwardRequest(conn net.Conn, req *http.Request, route *Chain) error { func (h *httpHandler) forwardRequest(conn net.Conn, req *http.Request, route *Chain) error {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment