From 47efac270d8df16ce70ff8c62c102289d9d23bfd Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Wed, 21 Feb 2024 02:37:44 +0100 Subject: [PATCH] v1.7.2 --- config/version | 2 +- web/html/xui/settings.html | 10 ++++++---- xray/config.go | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config/version b/config/version index 081af9a10f..0a182f2e3a 100644 --- a/config/version +++ b/config/version @@ -1 +1 @@ -1.7.1 \ No newline at end of file +1.7.2 \ No newline at end of file diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index f87b87acfa..328e127496 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -383,10 +383,12 @@ if (this.allSetting.port == 54321) alerts.push('{{ i18n "pages.settings.panelPort"}}'); panelPath = window.location.pathname.split('/').length<4 if (panelPath && this.allSetting.webBasePath == '/') alerts.push('{{ i18n "pages.settings.panelConfig"}} {{ i18n "pages.settings.panelUrlPath"}}'); - subPath = this.allSetting.subURI.length >0 ? new URL(this.allSetting.subURI).pathname : this.allSetting.subPath; - if (subPath == '/sub/') alerts.push('{{ i18n "pages.settings.subSettings"}} {{ i18n "pages.settings.subPath"}}'); - subJsonPath = this.allSetting.subJsonURI.length >0 ? new URL(this.allSetting.subJsonURI).pathname : this.allSetting.subJsonPath; - if (subJsonPath == '/json/') alerts.push('JSON {{ i18n "pages.settings.subPath"}}'); + if (this.allSetting.subEnable) { + subPath = this.allSetting.subURI.length >0 ? new URL(this.allSetting.subURI).pathname : this.allSetting.subPath; + if (subPath == '/sub/') alerts.push('{{ i18n "pages.settings.subSettings"}} {{ i18n "pages.settings.subPath"}}'); + subJsonPath = this.allSetting.subJsonURI.length >0 ? new URL(this.allSetting.subJsonURI).pathname : this.allSetting.subJsonPath; + if (subJsonPath == '/json/') alerts.push('JSON {{ i18n "pages.settings.subPath"}}'); + } return alerts } } diff --git a/xray/config.go b/xray/config.go index cc63ca4058..914f2134bc 100644 --- a/xray/config.go +++ b/xray/config.go @@ -16,7 +16,8 @@ type Config struct { API json_util.RawMessage `json:"api"` Stats json_util.RawMessage `json:"stats"` Reverse json_util.RawMessage `json:"reverse"` - FakeDNS json_util.RawMessage `json:"fakeDns"` + FakeDNS json_util.RawMessage `json:"fakedns"` + Observatory json_util.RawMessage `json:"observatory"` } func (c *Config) Equals(other *Config) bool {