config.proto 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. }
  22. message Config {
  23. // Nameservers used by this DNS. Only traditional UDP servers are support at the moment.
  24. // A special value 'localhost' as a domain address can be set to use DNS on local system.
  25. repeated v2ray.core.common.net.Endpoint NameServers = 1 [deprecated = true];
  26. // NameServer list used by this DNS client.
  27. repeated NameServer name_server = 5;
  28. // Static hosts. Domain to IP.
  29. // Deprecated. Use static_hosts.
  30. map<string, v2ray.core.common.net.IPOrDomain> Hosts = 2 [deprecated = true];
  31. // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes (IPv6).
  32. bytes client_ip = 3;
  33. message HostMapping {
  34. DomainMatchingType type = 1;
  35. string domain = 2;
  36. repeated bytes ip = 3;
  37. }
  38. repeated HostMapping static_hosts = 4;
  39. }