Kaynağa Gözat

stop recording mux access log

Darien Raymond 7 yıl önce
ebeveyn
işleme
076f385e4b
1 değiştirilmiş dosya ile 8 ekleme ve 6 silme
  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()