config.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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 DomainMatchingType int32
  16. const (
  17. DomainMatchingType_Full DomainMatchingType = 0
  18. DomainMatchingType_Subdomain DomainMatchingType = 1
  19. DomainMatchingType_Keyword DomainMatchingType = 2
  20. )
  21. var DomainMatchingType_name = map[int32]string{
  22. 0: "Full",
  23. 1: "Subdomain",
  24. 2: "Keyword",
  25. }
  26. var DomainMatchingType_value = map[string]int32{
  27. "Full": 0,
  28. "Subdomain": 1,
  29. "Keyword": 2,
  30. }
  31. func (x DomainMatchingType) String() string {
  32. return proto.EnumName(DomainMatchingType_name, int32(x))
  33. }
  34. func (DomainMatchingType) EnumDescriptor() ([]byte, []int) {
  35. return fileDescriptor_config_6f85f947d5116df4, []int{0}
  36. }
  37. type NameServer struct {
  38. Address *net.Endpoint `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  39. PrioritizedDomain []*NameServer_PriorityDomain `protobuf:"bytes,2,rep,name=prioritized_domain,json=prioritizedDomain,proto3" json:"prioritized_domain,omitempty"`
  40. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  41. XXX_unrecognized []byte `json:"-"`
  42. XXX_sizecache int32 `json:"-"`
  43. }
  44. func (m *NameServer) Reset() { *m = NameServer{} }
  45. func (m *NameServer) String() string { return proto.CompactTextString(m) }
  46. func (*NameServer) ProtoMessage() {}
  47. func (*NameServer) Descriptor() ([]byte, []int) {
  48. return fileDescriptor_config_6f85f947d5116df4, []int{0}
  49. }
  50. func (m *NameServer) XXX_Unmarshal(b []byte) error {
  51. return xxx_messageInfo_NameServer.Unmarshal(m, b)
  52. }
  53. func (m *NameServer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  54. return xxx_messageInfo_NameServer.Marshal(b, m, deterministic)
  55. }
  56. func (dst *NameServer) XXX_Merge(src proto.Message) {
  57. xxx_messageInfo_NameServer.Merge(dst, src)
  58. }
  59. func (m *NameServer) XXX_Size() int {
  60. return xxx_messageInfo_NameServer.Size(m)
  61. }
  62. func (m *NameServer) XXX_DiscardUnknown() {
  63. xxx_messageInfo_NameServer.DiscardUnknown(m)
  64. }
  65. var xxx_messageInfo_NameServer proto.InternalMessageInfo
  66. func (m *NameServer) GetAddress() *net.Endpoint {
  67. if m != nil {
  68. return m.Address
  69. }
  70. return nil
  71. }
  72. func (m *NameServer) GetPrioritizedDomain() []*NameServer_PriorityDomain {
  73. if m != nil {
  74. return m.PrioritizedDomain
  75. }
  76. return nil
  77. }
  78. type NameServer_PriorityDomain struct {
  79. Type DomainMatchingType `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.app.dns.DomainMatchingType" json:"type,omitempty"`
  80. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
  81. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  82. XXX_unrecognized []byte `json:"-"`
  83. XXX_sizecache int32 `json:"-"`
  84. }
  85. func (m *NameServer_PriorityDomain) Reset() { *m = NameServer_PriorityDomain{} }
  86. func (m *NameServer_PriorityDomain) String() string { return proto.CompactTextString(m) }
  87. func (*NameServer_PriorityDomain) ProtoMessage() {}
  88. func (*NameServer_PriorityDomain) Descriptor() ([]byte, []int) {
  89. return fileDescriptor_config_6f85f947d5116df4, []int{0, 0}
  90. }
  91. func (m *NameServer_PriorityDomain) XXX_Unmarshal(b []byte) error {
  92. return xxx_messageInfo_NameServer_PriorityDomain.Unmarshal(m, b)
  93. }
  94. func (m *NameServer_PriorityDomain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  95. return xxx_messageInfo_NameServer_PriorityDomain.Marshal(b, m, deterministic)
  96. }
  97. func (dst *NameServer_PriorityDomain) XXX_Merge(src proto.Message) {
  98. xxx_messageInfo_NameServer_PriorityDomain.Merge(dst, src)
  99. }
  100. func (m *NameServer_PriorityDomain) XXX_Size() int {
  101. return xxx_messageInfo_NameServer_PriorityDomain.Size(m)
  102. }
  103. func (m *NameServer_PriorityDomain) XXX_DiscardUnknown() {
  104. xxx_messageInfo_NameServer_PriorityDomain.DiscardUnknown(m)
  105. }
  106. var xxx_messageInfo_NameServer_PriorityDomain proto.InternalMessageInfo
  107. func (m *NameServer_PriorityDomain) GetType() DomainMatchingType {
  108. if m != nil {
  109. return m.Type
  110. }
  111. return DomainMatchingType_Full
  112. }
  113. func (m *NameServer_PriorityDomain) GetDomain() string {
  114. if m != nil {
  115. return m.Domain
  116. }
  117. return ""
  118. }
  119. type Config struct {
  120. // Nameservers used by this DNS. Only traditional UDP servers are support at the moment.
  121. // A special value 'localhost' as a domain address can be set to use DNS on local system.
  122. NameServers []*net.Endpoint `protobuf:"bytes,1,rep,name=NameServers,proto3" json:"NameServers,omitempty"` // Deprecated: Do not use.
  123. // NameServer list used by this DNS client.
  124. NameServer []*NameServer `protobuf:"bytes,5,rep,name=name_server,json=nameServer,proto3" json:"name_server,omitempty"`
  125. // Static hosts. Domain to IP.
  126. // Deprecated. Use static_hosts.
  127. 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.
  128. // Client IP for EDNS client subnet. Must be 4 bytes (IPv4) or 16 bytes (IPv6).
  129. ClientIp []byte `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
  130. StaticHosts []*Config_HostMapping `protobuf:"bytes,4,rep,name=static_hosts,json=staticHosts,proto3" json:"static_hosts,omitempty"`
  131. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  132. XXX_unrecognized []byte `json:"-"`
  133. XXX_sizecache int32 `json:"-"`
  134. }
  135. func (m *Config) Reset() { *m = Config{} }
  136. func (m *Config) String() string { return proto.CompactTextString(m) }
  137. func (*Config) ProtoMessage() {}
  138. func (*Config) Descriptor() ([]byte, []int) {
  139. return fileDescriptor_config_6f85f947d5116df4, []int{1}
  140. }
  141. func (m *Config) XXX_Unmarshal(b []byte) error {
  142. return xxx_messageInfo_Config.Unmarshal(m, b)
  143. }
  144. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  145. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  146. }
  147. func (dst *Config) XXX_Merge(src proto.Message) {
  148. xxx_messageInfo_Config.Merge(dst, src)
  149. }
  150. func (m *Config) XXX_Size() int {
  151. return xxx_messageInfo_Config.Size(m)
  152. }
  153. func (m *Config) XXX_DiscardUnknown() {
  154. xxx_messageInfo_Config.DiscardUnknown(m)
  155. }
  156. var xxx_messageInfo_Config proto.InternalMessageInfo
  157. // Deprecated: Do not use.
  158. func (m *Config) GetNameServers() []*net.Endpoint {
  159. if m != nil {
  160. return m.NameServers
  161. }
  162. return nil
  163. }
  164. func (m *Config) GetNameServer() []*NameServer {
  165. if m != nil {
  166. return m.NameServer
  167. }
  168. return nil
  169. }
  170. // Deprecated: Do not use.
  171. func (m *Config) GetHosts() map[string]*net.IPOrDomain {
  172. if m != nil {
  173. return m.Hosts
  174. }
  175. return nil
  176. }
  177. func (m *Config) GetClientIp() []byte {
  178. if m != nil {
  179. return m.ClientIp
  180. }
  181. return nil
  182. }
  183. func (m *Config) GetStaticHosts() []*Config_HostMapping {
  184. if m != nil {
  185. return m.StaticHosts
  186. }
  187. return nil
  188. }
  189. type Config_HostMapping struct {
  190. Type DomainMatchingType `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.app.dns.DomainMatchingType" json:"type,omitempty"`
  191. Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
  192. Ip [][]byte `protobuf:"bytes,3,rep,name=ip,proto3" json:"ip,omitempty"`
  193. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  194. XXX_unrecognized []byte `json:"-"`
  195. XXX_sizecache int32 `json:"-"`
  196. }
  197. func (m *Config_HostMapping) Reset() { *m = Config_HostMapping{} }
  198. func (m *Config_HostMapping) String() string { return proto.CompactTextString(m) }
  199. func (*Config_HostMapping) ProtoMessage() {}
  200. func (*Config_HostMapping) Descriptor() ([]byte, []int) {
  201. return fileDescriptor_config_6f85f947d5116df4, []int{1, 1}
  202. }
  203. func (m *Config_HostMapping) XXX_Unmarshal(b []byte) error {
  204. return xxx_messageInfo_Config_HostMapping.Unmarshal(m, b)
  205. }
  206. func (m *Config_HostMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  207. return xxx_messageInfo_Config_HostMapping.Marshal(b, m, deterministic)
  208. }
  209. func (dst *Config_HostMapping) XXX_Merge(src proto.Message) {
  210. xxx_messageInfo_Config_HostMapping.Merge(dst, src)
  211. }
  212. func (m *Config_HostMapping) XXX_Size() int {
  213. return xxx_messageInfo_Config_HostMapping.Size(m)
  214. }
  215. func (m *Config_HostMapping) XXX_DiscardUnknown() {
  216. xxx_messageInfo_Config_HostMapping.DiscardUnknown(m)
  217. }
  218. var xxx_messageInfo_Config_HostMapping proto.InternalMessageInfo
  219. func (m *Config_HostMapping) GetType() DomainMatchingType {
  220. if m != nil {
  221. return m.Type
  222. }
  223. return DomainMatchingType_Full
  224. }
  225. func (m *Config_HostMapping) GetDomain() string {
  226. if m != nil {
  227. return m.Domain
  228. }
  229. return ""
  230. }
  231. func (m *Config_HostMapping) GetIp() [][]byte {
  232. if m != nil {
  233. return m.Ip
  234. }
  235. return nil
  236. }
  237. func init() {
  238. proto.RegisterType((*NameServer)(nil), "v2ray.core.app.dns.NameServer")
  239. proto.RegisterType((*NameServer_PriorityDomain)(nil), "v2ray.core.app.dns.NameServer.PriorityDomain")
  240. proto.RegisterType((*Config)(nil), "v2ray.core.app.dns.Config")
  241. proto.RegisterMapType((map[string]*net.IPOrDomain)(nil), "v2ray.core.app.dns.Config.HostsEntry")
  242. proto.RegisterType((*Config_HostMapping)(nil), "v2ray.core.app.dns.Config.HostMapping")
  243. proto.RegisterEnum("v2ray.core.app.dns.DomainMatchingType", DomainMatchingType_name, DomainMatchingType_value)
  244. }
  245. func init() {
  246. proto.RegisterFile("v2ray.com/core/app/dns/config.proto", fileDescriptor_config_6f85f947d5116df4)
  247. }
  248. var fileDescriptor_config_6f85f947d5116df4 = []byte{
  249. // 516 bytes of a gzipped FileDescriptorProto
  250. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0xd1, 0x6e, 0xd3, 0x3e,
  251. 0x18, 0xc5, 0xff, 0x49, 0xda, 0x6e, 0xfd, 0xd2, 0x7f, 0x55, 0x7c, 0x31, 0x55, 0x45, 0x82, 0x32,
  252. 0xc4, 0xa8, 0x40, 0x38, 0x52, 0x40, 0x02, 0x7a, 0x33, 0xb1, 0xad, 0x88, 0x0a, 0x0d, 0xaa, 0x0c,
  253. 0x71, 0x01, 0x48, 0x95, 0x17, 0x9b, 0xce, 0xa2, 0xb1, 0x8d, 0xed, 0x16, 0x85, 0x37, 0x40, 0xbc,
  254. 0x09, 0x4f, 0x89, 0x6a, 0x77, 0xb4, 0xb0, 0x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 0xfe, 0x17, 0xbb, 0x47, 0x4d, 0x08, 0x5d, 0x41, 0x51, 0xaf, 0x91,
  277. 0x85, 0x5c, 0xdd, 0xe9, 0x03, 0xba, 0x38, 0x03, 0x6d, 0x43, 0xe5, 0xe9, 0x6c, 0x3a, 0x6d, 0xfd,
  278. 0x87, 0xfe, 0x87, 0xfa, 0xc9, 0xec, 0xd4, 0xc3, 0xad, 0x00, 0xc5, 0xb0, 0xf5, 0x9c, 0x95, 0x9f,
  279. 0xa4, 0xa6, 0xad, 0xf0, 0xe0, 0x01, 0xec, 0xe4, 0xb2, 0xd8, 0x10, 0x6b, 0x14, 0xbc, 0x89, 0xa8,
  280. 0x30, 0xdf, 0x42, 0xf4, 0x3a, 0xcd, 0x48, 0x89, 0x0f, 0x17, 0xff, 0x3d, 0x51, 0x0a, 0x1f, 0x09,
  281. 0x73, 0x5a, 0x73, 0x9f, 0xe4, 0xfd, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x78, 0xfa, 0x21, 0x21,
  282. 0x23, 0x04, 0x00, 0x00,
  283. }