chore: add global params for DNS (#2713)
parameter list: `disableCache`, `disableFallback`, `disableFallbackIfMatch`, `clientIp`
This commit is contained in:
1 parent
14cdde371f
commit
f5aea03765
13 files changed
+197
-9
No files matched your search
+101
-9
@@ -673,9 +673,7 @@
|
||||
<a-switch v-model="enableDNS"></a-switch>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-list-item>
|
||||
<template v-if="enableDNS">
|
||||
<a-list-item>
|
||||
<template v-if="enableDNS">
|
||||
<a-row style="padding: 10px 20px;">
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-list-item-meta title='{{ i18n "pages.xray.dns.tag" }}'
|
||||
@@ -685,8 +683,15 @@
|
||||
<a-input type="text" v-model="dnsTag"></a-input>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-list-item>
|
||||
<a-list-item>
|
||||
<a-row style="padding: 10px 20px;">
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-list-item-meta title='{{ i18n "pages.xray.dns.clientIp" }}'
|
||||
description='{{ i18n "pages.xray.dns.clientIpDesc" }}'/>
|
||||
</a-col>
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-input type="text" v-model="dnsClientIp"></a-input>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="padding: 10px 20px;">
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-list-item-meta title='{{ i18n "pages.xray.dns.strategy" }}'
|
||||
@@ -701,8 +706,35 @@
|
||||
</a-select>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-list-item>
|
||||
</template>
|
||||
<a-row style="padding: 10px 20px;">
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-list-item-meta title='{{ i18n "pages.xray.dns.disableCache" }}'
|
||||
description='{{ i18n "pages.xray.dns.disableCacheDesc" }}'/>
|
||||
</a-col>
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-switch v-model="dnsDisableCache"></a-switch>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="padding: 10px 20px;">
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-list-item-meta title='{{ i18n "pages.xray.dns.disableFallback" }}'
|
||||
description='{{ i18n "pages.xray.dns.disableFallbackDesc" }}'/>
|
||||
</a-col>
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-switch v-model="dnsDisableFallback"></a-switch>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="padding: 10px 20px;">
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-list-item-meta title='{{ i18n "pages.xray.dns.disableFallbackIfMatch" }}'
|
||||
description='{{ i18n "pages.xray.dns.disableFallbackIfMatchDesc" }}'/>
|
||||
</a-col>
|
||||
<a-col :lg="24" :xl="12">
|
||||
<a-switch v-model="dnsDisableFallbackIfMatch"></a-switch>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
</a-list-item>
|
||||
</a-collapse-panel>
|
||||
<template v-if="enableDNS">
|
||||
<a-collapse-panel header='DNS'>
|
||||
@@ -1971,7 +2003,11 @@
|
||||
set: function (newValue) {
|
||||
newTemplateSettings = this.templateSettings;
|
||||
if (newValue) {
|
||||
newTemplateSettings.dns = { servers: [], queryStrategy: "UseIP", tag: "dns_inbound" };
|
||||
newTemplateSettings.dns = {
|
||||
servers: [],
|
||||
queryStrategy: "UseIP",
|
||||
tag: "dns_inbound"
|
||||
};
|
||||
newTemplateSettings.fakedns = null;
|
||||
} else {
|
||||
delete newTemplateSettings.dns;
|
||||
@@ -1986,7 +2022,63 @@
|
||||
},
|
||||
set: function (newValue) {
|
||||
newTemplateSettings = this.templateSettings;
|
||||
newTemplateSettings.dns.tag = newValue;
|
||||
newTemplateSettings.dns.tag = newValue;
|
||||
this.templateSettings = newTemplateSettings;
|
||||
}
|
||||
},
|
||||
dnsClientIp: {
|
||||
get: function () {
|
||||
return this.enableDNS ? this.templateSettings.dns.clientIp : null;
|
||||
},
|
||||
set: function (newValue) {
|
||||
newTemplateSettings = this.templateSettings;
|
||||
if (newValue) {
|
||||
newTemplateSettings.dns.clientIp = newValue;
|
||||
} else {
|
||||
delete newTemplateSettings.dns.clientIp;
|
||||
}
|
||||
this.templateSettings = newTemplateSettings;
|
||||
}
|
||||
},
|
||||
dnsDisableCache: {
|
||||
get: function () {
|
||||
return this.enableDNS ? this.templateSettings.dns.disableCache : false;
|
||||
},
|
||||
set: function (newValue) {
|
||||
newTemplateSettings = this.templateSettings;
|
||||
if (newValue) {
|
||||
newTemplateSettings.dns.disableCache = newValue;
|
||||
} else {
|
||||
delete newTemplateSettings.dns.disableCache
|
||||
}
|
||||
this.templateSettings = newTemplateSettings;
|
||||
}
|
||||
},
|
||||
dnsDisableFallback: {
|
||||
get: function () {
|
||||
return this.enableDNS ? this.templateSettings.dns.disableFallback : false;
|
||||
},
|
||||
set: function (newValue) {
|
||||
newTemplateSettings = this.templateSettings;
|
||||
if (newValue) {
|
||||
newTemplateSettings.dns.disableFallback = newValue;
|
||||
} else {
|
||||
delete newTemplateSettings.dns.disableFallback
|
||||
}
|
||||
this.templateSettings = newTemplateSettings;
|
||||
}
|
||||
},
|
||||
dnsDisableFallbackIfMatch: {
|
||||
get: function () {
|
||||
return this.enableDNS ? this.templateSettings.dns.disableFallbackIfMatch : false;
|
||||
},
|
||||
set: function (newValue) {
|
||||
newTemplateSettings = this.templateSettings;
|
||||
if (newValue) {
|
||||
newTemplateSettings.dns.disableFallbackIfMatch = newValue;
|
||||
} else {
|
||||
delete newTemplateSettings.dns.disableFallbackIfMatch
|
||||
}
|
||||
this.templateSettings = newTemplateSettings;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -433,6 +433,14 @@
|
||||
"enableDesc" = "Enable built-in DNS server"
|
||||
"tag" = "DNS Inbound Tag"
|
||||
"tagDesc" = "This tag will be available as an Inbound tag in routing rules."
|
||||
"clientIp" = "Client IP"
|
||||
"clientIpDesc" = "Used to notify the server of the specified IP location during DNS queries"
|
||||
"disableCache" = "Disable cache"
|
||||
"disableCacheDesc" = "Disables DNS caching"
|
||||
"disableFallback" = "Disable Fallback"
|
||||
"disableFallbackDesc" = "Disables fallback DNS queries"
|
||||
"disableFallbackIfMatch" = "Disable Fallback If Match"
|
||||
"disableFallbackIfMatchDesc" = "Disables fallback DNS queries when the matching domain list of the DNS server is hit"
|
||||
"strategy" = "Query Strategy"
|
||||
"strategyDesc" = "Overall strategy to resolve domain names"
|
||||
"add" = "Add Server"
|
||||
|
||||
@@ -433,6 +433,14 @@
|
||||
"enableDesc" = "Habilitar servidor DNS incorporado"
|
||||
"tag" = "Etiqueta de Entrada DNS"
|
||||
"tagDesc" = "Esta etiqueta estará disponible como una etiqueta de entrada en las reglas de enrutamiento."
|
||||
"clientIp" = "IP del cliente"
|
||||
"clientIpDesc" = "Se utiliza para notificar al servidor la ubicación IP especificada durante las consultas DNS"
|
||||
"disableCache" = "Desactivar caché"
|
||||
"disableCacheDesc" = "Desactiva el almacenamiento en caché de DNS"
|
||||
"disableFallback" = "Desactivar respaldo"
|
||||
"disableFallbackDesc" = "Desactiva las consultas DNS de respaldo"
|
||||
"disableFallbackIfMatch" = "Desactivar respaldo si coincide"
|
||||
"disableFallbackIfMatchDesc" = "Desactiva las consultas DNS de respaldo cuando se acierta en la lista de dominios coincidentes del servidor DNS"
|
||||
"strategy" = "Estrategia de Consulta"
|
||||
"strategyDesc" = "Estrategia general para resolver nombres de dominio"
|
||||
"add" = "Agregar Servidor"
|
||||
|
||||
Loaded 3 of 13 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user