浏览代码

stop recording mux access log

Darien Raymond 7 年之前
父节点
当前提交
076f385e4b
共有 1 个文件被更改,包括 8 次插入6 次删除
  1. 8 6
      proxy/vmess/inbound/inbound.go

+ 8 - 6
proxy/vmess/inbound/inbound.go

@@ -252,12 +252,14 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
 		return newError("client is using insecure encryption: ", request.Security)
 	}
 
-	log.Record(&log.AccessMessage{
-		From:   connection.RemoteAddr(),
-		To:     request.Destination(),
-		Status: log.AccessAccepted,
-		Reason: "",
-	})
+	if request.Command != protocol.RequestCommandMux {
+		log.Record(&log.AccessMessage{
+			From:   connection.RemoteAddr(),
+			To:     request.Destination(),
+			Status: log.AccessAccepted,
+			Reason: "",
+		})
+	}
 
 	newError("received request for ", request.Destination()).WithContext(ctx).WriteToLog()