access log add detour tag

This commit is contained in:
fcying
2019-06-14 14:43:42 +08:00
parent 8cf38342e9
commit 23e5d3cd12
6 changed files with 35 additions and 6 deletions
+2 -1
View File
@@ -131,10 +131,11 @@ Start:
if err != nil {
return newError("malformed proxy host: ", host).AtWarning().Base(err)
}
log.Record(&log.AccessMessage{
ctx = log.ContextWithAccessMessage(ctx, &log.AccessMessage{
From: conn.RemoteAddr(),
To: request.URL,
Status: log.AccessAccepted,
Reason: "",
})
if strings.ToUpper(request.Method) == "CONNECT" {