New - DNS Outbound (nonIPQuery, blockTypes)

This commit is contained in:
mhsanaei 2024-09-16 10:30:51 +02:00
parent 9c4fa23931
commit 176ab5f48e
2 changed files with 19 additions and 1 deletions

View file

@ -934,11 +934,19 @@ Outbound.BlackholeSettings = class extends CommonClass {
} }
}; };
Outbound.DNSSettings = 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(); super();
this.network = network; this.network = network;
this.address = address; this.address = address;
this.port = port; this.port = port;
this.nonIPQuery = nonIPQuery;
this.blockTypes = blockTypes;
} }
static fromJson(json = {}) { static fromJson(json = {}) {
@ -946,6 +954,8 @@ Outbound.DNSSettings = class extends CommonClass {
json.network, json.network,
json.address, json.address,
json.port, json.port,
json.nonIPQuery,
json.blockTypes,
); );
} }
}; };

View file

@ -75,6 +75,14 @@
<a-select-option v-for="s in ['udp','tcp']" :value="s">[[ s ]]</a-select-option> <a-select-option v-for="s in ['udp','tcp']" :value="s">[[ s ]]</a-select-option>
</a-select> </a-select>
</a-form-item> </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> </template>
<!-- wireguard settings --> <!-- wireguard settings -->