Files
Xray-core/app/dns/config.proto
T

96 lines
2.1 KiB
Protocol Buffer
Raw Normal View History

2020-11-25 19:01:53 +08:00
syntax = "proto3";
package xray.app.dns;
option csharp_namespace = "Xray.App.Dns";
2020-12-04 09:36:16 +08:00
option go_package = "github.com/xtls/xray-core/app/dns";
2020-11-25 19:01:53 +08:00
option java_package = "com.xray.app.dns";
option java_multiple_files = true;
import "common/net/destination.proto";
import "app/router/config.proto";
message NameServer {
xray.common.net.Endpoint address = 1;
2021-10-16 21:02:51 +08:00
bytes client_ip = 5;
bool skipFallback = 6;
2020-11-25 19:01:53 +08:00
message PriorityDomain {
DomainMatchingType type = 1;
string domain = 2;
}
message OriginalRule {
string rule = 1;
uint32 size = 2;
}
repeated PriorityDomain prioritized_domain = 2;
repeated xray.app.router.GeoIP expected_geoip = 3;
2020-11-25 19:01:53 +08:00
repeated OriginalRule original_rules = 4;
QueryStrategy query_strategy = 7;
bool actPrior = 8;
2025-03-21 08:18:59 +08:00
string tag = 9;
uint64 timeoutMs = 10;
optional bool disableCache = 11;
optional bool serveStale = 15;
2025-11-21 13:38:06 +08:00
optional uint32 serveExpiredTTL = 16;
bool finalQuery = 12;
repeated xray.app.router.GeoIP unexpected_geoip = 13;
bool actUnprior = 14;
2025-11-21 13:45:42 +08:00
uint32 policyID = 17;
2020-11-25 19:01:53 +08:00
}
enum DomainMatchingType {
Full = 0;
Subdomain = 1;
Keyword = 2;
Regex = 3;
}
2021-10-16 21:02:51 +08:00
enum QueryStrategy {
USE_IP = 0;
USE_IP4 = 1;
USE_IP6 = 2;
USE_SYS = 3;
2021-10-16 21:02:51 +08:00
}
2020-11-25 19:01:53 +08:00
message Config {
// NameServer list used by this DNS client.
2024-09-19 09:05:59 +08:00
// A special value 'localhost' as a domain address can be set to use DNS on local system.
2020-11-25 19:01:53 +08:00
repeated NameServer name_server = 5;
// Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes
// (IPv6).
bytes client_ip = 3;
message HostMapping {
DomainMatchingType type = 1;
string domain = 2;
repeated bytes ip = 3;
// ProxiedDomain indicates the mapped domain has the same IP address on this
2021-10-16 21:02:51 +08:00
// domain. Xray will use this domain for IP queries.
2020-11-25 19:01:53 +08:00
string proxied_domain = 4;
}
repeated HostMapping static_hosts = 4;
// Tag is the inbound tag of DNS client.
string tag = 6;
2021-03-06 23:39:50 -05:00
reserved 7;
2021-10-16 21:02:51 +08:00
// DisableCache disables DNS cache
bool disableCache = 8;
2025-11-21 13:38:06 +08:00
bool serveStale = 12;
uint32 serveExpiredTTL = 13;
2021-10-16 21:02:51 +08:00
QueryStrategy query_strategy = 9;
bool disableFallback = 10;
bool disableFallbackIfMatch = 11;
2025-11-21 13:45:42 +08:00
bool enableParallelQuery = 14;
2020-11-25 19:01:53 +08:00
}