From f0a32f207dad35590bcc170ad3f7555a60ba6bad Mon Sep 17 00:00:00 2001 From: fgsfds <4870330+fgsfds@users.noreply.github.com> Date: Mon, 25 Aug 2025 16:23:55 +0500 Subject: [PATCH] fixed possible email cutoff in xray logs --- web/html/index.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/html/index.html b/web/html/index.html index e8d1a28e..3fddda78 100644 --- a/web/html/index.html +++ b/web/html/index.html @@ -676,6 +676,8 @@ const parts = log.split(' '); + let logEntryCutoffIndex = 1; + if(parts.length >= 10) { const dateTime = `${parts[0]} ${parts[1]}`; const from = `${parts[3]}`; @@ -684,9 +686,14 @@ let outboundColor = ''; if (parts[parts.length - 1] === "b") { outboundColor = ' style="color: #e04141;"'; //red for blocked + logEntryCutoffIndex = 2; } else if (parts[parts.length - 1] === "p") { outboundColor = ' style="color: #3c89e8;"'; //blue for proxies + logEntryCutoffIndex = 2; + } + else if (parts[parts.length - 1] === "f") { + logEntryCutoffIndex = 2; } formattedLogs += ` @@ -695,10 +702,10 @@ ${dateTime} ${from} ${parts[4]} ${to} - ${parts.slice(6, parts.length - 2).join(' ')} + ${parts.slice(6, parts.length - logEntryCutoffIndex).join(' ')} `; } else { - formattedLogs += `${parts.slice(0, parts.length - 2).join(' ')}`; + formattedLogs += `${parts.slice(0, parts.length - logEntryCutoffIndex).join(' ')}`; } });