config.proto 1.9 KB

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