config.proto 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. }
  39. repeated HostMapping static_hosts = 4;
  40. }