config.proto 1.7 KB

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