Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xray
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-03-13 13:48:00 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-03-13 13:48:00 +0300
commitb68f0a206c72750aa46be79d2ad02f88b4317f29 (patch)
tree45260d1758afa839d1bffb187778c0fe7798ad88 /xray
parent0bde51b91ea505e38569ae3cbe575695abd2db60 (diff)
xray log - minor change
Diffstat (limited to 'xray')
-rw-r--r--xray/log_writer.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/xray/log_writer.go b/xray/log_writer.go
index 8d078e13..2c22166d 100644
--- a/xray/log_writer.go
+++ b/xray/log_writer.go
@@ -41,8 +41,16 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
if len(matches) > 3 {
level := matches[2]
msgBody := matches[3]
+ msgBodyLower := strings.ToLower(msgBody)
- if strings.Contains(strings.ToLower(msgBody), "failed") {
+ if strings.Contains(msgBodyLower, "tls handshake error") ||
+ strings.Contains(msgBodyLower, "connection ends") {
+ logger.Debug("XRAY: " + msgBody)
+ lw.lastLine = ""
+ continue
+ }
+
+ if strings.Contains(msgBodyLower, "failed") {
logger.Error("XRAY: " + msgBody)
} else {
switch level {
@@ -60,7 +68,16 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
}
lw.lastLine = ""
} else if msg != "" {
- if strings.Contains(strings.ToLower(msg), "failed") {
+ msgLower := strings.ToLower(msg)
+
+ if strings.Contains(msgLower, "tls handshake error") ||
+ strings.Contains(msgLower, "connection ends") {
+ logger.Debug("XRAY: " + msg)
+ lw.lastLine = msg
+ continue
+ }
+
+ if strings.Contains(msgLower, "failed") {
logger.Error("XRAY: " + msg)
} else {
logger.Debug("XRAY: " + msg)