mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
DNS Outbound - nonIPQuery, blockTypes
This commit is contained in:
@@ -891,18 +891,28 @@ 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 = {}) {
|
||||||
return new Outbound.DNSSettings(
|
return new Outbound.DNSSettings(
|
||||||
json.network,
|
json.network,
|
||||||
json.address,
|
json.address,
|
||||||
json.port,
|
json.port,
|
||||||
|
json.nonIPQuery,
|
||||||
|
json.blockTypes,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,24 +81,28 @@
|
|||||||
|
|
||||||
<!-- blackhole settings -->
|
<!-- blackhole settings -->
|
||||||
<template v-if="outbound.protocol === Protocols.Blackhole">
|
<template v-if="outbound.protocol === Protocols.Blackhole">
|
||||||
<a-form-item label='Response Type'>
|
<a-form-item label='Response Type'>
|
||||||
<a-select
|
<a-select v-model="outbound.settings.type" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||||
v-model="outbound.settings.type"
|
<a-select-option v-for="s in ['', 'none','http']" :value="s">[[ s ]]</a-select-option>
|
||||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
</a-select>
|
||||||
<a-select-option v-for="s in ['', 'none','http']" :value="s">[[ s ]]</a-select-option>
|
</a-form-item>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- dns settings -->
|
<!-- dns settings -->
|
||||||
<template v-if="outbound.protocol === Protocols.DNS">
|
<template v-if="outbound.protocol === Protocols.DNS">
|
||||||
<a-form-item label='{{ i18n "pages.inbounds.network" }}'>
|
<a-form-item label='{{ i18n "pages.inbounds.network" }}'>
|
||||||
<a-select
|
<a-select v-model="outbound.settings.network" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||||
v-model="outbound.settings.network"
|
<a-select-option v-for="s in ['udp','tcp']" :value="s">[[ s ]]</a-select-option>
|
||||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
</a-select>
|
||||||
<a-select-option v-for="s in ['udp','tcp']" :value="s">[[ s ]]</a-select-option>
|
</a-form-item>
|
||||||
</a-select>
|
<a-form-item label='non-IP queries'>
|
||||||
</a-form-item>
|
<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 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user