Skip to content

Commit

Permalink
New - DNS Outbound (nonIPQuery, blockTypes)
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Sep 16, 2024
1 parent 9c4fa23 commit 176ab5f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion web/assets/js/model/outbound.js
Original file line number Diff line number Diff line change
Expand Up @@ -934,18 +934,28 @@ Outbound.BlackholeSettings = class extends CommonClass {
}
};
Outbound.DNSSettings = class extends CommonClass {
constructor(network = 'udp', address = '1.1.1.1', port = 53) {
constructor(
network = 'udp',
address = '1.1.1.1',
port = 53,
nonIPQuery = 'drop',
blockTypes = []
) {
super();
this.network = network;
this.address = address;
this.port = port;
this.nonIPQuery = nonIPQuery;
this.blockTypes = blockTypes;
}

static fromJson(json = {}) {
return new Outbound.DNSSettings(
json.network,
json.address,
json.port,
json.nonIPQuery,
json.blockTypes,
);
}
};
Expand Down
8 changes: 8 additions & 0 deletions web/html/xui/form/outbound.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@
<a-select-option v-for="s in ['udp','tcp']" :value="s">[[ s ]]</a-select-option>
</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 ['drop','skip']" :value="s">[[ s ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item v-if="outbound.settings.nonIPQuery === 'skip'" label='Block Types' >
<a-input v-model.number="outbound.settings.blockTypes"></a-input>
</a-form-item>
</template>

<!-- wireguard settings -->
Expand Down

0 comments on commit 176ab5f

Please sign in to comment.