config.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. package dns
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. import net "v2ray.com/core/common/net"
  6. // Reference imports to suppress errors if they are not otherwise used.
  7. var _ = proto.Marshal
  8. var _ = fmt.Errorf
  9. var _ = math.Inf
  10. // This is a compile-time assertion to ensure that this generated file
  11. // is compatible with the proto package it is being compiled against.
  12. // A compilation error at this line likely means your copy of the
  13. // proto package needs to be updated.
  14. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  15. type Config_HostMapping_Type int32
  16. const (
  17. Config_HostMapping_Full Config_HostMapping_Type = 0
  18. Config_HostMapping_SubDomain Config_HostMapping_Type = 1
  19. )
  20. var Config_HostMapping_Type_name = map[int32]string{
  21. 0: "Full",
  22. 1: "SubDomain",
  23. }
  24. var Config_HostMapping_Type_value = map[string]int32{
  25. "Full": 0,
  26. "SubDomain": 1,
  27. }
  28. func (x Config_HostMapping_Type) String() string {
  29. return proto.EnumName(Config_HostMapping_Type_name, int32(x))
  30. }
  31. func (Config_HostMapping_Type) EnumDescriptor() ([]byte, []int) {
  32. return fileDescriptor_config_299ae69458dda3a0, []int{0, 2, 0}
  33. }
  34. type Config struct {
  35. // Nameservers used by this DNS. Only traditional UDP servers are support at the moment.
  36. // A special value 'localhost' as a domain address can be set to use DNS on local system.
  37. NameServers []*net.Endpoint `protobuf:"bytes,1,rep,name=NameServers,proto3" json:"NameServers,omitempty"`
  38. // Static hosts. Domain to IP.
  39. // Deprecated. Use static_hosts.
  40. Hosts map[string]*net.IPOrDomain `protobuf:"bytes,2,rep,name=Hosts,proto3" json:"Hosts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Deprecated: Do not use.
  41. // Client IP for EDNS client subnet.
  42. ClientIp *Config_ClientIP `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
  43. StaticHosts []*Config_HostMapping `protobuf:"bytes,4,rep,name=static_hosts,json=staticHosts,proto3" json:"static_hosts,omitempty"`
  44. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  45. XXX_unrecognized []byte `json:"-"`
  46. XXX_sizecache int32 `json:"-"`
  47. }
  48. func (m *Config) Reset() { *m = Config{} }
  49. func (m *Config) String() string { return proto.CompactTextString(m) }
  50. func (*Config) ProtoMessage() {}
  51. func (*Config) Descriptor() ([]byte, []int) {
  52. return fileDescriptor_config_299ae69458dda3a0, []int{0}
  53. }
  54. func (m *Config) XXX_Unmarshal(b []byte) error {
  55. return xxx_messageInfo_Config.Unmarshal(m, b)
  56. }
  57. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  58. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  59. }
  60. func (dst *Config) XXX_Merge(src proto.Message) {
  61. xxx_messageInfo_Config.Merge(dst, src)
  62. }
  63. func (m *Config) XXX_Size() int {
  64. return xxx_messageInfo_Config.Size(m)
  65. }
  66. func (m *Config) XXX_DiscardUnknown() {
  67. xxx_messageInfo_Config.DiscardUnknown(m)
  68. }
  69. var xxx_messageInfo_Config proto.InternalMessageInfo
  70. func (m *Config) GetNameServers() []*net.Endpoint {
  71. if m != nil {
  72. return m.NameServers
  73. }
  74. return nil
  75. }
  76. // Deprecated: Do not use.
  77. func (m *Config) GetHosts() map[string]*net.IPOrDomain {
  78. if m != nil {
  79. return m.Hosts
  80. }
  81. return nil
  82. }
  83. func (m *Config) GetClientIp() *Config_ClientIP {
  84. if m != nil {
  85. return m.ClientIp
  86. }
  87. return nil
  88. }
  89. func (m *Config) GetStaticHosts() []*Config_HostMapping {
  90. if m != nil {
  91. return m.StaticHosts
  92. }
  93. return nil
  94. }
  95. type Config_ClientIP struct {
  96. // IPv4 address of the client. Must be 4 bytes.
  97. V4 []byte `protobuf:"bytes,1,opt,name=v4,proto3" json:"v4,omitempty"`
  98. // IPv6 address of the client. Must be 4 bytes.
  99. V6 []byte `protobuf:"bytes,2,opt,name=v6,proto3" json:"v6,omitempty"`
  100. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  101. XXX_unrecognized []byte `json:"-"`
  102. XXX_sizecache int32 `json:"-"`
  103. }
  104. func (m *Config_ClientIP) Reset() { *m = Config_ClientIP{} }
  105. func (m *Config_ClientIP) String() string { return proto.CompactTextString(m) }
  106. func (*Config_ClientIP) ProtoMessage() {}
  107. func (*Config_ClientIP) Descriptor() ([]byte, []int) {
  108. return fileDescriptor_config_299ae69458dda3a0, []int{0, 1}
  109. }
  110. func (m *Config_ClientIP) XXX_Unmarshal(b []byte) error {
  111. return xxx_messageInfo_Config_ClientIP.Unmarshal(m, b)
  112. }
  113. func (m *Config_ClientIP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  114. return xxx_messageInfo_Config_ClientIP.Marshal(b, m, deterministic)
  115. }
  116. func (dst *Config_ClientIP) XXX_Merge(src proto.Message) {
  117. xxx_messageInfo_Config_ClientIP.Merge(dst, src)
  118. }
  119. func (m *Config_ClientIP) XXX_Size() int {
  120. return xxx_messageInfo_Config_ClientIP.Size(m)
  121. }
  122. func (m *Config_ClientIP) XXX_DiscardUnknown() {
  123. xxx_messageInfo_Config_ClientIP.DiscardUnknown(m)
  124. }
  125. var xxx_messageInfo_Config_ClientIP proto.InternalMessageInfo
  126. func (m *Config_ClientIP) GetV4() []byte {
  127. if m != nil {
  128. return m.V4
  129. }
  130. return nil
  131. }
  132. func (m *Config_ClientIP) GetV6() []byte {
  133. if m != nil {
  134. return m.V6
  135. }
  136. return nil
  137. }
  138. type Config_HostMapping struct {
  139. Type Config_HostMapping_Type `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.app.dns.Config_HostMapping_Type" json:"type,omitempty"`
  140. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
  141. Ip [][]byte `protobuf:"bytes,3,rep,name=ip,proto3" json:"ip,omitempty"`
  142. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  143. XXX_unrecognized []byte `json:"-"`
  144. XXX_sizecache int32 `json:"-"`
  145. }
  146. func (m *Config_HostMapping) Reset() { *m = Config_HostMapping{} }
  147. func (m *Config_HostMapping) String() string { return proto.CompactTextString(m) }
  148. func (*Config_HostMapping) ProtoMessage() {}
  149. func (*Config_HostMapping) Descriptor() ([]byte, []int) {
  150. return fileDescriptor_config_299ae69458dda3a0, []int{0, 2}
  151. }
  152. func (m *Config_HostMapping) XXX_Unmarshal(b []byte) error {
  153. return xxx_messageInfo_Config_HostMapping.Unmarshal(m, b)
  154. }
  155. func (m *Config_HostMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  156. return xxx_messageInfo_Config_HostMapping.Marshal(b, m, deterministic)
  157. }
  158. func (dst *Config_HostMapping) XXX_Merge(src proto.Message) {
  159. xxx_messageInfo_Config_HostMapping.Merge(dst, src)
  160. }
  161. func (m *Config_HostMapping) XXX_Size() int {
  162. return xxx_messageInfo_Config_HostMapping.Size(m)
  163. }
  164. func (m *Config_HostMapping) XXX_DiscardUnknown() {
  165. xxx_messageInfo_Config_HostMapping.DiscardUnknown(m)
  166. }
  167. var xxx_messageInfo_Config_HostMapping proto.InternalMessageInfo
  168. func (m *Config_HostMapping) GetType() Config_HostMapping_Type {
  169. if m != nil {
  170. return m.Type
  171. }
  172. return Config_HostMapping_Full
  173. }
  174. func (m *Config_HostMapping) GetDomain() string {
  175. if m != nil {
  176. return m.Domain
  177. }
  178. return ""
  179. }
  180. func (m *Config_HostMapping) GetIp() [][]byte {
  181. if m != nil {
  182. return m.Ip
  183. }
  184. return nil
  185. }
  186. func init() {
  187. proto.RegisterType((*Config)(nil), "v2ray.core.app.dns.Config")
  188. proto.RegisterMapType((map[string]*net.IPOrDomain)(nil), "v2ray.core.app.dns.Config.HostsEntry")
  189. proto.RegisterType((*Config_ClientIP)(nil), "v2ray.core.app.dns.Config.ClientIP")
  190. proto.RegisterType((*Config_HostMapping)(nil), "v2ray.core.app.dns.Config.HostMapping")
  191. proto.RegisterEnum("v2ray.core.app.dns.Config_HostMapping_Type", Config_HostMapping_Type_name, Config_HostMapping_Type_value)
  192. }
  193. func init() {
  194. proto.RegisterFile("v2ray.com/core/app/dns/config.proto", fileDescriptor_config_299ae69458dda3a0)
  195. }
  196. var fileDescriptor_config_299ae69458dda3a0 = []byte{
  197. // 444 bytes of a gzipped FileDescriptorProto
  198. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xd1, 0x6e, 0xd3, 0x30,
  199. 0x14, 0x86, 0x71, 0x92, 0x55, 0xed, 0xc9, 0x98, 0x2a, 0x5f, 0x4c, 0x51, 0x6e, 0x56, 0x36, 0x01,
  200. 0x15, 0x93, 0x1c, 0x29, 0x54, 0x03, 0x71, 0x33, 0xb6, 0x6e, 0x88, 0x5e, 0x00, 0x95, 0x87, 0xb8,
  201. 0x80, 0x8b, 0xc9, 0x4b, 0xcc, 0xb0, 0x68, 0x6c, 0xcb, 0x76, 0x23, 0xe5, 0x49, 0x78, 0x07, 0x9e,
  202. 0x81, 0x87, 0x43, 0xb1, 0x99, 0xa8, 0x80, 0x01, 0x77, 0x3d, 0xea, 0xff, 0x9d, 0xff, 0x3b, 0x56,
  203. 0xe0, 0xa0, 0x2d, 0x0d, 0xeb, 0x48, 0xa5, 0x9a, 0xa2, 0x52, 0x86, 0x17, 0x4c, 0xeb, 0xa2, 0x96,
  204. 0xb6, 0xa8, 0x94, 0xfc, 0x28, 0xae, 0x89, 0x36, 0xca, 0x29, 0x8c, 0x6f, 0x42, 0x86, 0x13, 0xa6,
  205. 0x35, 0xa9, 0xa5, 0xcd, 0x1f, 0xfe, 0x02, 0x56, 0xaa, 0x69, 0x94, 0x2c, 0x24, 0x77, 0x05, 0xab,
  206. 0x6b, 0xc3, 0xad, 0x0d, 0x70, 0x7e, 0x78, 0x7b, 0xb0, 0xe6, 0xd6, 0x09, 0xc9, 0x9c, 0x50, 0x32,
  207. 0x84, 0xf7, 0xbf, 0x25, 0x30, 0x98, 0xfb, 0x6a, 0x7c, 0x02, 0xe9, 0x6b, 0xd6, 0xf0, 0x0b, 0x6e,
  208. 0x5a, 0x6e, 0x6c, 0x86, 0x26, 0xf1, 0x34, 0x2d, 0xf7, 0xc8, 0x86, 0x4a, 0xd8, 0x44, 0x24, 0x77,
  209. 0xe4, 0x5c, 0xd6, 0x5a, 0x09, 0xe9, 0xe8, 0x26, 0x83, 0x8f, 0x61, 0xeb, 0xa5, 0xb2, 0xce, 0x66,
  210. 0x91, 0x87, 0xef, 0x93, 0xdf, 0xef, 0x20, 0xa1, 0x8d, 0xf8, 0xdc, 0xb9, 0x74, 0xa6, 0x3b, 0x8d,
  211. 0x32, 0x44, 0x03, 0x87, 0x9f, 0xc3, 0xa8, 0x5a, 0x09, 0x2e, 0xdd, 0xa5, 0xd0, 0x59, 0x3c, 0x41,
  212. 0xd3, 0xb4, 0x3c, 0xf8, 0xcb, 0x92, 0xb9, 0xcf, 0x2e, 0x96, 0x74, 0x18, 0xa8, 0x85, 0xc6, 0x0b,
  213. 0xd8, 0xb6, 0x8e, 0x39, 0x51, 0x5d, 0x7e, 0xf2, 0x26, 0x89, 0x37, 0x79, 0xf0, 0x0f, 0x93, 0x57,
  214. 0x4c, 0x6b, 0x21, 0xaf, 0x69, 0x1a, 0x58, 0x2f, 0x93, 0x7f, 0x00, 0xf8, 0x69, 0x89, 0xc7, 0x10,
  215. 0x7f, 0xe6, 0x5d, 0x86, 0x26, 0x68, 0x3a, 0xa2, 0xfd, 0x4f, 0xfc, 0x04, 0xb6, 0x5a, 0xb6, 0x5a,
  216. 0xf3, 0x2c, 0xf2, 0xa2, 0xf7, 0x6e, 0x79, 0xaa, 0xc5, 0xf2, 0x8d, 0x39, 0x53, 0x0d, 0x13, 0x92,
  217. 0x86, 0xfc, 0xb3, 0xe8, 0x29, 0xca, 0x1f, 0xc1, 0xf0, 0xc6, 0x1e, 0xef, 0x40, 0xd4, 0xce, 0xfc,
  218. 0xe6, 0x6d, 0x1a, 0xb5, 0x33, 0x3f, 0x1f, 0xf9, 0xad, 0xfd, 0x7c, 0x94, 0x7f, 0x41, 0x90, 0x6e,
  219. 0x58, 0xe2, 0x63, 0x48, 0x5c, 0xa7, 0xb9, 0x27, 0x76, 0xca, 0xc3, 0xff, 0xbb, 0x8d, 0xbc, 0xed,
  220. 0x34, 0xa7, 0x1e, 0xc4, 0xbb, 0x30, 0xa8, 0xbd, 0x91, 0x2f, 0x19, 0xd1, 0x1f, 0x53, 0x5f, 0xec,
  221. 0xdf, 0x3d, 0xee, 0x8b, 0x85, 0xde, 0xdf, 0x83, 0xa4, 0xa7, 0xf0, 0x10, 0x92, 0x17, 0xeb, 0xd5,
  222. 0x6a, 0x7c, 0x07, 0xdf, 0x85, 0xd1, 0xc5, 0xfa, 0x2a, 0x9c, 0x33, 0x46, 0xa7, 0x33, 0xd8, 0xad,
  223. 0x54, 0xf3, 0x07, 0x81, 0x25, 0x7a, 0x1f, 0xd7, 0xd2, 0x7e, 0x8d, 0xf0, 0xbb, 0x92, 0xb2, 0x8e,
  224. 0xcc, 0xfb, 0xff, 0x4e, 0xb4, 0x26, 0x67, 0xd2, 0x5e, 0x0d, 0xfc, 0xb7, 0xf7, 0xf8, 0x7b, 0x00,
  225. 0x00, 0x00, 0xff, 0xff, 0xee, 0x90, 0x3f, 0xc9, 0x0c, 0x03, 0x00, 0x00,
  226. }