github.com/xmplusdev/xmcore@v1.8.11-0.20240412132628-5518b55526af/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/xmplusdev/xmcore/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    QueryStrategy query_strategy = 7;
    32  }
    33  
    34  enum DomainMatchingType {
    35    Full = 0;
    36    Subdomain = 1;
    37    Keyword = 2;
    38    Regex = 3;
    39  }
    40  
    41  enum QueryStrategy {
    42    USE_IP = 0;
    43    USE_IP4 = 1;
    44    USE_IP6 = 2;
    45  }
    46  
    47  message Config {
    48    // Nameservers used by this DNS. Only traditional UDP servers are support at
    49    // the moment. A special value 'localhost' as a domain address can be set to
    50    // use DNS on local system.
    51    repeated xray.common.net.Endpoint NameServers = 1 [deprecated = true];
    52  
    53    // NameServer list used by this DNS client.
    54    repeated NameServer name_server = 5;
    55  
    56    // Static hosts. Domain to IP.
    57    // Deprecated. Use static_hosts.
    58    map<string, xray.common.net.IPOrDomain> Hosts = 2 [deprecated = true];
    59  
    60    // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes
    61    // (IPv6).
    62    bytes client_ip = 3;
    63  
    64    message HostMapping {
    65      DomainMatchingType type = 1;
    66      string domain = 2;
    67  
    68      repeated bytes ip = 3;
    69  
    70      // ProxiedDomain indicates the mapped domain has the same IP address on this
    71      // domain. Xray will use this domain for IP queries.
    72      string proxied_domain = 4;
    73    }
    74  
    75    repeated HostMapping static_hosts = 4;
    76  
    77    // Tag is the inbound tag of DNS client.
    78    string tag = 6;
    79  
    80    reserved 7;
    81  
    82    // DisableCache disables DNS cache
    83    bool disableCache = 8;
    84  
    85    QueryStrategy query_strategy = 9;
    86  
    87    bool disableFallback = 10;
    88    bool disableFallbackIfMatch = 11;
    89  }