From 618a5662837b0c70a88782ccb47e1cb634241bb3 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sat, 3 Feb 2024 17:54:04 +0330 Subject: new - select option for loglevel & access log --- web/html/xui/xray.html | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'web/html') 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 @@ + + + + + + + + + + + + + + + + @@ -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" }); -- cgit v1.2.3