mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
DNS outbound: Add rules (matches qtype and domain, then action) (#5981)
https://github.com/XTLS/Xray-core/pull/5981#issuecomment-4279809648 Example: https://github.com/XTLS/Xray-core/pull/5981#issuecomment-4283200236 Closes https://github.com/XTLS/Xray-core/issues/5218
This commit is contained in:
@@ -7,12 +7,23 @@ option java_package = "com.xray.proxy.dns";
|
||||
option java_multiple_files = true;
|
||||
|
||||
import "common/net/destination.proto";
|
||||
import "common/geodata/geodat.proto";
|
||||
|
||||
enum RuleAction {
|
||||
Direct = 0;
|
||||
Drop = 1;
|
||||
Reject = 2;
|
||||
Hijack = 3;
|
||||
}
|
||||
|
||||
message DNSRuleConfig {
|
||||
RuleAction action = 1;
|
||||
repeated int32 qtype = 2;
|
||||
repeated xray.common.geodata.DomainRule domain = 3;
|
||||
}
|
||||
|
||||
message Config {
|
||||
// Server is the DNS server address. If specified, this address overrides the
|
||||
// original one.
|
||||
xray.common.net.Endpoint server = 1;
|
||||
uint32 user_level = 2;
|
||||
string non_IP_query = 3;
|
||||
repeated int32 block_types = 4;
|
||||
uint32 user_level = 1;
|
||||
repeated DNSRuleConfig rule = 2;
|
||||
xray.common.net.Endpoint server = 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user