config.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. syntax = "proto3";
  2. package v2ray.core.app.dns;
  3. option csharp_namespace = "V2Ray.Core.App.Dns";
  4. option go_package = "dns";
  5. option java_package = "com.v2ray.core.app.dns";
  6. option java_multiple_files = true;
  7. import "v2ray.com/core/common/net/address.proto";
  8. import "v2ray.com/core/common/net/destination.proto";
  9. message NameServer {
  10. v2ray.core.common.net.Endpoint address = 1;
  11. message PriorityDomain {
  12. DomainMatchingType type = 1;
  13. string domain = 2;
  14. }
  15. repeated PriorityDomain prioritized_domain = 2;
  16. }
  17. enum DomainMatchingType {
  18. Full = 0;
  19. Subdomain = 1;
  20. Keyword = 2;
  21. Regex = 3;
  22. }
  23. message Config {
  24. // Nameservers used by this DNS. Only traditional UDP servers are support at the moment.
  25. // A special value 'localhost' as a domain address can be set to use DNS on local system.
  26. repeated v2ray.core.common.net.Endpoint NameServers = 1 [deprecated = true];
  27. // NameServer list used by this DNS client.
  28. repeated NameServer name_server = 5;
  29. // Static hosts. Domain to IP.
  30. // Deprecated. Use static_hosts.
  31. map<string, v2ray.core.common.net.IPOrDomain> Hosts = 2 [deprecated = true];
  32. // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes (IPv6).
  33. bytes client_ip = 3;
  34. message HostMapping {
  35. DomainMatchingType type = 1;
  36. string domain = 2;
  37. repeated bytes ip = 3;
  38. // ProxiedDomain indicates the mapped domain has the same IP address on this domain. V2Ray will use this domain for IP queries.
  39. // This field is only effective if ip is empty.
  40. string proxied_domain = 4;
  41. }
  42. repeated HostMapping static_hosts = 4;
  43. // Tag is the inbound tag of DNS client.
  44. string tag = 6;
  45. }