diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-04-26 18:34:31 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-04-26 18:34:31 +0300 |
| commit | a62c637632d0e4f0ff74fe185a3ea50048cb73d8 (patch) | |
| tree | b0f4446e30d1ef9c5fd81ba1a4d293954d152705 /web/html | |
| parent | 35609b7b132158fc496b5c834766100e86f7c3bf (diff) | |
DNS outbound: Add rules
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/form/outbound.html | 79 |
1 files changed, 65 insertions, 14 deletions
diff --git a/web/html/form/outbound.html b/web/html/form/outbound.html index a9119cf0..c350d70f 100644 --- a/web/html/form/outbound.html +++ b/web/html/form/outbound.html @@ -190,22 +190,73 @@ > </a-select> </a-form-item> - <a-form-item label="non-IP queries"> - <a-select - v-model="outbound.settings.nonIPQuery" - :dropdown-class-name="themeSwitcher.currentTheme" - > - <a-select-option v-for="s in ['reject','drop','skip']" :value="s" - >[[ s ]]</a-select-option - > - </a-select> + <a-form-item label="Rules"> + <a-button + icon="plus" + type="primary" + size="small" + @click="outbound.settings.addRule()" + ></a-button> </a-form-item> - <a-form-item - v-if="outbound.settings.nonIPQuery === 'skip'" - label="Block Types" + + <a-form + v-for="(rule, index) in outbound.settings.rules" + :colon="false" + :label-col="{ md: {span:8} }" + :wrapper-col="{ md: {span:14} }" > - <a-input v-model.number="outbound.settings.blockTypes"></a-input> - </a-form-item> + <a-divider :style="{ margin: '0' }"> + Rule [[ index + 1 ]] + <a-icon + type="delete" + @click="() => outbound.settings.delRule(index)" + :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }" + ></a-icon> + </a-divider> + + <a-form-item label="Action"> + <a-select + v-model="rule.action" + :dropdown-class-name="themeSwitcher.currentTheme" + > + <a-select-option v-for="action in DNSRuleActions" :value="action" + >[[ action ]]</a-select-option + > + </a-select> + </a-form-item> + + <a-form-item> + <template slot="label"> + <a-tooltip> + <template slot="title"> + <span>Single qtype (e.g. 28) or list/range (e.g. 1,3,23-24)</span> + </template> + QType + <a-icon type="question-circle"></a-icon> + </a-tooltip> + </template> + <a-input + v-model.trim="rule.qtype" + placeholder="1,3,23-24" + ></a-input> + </a-form-item> + + <a-form-item> + <template slot="label"> + <a-tooltip> + <template slot="title"> + <span>Comma-separated domain rules, e.g. domain:example.com,full:example.com</span> + </template> + Domain + <a-icon type="question-circle"></a-icon> + </a-tooltip> + </template> + <a-input + v-model.trim="rule.domain" + placeholder="domain:example.com,full:example.com" + ></a-input> + </a-form-item> + </a-form> </template> <!-- wireguard settings --> |
