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-03 17:24:04 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-02-04 01:15:55 +0300
commit618a5662837b0c70a88782ccb47e1cb634241bb3 (patch)
tree8fb6841d3e47bc64b24b776b4ea61a8f95aff903 /web/html/xui/xray.html
parent6804facabc27a5dc72a8db22bbaaf2c245161323 (diff)
new - select option for loglevel & access log
Diffstat (limited to 'web/html/xui/xray.html')
-rw-r--r--web/html/xui/xray.html58
1 files changed, 58 insertions, 0 deletions
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index d00b73cc..267103cb 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -147,6 +147,40 @@
</template>
</a-col>
</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-col>
+ <a-col :lg="24" :xl="12">
+ <template>
+ <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>
+ </a-col>
+ </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-col>
+ <a-col :lg="24" :xl="12">
+ <template>
+ <a-select
+ v-model="setAccessLog"
+ :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-collapse-panel>
<a-collapse-panel header='{{ i18n "pages.xray.blockConfigs"}}'>
@@ -534,6 +568,8 @@
protocol: "freedom"
},
routingDomainStrategies: ["AsIs", "IPIfNonMatch", "IPOnDemand"],
+ logLevel: ["none" , "debug" , "info" , "warning", "error"],
+ access: ["none" , "./access.log" ],
settingsData: {
protocols: {
bittorrent: ["bittorrent"],
@@ -1109,6 +1145,28 @@
this.templateSettings = newTemplateSettings;
}
},
+ setLogLevel: {
+ get: function () {
+ if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.loglevel) return "warning";
+ return this.templateSettings.log.loglevel;
+ },
+ set: function (newValue) {
+ newTemplateSettings = this.templateSettings;
+ newTemplateSettings.log.loglevel = newValue;
+ this.templateSettings = newTemplateSettings;
+ }
+ },
+ setAccessLog: {
+ get: function () {
+ if (!this.templateSettings || !this.templateSettings.log || !this.templateSettings.log.access) return "none";
+ return this.templateSettings.log.access;
+ },
+ set: function (newValue) {
+ newTemplateSettings = this.templateSettings;
+ newTemplateSettings.log.access = newValue;
+ this.templateSettings = newTemplateSettings;
+ }
+ },
blockedIPs: {
get: function () {
return this.templateRuleGetter({ outboundTag: "blocked", property: "ip" });