diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-04-20 20:09:45 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-04-20 20:09:45 +0300 |
| commit | 88dafa6cdf6fbd13c2ea842ee403330a043ce8ff (patch) | |
| tree | 16ef9ec609dd6a04460d40f241643e9ca5e16b61 /web/html/form | |
| parent | 2b3b2770b49cd56097d7cebdf279e267a77072f6 (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/html/form')
| -rw-r--r-- | web/html/form/outbound.html | 16 | ||||
| -rw-r--r-- | web/html/form/stream/stream_finalmask.html | 16 |
2 files changed, 24 insertions, 8 deletions
diff --git a/web/html/form/outbound.html b/web/html/form/outbound.html index f4cb6467..7bac266f 100644 --- a/web/html/form/outbound.html +++ b/web/html/form/outbound.html @@ -886,15 +886,23 @@ placeholder="Obfuscation password" ></a-input> </a-form-item> - <a-form-item - label="Domain" - v-if="['header-dns', 'xdns'].includes(mask.type)" - > + <a-form-item label="Domain" v-if="mask.type === 'header-dns'"> <a-input v-model.trim="mask.settings.domain" placeholder="e.g., www.example.com" ></a-input> </a-form-item> + <template v-if="mask.type === 'xdns'"> + <a-form-item label="Resolvers"> + <a-select + mode="tags" + v-model="mask.settings.resolvers" + :style="{ width: '100%' }" + :token-separators="[',']" + placeholder="e.g., xxx+udp://8.8.8.8:53" + ></a-select> + </a-form-item> + </template> <template v-if="mask.type === 'header-custom'"> <a-form-item label="Client"> <a-icon diff --git a/web/html/form/stream/stream_finalmask.html b/web/html/form/stream/stream_finalmask.html index b61813ee..64bf2c06 100644 --- a/web/html/form/stream/stream_finalmask.html +++ b/web/html/form/stream/stream_finalmask.html @@ -81,15 +81,23 @@ placeholder="Obfuscation password" ></a-input> </a-form-item> - <a-form-item - label="Domain" - v-if="['header-dns', 'xdns'].includes(mask.type)" - > + <a-form-item label="Domain" v-if="mask.type === 'header-dns'"> <a-input v-model.trim="mask.settings.domain" placeholder="e.g., www.example.com" ></a-input> </a-form-item> + <template v-if="mask.type === 'xdns'"> + <a-form-item label="Domains"> + <a-select + mode="tags" + v-model="mask.settings.domains" + :style="{ width: '100%' }" + :token-separators="[',']" + placeholder="e.g., www.example.com" + ></a-select> + </a-form-item> + </template> <template v-if="mask.type === 'header-custom'"> <a-form-item label="Client"> <a-icon |
