mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
[xray] add dns tag
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
5f3c2f781e
commit
e6254e23f2
10 changed files with 28 additions and 2 deletions
|
@ -546,6 +546,7 @@
|
||||||
<a-tab-pane key="tpl-6" tab='DNS' style="padding-top: 20px;" force-render="true">
|
<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>
|
<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">
|
<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-list-item>
|
||||||
<a-row style="padding: 20px">
|
<a-row style="padding: 20px">
|
||||||
<a-col :lg="24" :xl="12">
|
<a-col :lg="24" :xl="12">
|
||||||
|
@ -2027,7 +2028,17 @@
|
||||||
},
|
},
|
||||||
set: function (newValue) {
|
set: function (newValue) {
|
||||||
newTemplateSettings = this.templateSettings;
|
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;
|
this.templateSettings = newTemplateSettings;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
:options="reverseModal.inboundTags"></a-checkbox-group>
|
:options="reverseModal.inboundTags"></a-checkbox-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
</table>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<script>
|
<script>
|
||||||
|
@ -114,6 +113,7 @@
|
||||||
this.isEdit = isEdit;
|
this.isEdit = isEdit;
|
||||||
this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);
|
this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);
|
||||||
this.inboundTags.push(...app.inboundTags);
|
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);
|
this.outboundTags = app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag);
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|
|
@ -195,6 +195,7 @@
|
||||||
this.isEdit = isEdit;
|
this.isEdit = isEdit;
|
||||||
this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);
|
this.inboundTags = app.templateSettings.inbounds.filter((i) => !ObjectUtil.isEmpty(i.tag)).map(obj => obj.tag);
|
||||||
this.inboundTags.push(...app.inboundTags);
|
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)];
|
this.outboundTags = ["", ...app.templateSettings.outbounds.filter((o) => !ObjectUtil.isEmpty(o.tag)).map(obj => obj.tag)];
|
||||||
if(app.templateSettings.reverse){
|
if(app.templateSettings.reverse){
|
||||||
if(app.templateSettings.reverse.bridges) {
|
if(app.templateSettings.reverse.bridges) {
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[pages.xray.dns]
|
[pages.xray.dns]
|
||||||
"enable" = "Enable DNS"
|
"enable" = "Enable DNS"
|
||||||
"enableDesc" = "Enable built-in DNS server"
|
"enableDesc" = "Enable built-in DNS server"
|
||||||
|
"tag" = "DNS Inbound Tag"
|
||||||
|
"tagDesc" = "This tag will be available as an Inbound tag in routing rules."
|
||||||
"strategy" = "Query Strategy"
|
"strategy" = "Query Strategy"
|
||||||
"strategyDesc" = "Overall strategy to resolve domain names"
|
"strategyDesc" = "Overall strategy to resolve domain names"
|
||||||
"add" = "Add Server"
|
"add" = "Add Server"
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[pages.xray.dns]
|
[pages.xray.dns]
|
||||||
"enable" = "فعال کردن حل دامنه"
|
"enable" = "فعال کردن حل دامنه"
|
||||||
"enableDesc" = "سرور حل دامنه داخلی را فعال کنید"
|
"enableDesc" = "سرور حل دامنه داخلی را فعال کنید"
|
||||||
|
"tag" = "برچسب"
|
||||||
|
"tagDesc" = "این برچسب در قوانین مسیریابی به عنوان یک برچسب ورودی قابل استفاده خواهد بود"
|
||||||
"strategy" = "استراتژی پرسوجو"
|
"strategy" = "استراتژی پرسوجو"
|
||||||
"strategyDesc" = "استراتژی کلی برای حل نام دامنه"
|
"strategyDesc" = "استراتژی کلی برای حل نام دامنه"
|
||||||
"add" = "افزودن سرور"
|
"add" = "افزودن سرور"
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[pages.xray.dns]
|
[pages.xray.dns]
|
||||||
"enable" = "Aktifkan DNS"
|
"enable" = "Aktifkan DNS"
|
||||||
"enableDesc" = "Aktifkan server DNS bawaan"
|
"enableDesc" = "Aktifkan server DNS bawaan"
|
||||||
|
"tag" = "Tanda DNS Masuk"
|
||||||
|
"tagDesc" = "Tanda ini akan tersedia sebagai tanda masuk dalam aturan penataan."
|
||||||
"strategy" = "Strategi Kueri"
|
"strategy" = "Strategi Kueri"
|
||||||
"strategyDesc" = "Strategi keseluruhan untuk menyelesaikan nama domain"
|
"strategyDesc" = "Strategi keseluruhan untuk menyelesaikan nama domain"
|
||||||
"add" = "Tambahkan Server"
|
"add" = "Tambahkan Server"
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[pages.xray.dns]
|
[pages.xray.dns]
|
||||||
"enable" = "Включить DNS"
|
"enable" = "Включить DNS"
|
||||||
"enableDesc" = "Включить встроенный DNS-сервер"
|
"enableDesc" = "Включить встроенный DNS-сервер"
|
||||||
|
"tag" = "Входящий тег DNS"
|
||||||
|
"tagDesc" = "Этот тег будет доступен как входящий тег в правилах маршрутизации."
|
||||||
"strategy" = "Стратегия запроса"
|
"strategy" = "Стратегия запроса"
|
||||||
"strategyDesc" = "Общая стратегия разрешения доменных имен"
|
"strategyDesc" = "Общая стратегия разрешения доменных имен"
|
||||||
"add" = "Добавить сервер"
|
"add" = "Добавить сервер"
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[pages.xray.dns]
|
[pages.xray.dns]
|
||||||
"enable" = "Увімкнути DNS"
|
"enable" = "Увімкнути DNS"
|
||||||
"enableDesc" = "Увімкнути вбудований DNS-сервер"
|
"enableDesc" = "Увімкнути вбудований DNS-сервер"
|
||||||
|
"tag" = "Мітка вхідного DNS"
|
||||||
|
"tagDesc" = "Ця мітка буде доступна як вхідна мітка в правилах маршрутизації."
|
||||||
"strategy" = "Стратегія запиту"
|
"strategy" = "Стратегія запиту"
|
||||||
"strategyDesc" = "Загальна стратегія вирішення доменних імен"
|
"strategyDesc" = "Загальна стратегія вирішення доменних імен"
|
||||||
"add" = "Додати сервер"
|
"add" = "Додати сервер"
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[pages.xray.dns]
|
[pages.xray.dns]
|
||||||
"enable" = "Kích hoạt DNS"
|
"enable" = "Kích hoạt DNS"
|
||||||
"enableDesc" = "Kích hoạt máy chủ DNS tích hợp"
|
"enableDesc" = "Kích hoạt máy chủ DNS tích hợp"
|
||||||
|
"tag" = "Thẻ gửi đến DNS"
|
||||||
|
"tagDesc" = "Thẻ này sẽ có sẵn dưới dạng thẻ Gửi đến trong quy tắc định tuyến."
|
||||||
"strategy" = "Chiến lược truy vấn"
|
"strategy" = "Chiến lược truy vấn"
|
||||||
"strategyDesc" = "Chiến lược tổng thể để phân giải tên miền"
|
"strategyDesc" = "Chiến lược tổng thể để phân giải tên miền"
|
||||||
"add" = "Thêm máy chủ"
|
"add" = "Thêm máy chủ"
|
||||||
|
|
|
@ -467,6 +467,8 @@
|
||||||
[pages.xray.dns]
|
[pages.xray.dns]
|
||||||
"enable" = "启用 DNS"
|
"enable" = "启用 DNS"
|
||||||
"enableDesc" = "启用内置 DNS 服务器"
|
"enableDesc" = "启用内置 DNS 服务器"
|
||||||
|
"tag" = "DNS 入站标签"
|
||||||
|
"tagDesc" = "此标记将在路由规则中用作入站标记。"
|
||||||
"strategy" = "查询策略"
|
"strategy" = "查询策略"
|
||||||
"strategyDesc" = "解析域名的总体策略"
|
"strategyDesc" = "解析域名的总体策略"
|
||||||
"add" = "添加服务器"
|
"add" = "添加服务器"
|
||||||
|
|
Loading…
Reference in a new issue