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
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2024-02-18 00:43:39 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-02-18 00:43:39 +0300
commitfe00cfb09bc7810943a5e777f969a68d3740031c (patch)
treebd577f346e5ac5e90572fa8b8d353968ac13283a
parent2b4d6160c40d55cd8e9a7ffad4cc1524c19c4591 (diff)
[xray] option error log
-rw-r--r--web/html/xui/xray.html80
-rw-r--r--web/service/config.json1
-rw-r--r--web/translation/translate.en_US.toml4
-rw-r--r--web/translation/translate.es_ES.toml4
-rw-r--r--web/translation/translate.fa_IR.toml4
-rw-r--r--web/translation/translate.id_ID.toml4
-rw-r--r--web/translation/translate.ru_RU.toml4
-rw-r--r--web/translation/translate.vi_VN.toml4
-rw-r--r--web/translation/translate.zh_Hans.toml4
9 files changed, 80 insertions, 29 deletions
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index 10beaa43..3e6cf851 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -114,15 +114,12 @@
<a-list-item>
<a-row style="padding: 20px">
<a-col :lg="24" :xl="12">
- <a-list-item-meta
- title='{{ i18n "pages.xray.FreedomStrategy" }}'
- description='{{ i18n "pages.xray.FreedomStrategyDesc" }}'/>
+ <a-list-item-meta title='{{ i18n "pages.xray.FreedomStrategy" }}'
+ description='{{ i18n "pages.xray.FreedomStrategyDesc" }}' />
</a-col>
<a-col :lg="24" :xl="12">
<template>
- <a-select
- v-model="freedomStrategy"
- :dropdown-class-name="themeSwitcher.currentTheme"
+ <a-select v-model="freedomStrategy" :dropdown-class-name="themeSwitcher.currentTheme"
style="width: 100%">
<a-select-option v-for="s in OutboundDomainStrategies" :value="s">[[ s ]]</a-select-option>
</a-select>
@@ -132,33 +129,37 @@
</a-list-item>
<a-row style="padding: 20px">
<a-col :lg="24" :xl="12">
- <a-list-item-meta
- title='{{ i18n "pages.xray.RoutingStrategy" }}'
- description='{{ i18n "pages.xray.RoutingStrategyDesc" }}'/>
+ <a-list-item-meta title='{{ i18n "pages.xray.RoutingStrategy" }}'
+ description='{{ i18n "pages.xray.RoutingStrategyDesc" }}' />
</a-col>
<a-col :lg="24" :xl="12">
<template>
- <a-select
- v-model="routingStrategy"
- :dropdown-class-name="themeSwitcher.currentTheme"
+ <a-select v-model="routingStrategy" :dropdown-class-name="themeSwitcher.currentTheme"
style="width: 100%">
<a-select-option v-for="s in routingDomainStrategies" :value="s">[[ s ]]</a-select-option>
</a-select>
</template>
</a-col>
</a-row>
+ </a-list-item>
+ </a-collapse-panel>
+ <a-collapse-panel header='{{ i18n "pages.xray.logConfigs" }}'>
+ <a-row :xs="24" :sm="24" :lg="12">
+ <a-alert type="warning" style="text-align: center;">
+ <template slot="message">
+ <a-icon type="exclamation-circle" theme="filled" style="color: #FFA031"></a-icon>
+ {{ i18n "pages.xray.logConfigsDesc" }}
+ </template>
+ </a-alert>
+ </a-row>
<a-row style="padding: 20px">
<a-col :lg="24" :xl="12">
- <a-list-item-meta
- title='{{ i18n "pages.xray.logLevel" }}'
- description='{{ i18n "pages.xray.logLevelDesc" }}'/>
+ <a-list-item-meta title='{{ i18n "pages.xray.logLevel" }}'
+ description='{{ i18n "pages.xray.logLevelDesc" }}' />
</a-col>
<a-col :lg="24" :xl="12">
<template>
- <a-select
- v-model="setLogLevel"
- :dropdown-class-name="themeSwitcher.currentTheme"
- style="width: 100%">
+ <a-select v-model="setLogLevel" :dropdown-class-name="themeSwitcher.currentTheme" style="width: 100%">
<a-select-option v-for="s in logLevel" :value="s">[[ s ]]</a-select-option>
</a-select>
</template>
@@ -166,22 +167,31 @@
</a-row>
<a-row style="padding: 20px">
<a-col :lg="24" :xl="12">
- <a-list-item-meta
- title='{{ i18n "pages.xray.accessLog" }}'
- description='{{ i18n "pages.xray.accessLogDesc" }}'/>
+ <a-list-item-meta title='{{ i18n "pages.xray.accessLog" }}'
+ description='{{ i18n "pages.xray.accessLogDesc" }}' />
</a-col>
<a-col :lg="24" :xl="12">
<template>
- <a-select
- v-model="setAccessLog"
- :dropdown-class-name="themeSwitcher.currentTheme"
- style="width: 100%">
+ <a-select v-model="accessLog" :dropdown-class-name="themeSwitcher.currentTheme" style="width: 100%">
<a-select-option v-for="s in access" :value="s">[[ s ]]</a-select-option>
</a-select>
</template>
</a-col>
</a-row>
- </a-list-item>
+ <a-row style="padding: 20px">
+ <a-col :lg="24" :xl="12">
+ <a-list-item-meta title='{{ i18n "pages.xray.errorLog" }}'
+ description='{{ i18n "pages.xray.errorLogDesc" }}' />
+ </a-col>
+ <a-col :lg="24" :xl="12">
+ <template>
+ <a-select v-model="errorLog" :dropdown-class-name="themeSwitcher.currentTheme" style="width: 100%">
+ <a-select-option v-for="s in error" :value="s">[[ s ]]</a-select-option>
+ </a-select>
+ </template>
+ </a-col>
+ </a-row>
+ </a-list-item>
</a-collapse-panel>
<a-collapse-panel header='{{ i18n "pages.xray.blockConfigs"}}'>
<a-row :xs="24" :sm="24" :lg="12">
@@ -633,6 +643,7 @@
routingDomainStrategies: ["AsIs", "IPIfNonMatch", "IPOnDemand"],
logLevel: ["none" , "debug" , "info" , "warning", "error"],
access: ["none" , "./access.log" ],
+ error: ["none" , "./error.log" ],
settingsData: {
protocols: {
bittorrent: ["bittorrent"],
@@ -1344,9 +1355,9 @@
this.templateSettings = newTemplateSettings;
}
},
- setAccessLog: {
+ accessLog: {
get: function () {
- if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.access) return "none";
+ if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.access) return "";
return this.templateSettings.log.access;
},
set: function (newValue) {
@@ -1355,6 +1366,17 @@
this.templateSettings = newTemplateSettings;
}
},
+ errorLog: {
+ get: function () {
+ if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.error) return "";
+ return this.templateSettings.log.error;
+ },
+ set: function (newValue) {
+ newTemplateSettings = this.templateSettings;
+ newTemplateSettings.log.error = newValue;
+ this.templateSettings = newTemplateSettings;
+ }
+ },
blockedIPs: {
get: function () {
return this.templateRuleGetter({ outboundTag: "blocked", property: "ip" });
diff --git a/web/service/config.json b/web/service/config.json
index 6cf6c3a6..bd90e5c8 100644
--- a/web/service/config.json
+++ b/web/service/config.json
@@ -2,6 +2,7 @@
"log": {
"access": "none",
"dnsLog": false,
+ "error": "./error.log",
"loglevel": "warning"
},
"api": {
diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml
index 157baf8c..5e1afa9b 100644
--- a/web/translation/translate.en_US.toml
+++ b/web/translation/translate.en_US.toml
@@ -311,6 +311,8 @@
"advancedTemplate" = "Advanced"
"generalConfigs" = "General"
"generalConfigsDesc" = "These options will determine general adjustments."
+"logConfigs" = "Log"
+"logConfigsDesc" = "Logs may affect your server's efficiency. It is recommended to enable it wisely only in case of your needs"
"blockConfigs" = "Protection Shield"
"blockConfigsDesc" = "These options will block traffic based on specific requested protocols and websites."
"blockCountryConfigs" = "Block Country"
@@ -397,6 +399,8 @@
"logLevelDesc" = "The log level for error logs, indicating the information that needs to be recorded."
"accessLog" = "Access Log"
"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"
[pages.xray.rules]
"first" = "First"
diff --git a/web/translation/translate.es_ES.toml b/web/translation/translate.es_ES.toml
index b0d54d87..80d162eb 100644
--- a/web/translation/translate.es_ES.toml
+++ b/web/translation/translate.es_ES.toml
@@ -311,6 +311,8 @@
"advancedTemplate" = "Plantilla Avanzada"
"generalConfigs" = "Configuraciones Generales"
"generalConfigsDesc" = "Estas opciones proporcionarán ajustes generales."
+"logConfigs" = "Registro"
+"logConfigsDesc" = "Los registros pueden afectar la eficiencia de su servidor. Se recomienda habilitarlo sabiamente solo en caso de sus necesidades."
"blockConfigs" = "Configuraciones de Bloqueo"
"blockConfigsDesc" = "Estas opciones evitarán que los usuarios se conecten a protocolos y sitios web específicos."
"blockCountryConfigs" = "Configuraciones de Bloqueo por País"
@@ -397,6 +399,8 @@
"logLevelDesc" = "El nivel de registro para registros de errores, que indica la información que debe registrarse."
"accessLog" = "Registro de acceso"
"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 'ninguno' deshabilitó los registros de errores"
[pages.xray.rules]
"first" = "Primero"
diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml
index 5be08677..546712fd 100644
--- a/web/translation/translate.fa_IR.toml
+++ b/web/translation/translate.fa_IR.toml
@@ -311,6 +311,8 @@
"advancedTemplate" = "پیشرفته"
"generalConfigs" = "استراتژی‌ کلی"
"generalConfigsDesc" = "این گزینه‌ها استراتژی کلی ترافیک را تعیین می‌کنند"
+"logConfigs" = "گزارش"
+"logConfigsDesc" = "گزارش‌ها ممکن است بر کارایی سرور شما تأثیر بگذارد. توصیه می شود فقط در صورت نیاز آن را عاقلانه فعال کنید"
"blockConfigs" = "سپر محافظ"
"blockConfigsDesc" = "این گزینه‌ها ترافیک را بر اساس پروتکل‌های درخواستی خاص، و وب سایت‌ها مسدود می‌کند"
"blockCountryConfigs" = "مسدودسازی کشور"
@@ -397,6 +399,8 @@
"logLevelDesc" = "سطح گزارش برای گزارش های خطا، نشان دهنده اطلاعاتی است که باید ثبت شوند."
"accessLog" = "مسیر گزارش"
"accessLogDesc" = "مسیر فایل برای گزارش دسترسی. مقدار ویژه «هیچ» گزارش‌های دسترسی را غیرفعال میکند."
+"errorLog" = "گزارش خطا"
+"errorLogDesc" = "مسیر فایل برای ورود به سیستم خطا. مقدار ویژه «هیچ» گزارش های خطا را غیرفعال میکند"
[pages.xray.rules]
"first" = "اولین"
diff --git a/web/translation/translate.id_ID.toml b/web/translation/translate.id_ID.toml
index ad108b05..cfa0210d 100644
--- a/web/translation/translate.id_ID.toml
+++ b/web/translation/translate.id_ID.toml
@@ -311,6 +311,8 @@
"advancedTemplate" = "Lanjutan"
"generalConfigs" = "Strategi Umum"
"generalConfigsDesc" = "Opsi ini akan menentukan penyesuaian strategi umum."
+"logConfigs" = "Catatan"
+"logConfigsDesc" = "Log dapat mempengaruhi efisiensi server Anda. Disarankan untuk mengaktifkannya dengan bijak hanya jika diperlukan"
"blockConfigs" = "Pelindung"
"blockConfigsDesc" = "Opsi ini akan memblokir lalu lintas berdasarkan protokol dan situs web yang diminta."
"blockCountryConfigs" = "Blokir Negara"
@@ -397,6 +399,8 @@
"logLevelDesc" = "Tingkat log untuk log kesalahan, menunjukkan informasi yang perlu dicatat."
"accessLog" = "Log Akses"
"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"
[pages.xray.rules]
"first" = "Pertama"
diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml
index 8badec04..dfb75d4a 100644
--- a/web/translation/translate.ru_RU.toml
+++ b/web/translation/translate.ru_RU.toml
@@ -311,6 +311,8 @@
"advancedTemplate" = "Расширенный шаблон"
"generalConfigs" = "Основные настройки"
"generalConfigsDesc" = "Эти параметры описывают общие настройки"
+"logConfigs" = "Журнал"
+"logConfigsDesc" = "Журналы могут повлиять на эффективность вашего сервера. Рекомендуется включать их с умом только в случае ваших нужд!"
"blockConfigs" = "Блокировка конфигураций"
"blockConfigsDesc" = "Эти параметры не позволят пользователям подключаться к определенным протоколам и веб-сайтам"
"blockCountryConfigs" = "Конфигурации блокировки страны"
@@ -397,6 +399,8 @@
"logLevelDesc" = "Уровень журнала для журналов ошибок, указывающий информацию, которую необходимо записать."
"accessLog" = "Журнал доступа"
"accessLogDesc" = "Путь к файлу журнала доступа. Специальное значение «none» отключило журналы доступа."
+"errorLog" = "Журнал ошибок"
+"errorLogDesc" = "Путь к файлу журнала ошибок. Специальное значение «none» отключает журналы ошибок."
[pages.xray.rules]
"first" = "Первый"
diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml
index ad987cf3..b6e7fd46 100644
--- a/web/translation/translate.vi_VN.toml
+++ b/web/translation/translate.vi_VN.toml
@@ -311,6 +311,8 @@
"advancedTemplate" = "Mẫu Nâng cao"
"generalConfigs" = "Cấu hình Chung"
"generalConfigsDesc" = "Những tùy chọn này sẽ cung cấp điều chỉnh tổng quát."
+"logConfigs" = "Nhật ký"
+"logConfigsDesc" = "Nhật ký có thể ảnh hưởng đến hiệu suất máy chủ của bạn. Bạn chỉ nên kích hoạt nó một cách khôn ngoan trong trường hợp bạn cần"
"blockConfigs" = "Cấu hình Chặn"
"blockConfigsDesc" = "Những tùy chọn này sẽ ngăn người dùng kết nối đến các giao thức và trang web cụ thể."
"blockCountryConfigs" = "Cấu hình Chặn Quốc gia"
@@ -397,6 +399,8 @@
"logLevelDesc" = "Cấp độ nhật ký cho nhật ký lỗi, cho biết thông tin cần được ghi lại."
"accessLog" = "Nhật ký truy cập"
"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'"
[pages.xray.rules]
"first" = "Đầu tiên"
diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml
index 7a10e65d..ba37ae92 100644
--- a/web/translation/translate.zh_Hans.toml
+++ b/web/translation/translate.zh_Hans.toml
@@ -311,6 +311,8 @@
"advancedTemplate" = "高级模板部件"
"generalConfigs" = "通用配置"
"generalConfigsDesc" = "这些选项将提供一般调整"
+"logConfigs"="日志"
+"logConfigsDesc" = "日志可能会影响您服务器的效率。建议仅在您需要时明智地启用它"
"blockConfigs" = "阻塞配置"
"blockConfigsDesc" = "这些选项将阻止用户连接到特定协议和网站"
"blockCountryConfigs" = "阻止国家配置"
@@ -397,6 +399,8 @@
"logLevelDesc" = "错误日志的日志级别,表示需要记录的信息。"
"accessLog" = "访问日志"
"accessLogDesc" = "访问日志的文件路径。 特殊值“none”禁用访问日志"
+"errorLog" = "错误日志"
+"errorLogDesc" = "错误日志的文件路径。 特殊值“none”禁用错误日志"
[pages.xray.rules]
"first" = "第一个"