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
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-04-20 20:09:45 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-04-20 20:09:45 +0300
commit88dafa6cdf6fbd13c2ea842ee403330a043ce8ff (patch)
tree16ef9ec609dd6a04460d40f241643e9ca5e16b61 /web/assets
parent2b3b2770b49cd56097d7cebdf279e267a77072f6 (diff)
XDNS finalmask: Support resolvers (client) and domains (server)
Treat the xdns mask type as a multi-value setting and update forms accordingly. Inbound/outbound UdpMask models now return arrays for xdns (inbound: settings.domains, outbound: settings.resolvers) using Array.isArray checks. UI templates were split so 'header-dns' still uses a single domain string, while 'xdns' renders a tags-style <a-select> for multiple entries (domains/resolvers). Conditionals were made explicit (mask.type === ...) instead of using includes(). Changed files: web/assets/js/model/inbound.js, web/assets/js/model/outbound.js, web/html/form/outbound.html, web/html/form/stream/stream_finalmask.html.
Diffstat (limited to 'web/assets')
-rw-r--r--web/assets/js/model/inbound.js3
-rw-r--r--web/assets/js/model/outbound.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js
index d4df6d36..5d167ead 100644
--- a/web/assets/js/model/inbound.js
+++ b/web/assets/js/model/inbound.js
@@ -1073,8 +1073,9 @@ class UdpMask extends XrayCommonClass {
case 'mkcp-aes128gcm':
return { password: settings.password || '' };
case 'header-dns':
- case 'xdns':
return { domain: settings.domain || '' };
+ case 'xdns':
+ return { domains: Array.isArray(settings.domains) ? settings.domains : [] };
case 'xicmp':
return { ip: settings.ip || '', id: settings.id ?? 0 };
case 'mkcp-original':
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index c0808c1d..9a26a954 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -573,8 +573,9 @@ class UdpMask extends CommonClass {
case 'mkcp-aes128gcm':
return { password: settings.password || '' };
case 'header-dns':
- case 'xdns':
return { domain: settings.domain || '' };
+ case 'xdns':
+ return { resolvers: Array.isArray(settings.resolvers) ? settings.resolvers : [] };
case 'xicmp':
return { ip: settings.ip || '', id: settings.id ?? 0 };
case 'mkcp-original':