Xray-core/app/dns/config.proto

83 lines
2 KiB
Protocol Buffer
Raw Permalink Normal View History

2020-11-25 11:01:53 +00:00
syntax = "proto3";
package xray.app.dns;
option csharp_namespace = "Xray.App.Dns";
2020-12-04 01:36:16 +00:00
option go_package = "github.com/xtls/xray-core/app/dns";
2020-11-25 11:01:53 +00:00
option java_package = "com.xray.app.dns";
option java_multiple_files = true;
import "common/net/address.proto";
import "common/net/destination.proto";
2021-03-24 15:01:20 +00:00
import "common/matcher/domain/domain.proto";
import "common/matcher/geoip/geoip.proto";
2020-11-25 11:01:53 +00:00
message NameServer {
xray.common.net.Endpoint address = 1;
2021-03-18 15:24:24 +00:00
bytes client_ip = 5;
bool skipFallback = 6;
2020-11-25 11:01:53 +00:00
message OriginalRule {
string rule = 1;
uint32 size = 2;
}
2021-03-24 15:01:20 +00:00
repeated xray.common.matcher.domain.Domain prioritized_domain = 2;
repeated xray.common.matcher.geoip.GeoIP geoip = 3;
2020-11-25 11:01:53 +00:00
repeated OriginalRule original_rules = 4;
}
2021-03-19 15:33:07 +00:00
enum QueryStrategy {
USE_IP = 0;
USE_IP4 = 1;
USE_IP6 = 2;
}
2021-04-09 15:36:36 +00:00
enum CacheStrategy {
Cache_ALL = 0;
Cache_NOERROR = 1;
Cache_DISABLE = 2;
}
2020-11-25 11:01:53 +00:00
message Config {
// Nameservers used by this DNS. Only traditional UDP servers are support at
// the moment. A special value 'localhost' as a domain address can be set to
// use DNS on local system.
repeated xray.common.net.Endpoint NameServers = 1 [deprecated = true];
// NameServer list used by this DNS client.
repeated NameServer name_server = 5;
// Static hosts. Domain to IP.
// Deprecated. Use static_hosts.
map<string, xray.common.net.IPOrDomain> Hosts = 2 [deprecated = true];
// Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes
// (IPv6).
bytes client_ip = 3;
message HostMapping {
2021-03-24 15:01:20 +00:00
xray.common.matcher.domain.MatchingType type = 1;
2020-11-25 11:01:53 +00:00
string domain = 2;
repeated bytes ip = 3;
// ProxiedDomain indicates the mapped domain has the same IP address on this
// domain. Xray will use this domain for IP queries.
2020-11-25 11:01:53 +00:00
string proxied_domain = 4;
}
repeated HostMapping static_hosts = 4;
// Tag is the inbound tag of DNS client.
string tag = 6;
reserved 7;
2021-03-18 15:24:24 +00:00
// DisableCache disables DNS cache
2021-04-09 15:36:36 +00:00
CacheStrategy cache_strategy = 8;
2021-03-19 15:33:07 +00:00
QueryStrategy query_strategy = 9;
bool disableFallback = 10;
2020-11-25 11:01:53 +00:00
}