diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 2a4989a7..a4965cf5 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -163,8 +163,8 @@ @@ -178,7 +178,8 @@ @@ -192,11 +193,28 @@ + + + + + + + + + + @@ -791,9 +809,13 @@ protocol: "freedom" }, routingDomainStrategies: ["AsIs", "IPIfNonMatch", "IPOnDemand"], - logLevel: ["none" , "debug" , "info" , "warning", "error"], - access: [], - error: [], + log: { + loglevel: ["none", "debug", "info", "warning", "error"], + access: ["none", "./access.log"], + error: ["none", "./error.log"], + dnsLog: false, + maskAddress: ["quarter", "half", "full"], + }, settingsData: { protocols: { bittorrent: ["bittorrent"], @@ -1519,27 +1541,11 @@ templateSettings: { get: function () { const parsedSettings = this.xraySetting ? JSON.parse(this.xraySetting) : null; - let accessLogPath = "./access.log"; - let errorLogPath = "./error.log"; - - if (parsedSettings && parsedSettings.log) { - if (parsedSettings.log.access && parsedSettings.log.access !== "none") { - accessLogPath = parsedSettings.log.access; - } - if (parsedSettings.log.error && parsedSettings.log.error !== "none") { - errorLogPath = parsedSettings.log.error; - } - } - - this.access = ["none", accessLogPath]; - this.error = ["none", errorLogPath]; return parsedSettings; }, set: function (newValue) { - if (newValue && newValue.log) { + if (newValue) { this.xraySetting = JSON.stringify(newValue, null, 2); - this.access = ["none", newValue.log.access || "./access.log"]; - this.error = ["none", newValue.log.error || "./error.log"]; } }, }, @@ -1688,7 +1694,7 @@ this.templateSettings = newTemplateSettings; } }, - setLogLevel: { + logLevel: { get: function () { if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.loglevel) return "warning"; return this.templateSettings.log.loglevel; @@ -1721,6 +1727,28 @@ this.templateSettings = newTemplateSettings; } }, + dnslog: { + get: function () { + if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.dnsLog) return false; + return this.templateSettings.log.dnsLog; + }, + set: function (newValue) { + newTemplateSettings = this.templateSettings; + newTemplateSettings.log.dnsLog = newValue; + this.templateSettings = newTemplateSettings; + } + }, + maskAddressLog: { + get: function () { + if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.maskAddress) return ""; + return this.templateSettings.log.maskAddress; + }, + set: function (newValue) { + newTemplateSettings = this.templateSettings; + newTemplateSettings.log.maskAddress = newValue; + this.templateSettings = newTemplateSettings; + } + }, blockedIPs: { get: function () { return this.templateRuleGetter({ outboundTag: "blocked", property: "ip" }); diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index dc301275..b1207dc0 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "The file path for the access log. The special value 'none' disabled access logs" "errorLog" = "Error Log" "errorLogDesc" = "The file path for the error log. The special value 'none' disabled error logs" +"dnsLog" = "DNS Log" +"dnsLogDesc" = "Whether to enable DNS query logs" +"maskAddress" = "Mask Address" +"maskAddressDesc" = "IP address mask, when enabled, will automatically replace the IP address that appears in the log." [pages.xray.rules] "first" = "First" diff --git a/web/translation/translate.es_ES.toml b/web/translation/translate.es_ES.toml index f727548e..1791cf20 100644 --- a/web/translation/translate.es_ES.toml +++ b/web/translation/translate.es_ES.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "La ruta del archivo para el registro de acceso. El valor especial 'ninguno' deshabilita los registros de acceso" "errorLog" = "Registro de Errores" "errorLogDesc" = "La ruta del archivo para el registro de errores. El valor especial 'none' desactiva los registros de errores." +"dnsLog" = "Registro DNS" +"dnsLogDesc" = "Si habilitar los registros de consulta DNS" +"maskAddress" = "Enmascarar Dirección" +"maskAddressDesc" = "Máscara de dirección IP, cuando se habilita, reemplazará automáticamente la dirección IP que aparece en el registro." [pages.xray.rules] "first" = "Primero" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index 5ccfbfe5..c208bfd4 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "مسیر فایل برای گزارش دسترسی. مقدار ویژه «هیچ» گزارش‌های دسترسی را غیرفعال میکند." "errorLog" = "گزارش خطا" "errorLogDesc" = "مسیر فایل برای ورود به سیستم خطا. مقدار ویژه «هیچ» گزارش های خطا را غیرفعال میکند" +"dnsLog" = "گزارش DNS" +"dnsLogDesc" = "آیا ثبت‌های درخواست DNS را فعال کنید" +"maskAddress" = "پنهان کردن آدرس" +"maskAddressDesc" = "پوشش آدرس IP، هنگامی که فعال می‌شود، به طور خودکار آدرس IP که در لاگ ظاهر می‌شود را جایگزین می‌کند." [pages.xray.rules] "first" = "اولین" diff --git a/web/translation/translate.id_ID.toml b/web/translation/translate.id_ID.toml index cd03c4e6..d913b4a3 100644 --- a/web/translation/translate.id_ID.toml +++ b/web/translation/translate.id_ID.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "Jalur file untuk log akses. Nilai khusus 'tidak ada' menonaktifkan log akses" "errorLog" = "Catatan eror" "errorLogDesc" = "Jalur file untuk log kesalahan. Nilai khusus 'tidak ada' menonaktifkan log kesalahan" +"dnsLog" = "Log DNS" +"dnsLogDesc" = "Apakah akan mengaktifkan log kueri DNS" +"maskAddress" = "Alamat Masker" +"maskAddressDesc" = "Masker alamat IP, ketika diaktifkan, akan secara otomatis mengganti alamat IP yang muncul di log." [pages.xray.rules] "first" = "Pertama" diff --git a/web/translation/translate.pt_BR.toml b/web/translation/translate.pt_BR.toml index 1c44a4f2..c25c6df0 100644 --- a/web/translation/translate.pt_BR.toml +++ b/web/translation/translate.pt_BR.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "O caminho do arquivo para o log de acesso. O valor especial 'none' desativa os logs de acesso." "errorLog" = "Log de Erros" "errorLogDesc" = "O caminho do arquivo para o log de erros. O valor especial 'none' desativa os logs de erro." +"dnsLog" = "Log DNS" +"dnsLogDesc" = "Se ativar logs de consulta DNS" +"maskAddress" = "Mascarar Endereço" +"maskAddressDesc" = "Máscara de endereço IP, quando ativado, substitui automaticamente o endereço IP que aparece no log." [pages.xray.rules] "first" = "Primeiro" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index 8ef6ae9c..88db2ab2 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "Путь к файлу журнала доступа. Специальное значение «none» отключило журналы доступа." "errorLog" = "Журнал ошибок" "errorLogDesc" = "Путь к файлу журнала ошибок. Специальное значение «none» отключает журналы ошибок." +"dnsLog" = "DNS Журнал" +"dnsLogDesc" = "Включить логи запросов DNS" +"maskAddress" = "Маскировать Адрес" +"maskAddressDesc" = "Маска IP-адреса, при активации автоматически заменяет IP-адрес, который появляется в логе." [pages.xray.rules] "first" = "Первый" diff --git a/web/translation/translate.tr_TR.toml b/web/translation/translate.tr_TR.toml index e0428a6e..af22826c 100644 --- a/web/translation/translate.tr_TR.toml +++ b/web/translation/translate.tr_TR.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "Erişim günlüğü için dosya yolu. 'none' özel değeri erişim günlüklerini devre dışı bırakır" "errorLog" = "Hata Günlüğü" "errorLogDesc" = "Hata günlüğü için dosya yolu. 'none' özel değeri hata günlüklerini devre dışı bırakır" +"dnsLog" = "DNS Günlüğü" +"dnsLogDesc" = "DNS sorgu günlüklerini etkinleştirin" +"maskAddress" = "Adres Maskesi" +"maskAddressDesc" = "IP adresi maskesi, etkinleştirildiğinde, günlükte görünen IP adresini otomatik olarak değiştirecektir." [pages.xray.rules] "first" = "İlk" diff --git a/web/translation/translate.uk_UA.toml b/web/translation/translate.uk_UA.toml index 2149abc5..de115d7a 100644 --- a/web/translation/translate.uk_UA.toml +++ b/web/translation/translate.uk_UA.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "Шлях до файлу журналу доступу. Спеціальне значення 'none' вимикає журнали доступу" "errorLog" = "Журнал помилок" "errorLogDesc" = "Шлях до файлу журналу помилок. Спеціальне значення 'none' вимикає журнали помилок" +"dnsLog" = "Журнал DNS" +"dnsLogDesc" = "Чи включити журнали запитів DNS" +"maskAddress" = "Маскувати Адресу" +"maskAddressDesc" = "Маска IP-адреси, при активації автоматично замінює IP-адресу, яка з'являється у журналі." [pages.xray.rules] "first" = "Перший" diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml index 7ee473a5..2447607c 100644 --- a/web/translation/translate.vi_VN.toml +++ b/web/translation/translate.vi_VN.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "Đường dẫn tệp cho nhật ký truy cập. Nhật ký truy cập bị vô hiệu hóa có giá trị đặc biệt 'không'" "errorLog" = "Nhật ký lỗi" "errorLogDesc" = "Đường dẫn tệp cho nhật ký lỗi. Nhật ký lỗi bị vô hiệu hóa có giá trị đặc biệt 'không'" +"dnsLog" = "Nhật ký DNS" +"dnsLogDesc" = "Có bật nhật ký truy vấn DNS không" +"maskAddress" = "Ẩn Địa Chỉ" +"maskAddressDesc" = "Mặt nạ địa chỉ IP, khi được bật, sẽ tự động thay thế địa chỉ IP xuất hiện trong nhật ký." [pages.xray.rules] "first" = "Đầu tiên" diff --git a/web/translation/translate.zh_CN.toml b/web/translation/translate.zh_CN.toml index ea9e2afd..2d2cf715 100644 --- a/web/translation/translate.zh_CN.toml +++ b/web/translation/translate.zh_CN.toml @@ -422,6 +422,10 @@ "accessLogDesc" = "访问日志的文件路径。特殊值 'none' 禁用访问日志" "errorLog" = "错误日志" "errorLogDesc" = "错误日志的文件路径。特殊值 'none' 禁用错误日志" +"dnsLog" = "DNS 日志" +"dnsLogDesc" = "是否启用 DNS 查询日志" +"maskAddress" = "隐藏地址" +"maskAddressDesc" = "IP 地址掩码,启用时会自动替换日志中出现的 IP 地址。" [pages.xray.rules] "first" = "置顶"