github.com/xraypb/Xray-core@v1.8.1/app/dns/config.proto (about)

     1  syntax = "proto3";
     2  
     3  package xray.app.dns;
     4  option csharp_namespace = "Xray.App.Dns";
     5  option go_package = "github.com/xraypb/Xray-core/app/dns";
     6  option java_package = "com.xray.app.dns";
     7  option java_multiple_files = true;
     8  
     9  import "common/net/address.proto";
    10  import "common/net/destination.proto";
    11  import "app/router/config.proto";
    12  
    13  message NameServer {
    14    xray.common.net.Endpoint address = 1;
    15    bytes client_ip = 5;
    16    bool skipFallback = 6;
    17  
    18    message PriorityDomain {
    19      DomainMatchingType type = 1;
    20      string domain = 2;
    21    }
    22  
    23    message OriginalRule {
    24      string rule = 1;
    25      uint32 size = 2;
    26    }
    27  
    28    repeated PriorityDomain prioritized_domain = 2;
    29    repeated xray.app.router.GeoIP geoip = 3;
    30    repeated OriginalRule original_rules = 4;
    31  }
    32  
    33  enum DomainMatchingType {
    34    Full = 0;
    35    Subdomain = 1;
    36    Keyword = 2;
    37    Regex = 3;
    38  }
    39  
    40  enum QueryStrategy {
    41    USE_IP = 0;
    42    USE_IP4 = 1;
    43    USE_IP6 = 2;
    44  }
    45  
    46  message Config {
    47    // Nameservers used by this DNS. Only traditional UDP servers are support at
    48    // the moment. A special value 'localhost' as a domain address can be set to
    49    // use DNS on local system.
    50    repeated xray.common.net.Endpoint NameServers = 1 [deprecated = true];
    51  
    52    // NameServer list used by this DNS client.
    53    repeated NameServer name_server = 5;
    54  
    55    // Static hosts. Domain to IP.
    56    // Deprecated. Use static_hosts.
    57    map<string, xray.common.net.IPOrDomain> Hosts = 2 [deprecated = true];
    58  
    59    // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes
    60    // (IPv6).
    61    bytes client_ip = 3;
    62  
    63    message HostMapping {
    64      DomainMatchingType type = 1;
    65      string domain = 2;
    66  
    67      repeated bytes ip = 3;
    68  
    69      // ProxiedDomain indicates the mapped domain has the same IP address on this
    70      // domain. Xray will use this domain for IP queries.
    71      string proxied_domain = 4;
    72    }
    73  
    74    repeated HostMapping static_hosts = 4;
    75  
    76    // Tag is the inbound tag of DNS client.
    77    string tag = 6;
    78  
    79    reserved 7;
    80  
    81    // DisableCache disables DNS cache
    82    bool disableCache = 8;
    83  
    84    QueryStrategy query_strategy = 9;
    85  
    86    bool disableFallback = 10;
    87    bool disableFallbackIfMatch = 11;
    88  }