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
path: root/web/html
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2024-03-11 11:31:08 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-03-11 11:31:08 +0300
commite6254e23f29d1c98173378acf0051b789f595289 (patch)
treeac1e18813f2738f3168610391ceba7f07f32fe22 /web/html
parent5f3c2f781e3f782d43967859d01a16b23bef73df (diff)
[xray] add dns tag
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/xui/xray.html13
-rw-r--r--web/html/xui/xray_reverse_modal.html2
-rw-r--r--web/html/xui/xray_rule_modal.html1
3 files changed, 14 insertions, 2 deletions
diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html
index 20a36f63..5fb04152 100644
--- a/web/html/xui/xray.html
+++ b/web/html/xui/xray.html
@@ -546,6 +546,7 @@
<a-tab-pane key="tpl-6" tab='DNS' style="padding-top: 20px;" force-render="true">
<setting-list-item type="switch" title='{{ i18n "pages.xray.dns.enable" }}' desc='{{ i18n "pages.xray.dns.enableDesc" }}' v-model="enableDNS"></setting-list-item>
<template v-if="enableDNS">
+ <setting-list-item type="text" title='{{ i18n "pages.xray.dns.tag" }}' desc='{{ i18n "pages.xray.dns.tagDesc" }}' v-model="dnsTag"></setting-list-item>
<a-list-item>
<a-row style="padding: 20px">
<a-col :lg="24" :xl="12">
@@ -2027,7 +2028,17 @@
},
set: function (newValue) {
newTemplateSettings = this.templateSettings;
- newTemplateSettings.dns = newValue ? { servers: [], queryStrategy: "UseIP" } : null;
+ newTemplateSettings.dns = newValue ? { servers: [], queryStrategy: "UseIP", tag: "dns_inbound" } : null;
+ this.templateSettings = newTemplateSettings;
+ }
+ },
+ dnsTag: {
+ get: function () {
+ return this.enableDNS ? this.templateSettings.dns.tag : "";
+ },
+ set: function (newValue) {
+ newTemplateSettings = this.templateSettings;
+ newTemplateSettings.dns.tag = newValue;
this.templateSettings = newTemplateSettings;
}
},
diff --git a/web/html/xui/xray_reverse_modal.html b/web/html/xui/xray_reverse_modal.html
index 826286c9..bb1e4bdf 100644
--- a/web/html/xui/xray_reverse_modal.html
+++ b/web/html/xui/xray_reverse_modal.html
@@ -38,7 +38,6 @@
:options="reverseModal.inboundTags"></a-checkbox-group>
</a-form-item>
</template>
- </table>
</a-form>
</a-modal>
<script>
@@ -114,6 +113,7 @@
this.isEdit = isEdit;
this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);
this.inboundTags.push(...app.inboundTags);
+ if (app.enableDNS && !ObjectUtil.isEmpty(app.dnsTag)) this.inboundTags.push(app.dnsTag)
this.outboundTags = app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag);
},
close() {
diff --git a/web/html/xui/xray_rule_modal.html b/web/html/xui/xray_rule_modal.html
index bf4e47a4..d7195c3c 100644
--- a/web/html/xui/xray_rule_modal.html
+++ b/web/html/xui/xray_rule_modal.html
@@ -195,6 +195,7 @@
this.isEdit = isEdit;
this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);
this.inboundTags.push(...app.inboundTags);
+ if (app.enableDNS && !ObjectUtil.isEmpty(app.dnsTag)) this.inboundTags.push(app.dnsTag)
this.outboundTags = ["", ...app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag)];
if(app.templateSettings.reverse){
if(app.templateSettings.reverse.bridges) {