config.proto 1.8 KB

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