config.pb.go 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. package dns
  2. import (
  3. net "github.com/v2fly/v2ray-core/v5/common/net"
  4. _ "github.com/v2fly/v2ray-core/v5/common/protoext"
  5. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  6. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  7. reflect "reflect"
  8. sync "sync"
  9. unsafe "unsafe"
  10. )
  11. const (
  12. // Verify that this generated code is sufficiently up-to-date.
  13. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  14. // Verify that runtime/protoimpl is sufficiently up-to-date.
  15. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  16. )
  17. type Config struct {
  18. state protoimpl.MessageState `protogen:"open.v1"`
  19. // Server is the DNS server address. If specified, this address overrides the
  20. // original one.
  21. Server *net.Endpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  22. UserLevel uint32 `protobuf:"varint,2,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
  23. OverrideResponseTtl bool `protobuf:"varint,4,opt,name=override_response_ttl,json=overrideResponseTtl,proto3" json:"override_response_ttl,omitempty"`
  24. ResponseTtl uint32 `protobuf:"varint,3,opt,name=response_ttl,json=responseTtl,proto3" json:"response_ttl,omitempty"`
  25. unknownFields protoimpl.UnknownFields
  26. sizeCache protoimpl.SizeCache
  27. }
  28. func (x *Config) Reset() {
  29. *x = Config{}
  30. mi := &file_proxy_dns_config_proto_msgTypes[0]
  31. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  32. ms.StoreMessageInfo(mi)
  33. }
  34. func (x *Config) String() string {
  35. return protoimpl.X.MessageStringOf(x)
  36. }
  37. func (*Config) ProtoMessage() {}
  38. func (x *Config) ProtoReflect() protoreflect.Message {
  39. mi := &file_proxy_dns_config_proto_msgTypes[0]
  40. if x != nil {
  41. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  42. if ms.LoadMessageInfo() == nil {
  43. ms.StoreMessageInfo(mi)
  44. }
  45. return ms
  46. }
  47. return mi.MessageOf(x)
  48. }
  49. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  50. func (*Config) Descriptor() ([]byte, []int) {
  51. return file_proxy_dns_config_proto_rawDescGZIP(), []int{0}
  52. }
  53. func (x *Config) GetServer() *net.Endpoint {
  54. if x != nil {
  55. return x.Server
  56. }
  57. return nil
  58. }
  59. func (x *Config) GetUserLevel() uint32 {
  60. if x != nil {
  61. return x.UserLevel
  62. }
  63. return 0
  64. }
  65. func (x *Config) GetOverrideResponseTtl() bool {
  66. if x != nil {
  67. return x.OverrideResponseTtl
  68. }
  69. return false
  70. }
  71. func (x *Config) GetResponseTtl() uint32 {
  72. if x != nil {
  73. return x.ResponseTtl
  74. }
  75. return 0
  76. }
  77. type SimplifiedConfig struct {
  78. state protoimpl.MessageState `protogen:"open.v1"`
  79. OverrideResponseTtl bool `protobuf:"varint,4,opt,name=override_response_ttl,json=overrideResponseTtl,proto3" json:"override_response_ttl,omitempty"`
  80. ResponseTtl uint32 `protobuf:"varint,3,opt,name=response_ttl,json=responseTtl,proto3" json:"response_ttl,omitempty"`
  81. unknownFields protoimpl.UnknownFields
  82. sizeCache protoimpl.SizeCache
  83. }
  84. func (x *SimplifiedConfig) Reset() {
  85. *x = SimplifiedConfig{}
  86. mi := &file_proxy_dns_config_proto_msgTypes[1]
  87. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  88. ms.StoreMessageInfo(mi)
  89. }
  90. func (x *SimplifiedConfig) String() string {
  91. return protoimpl.X.MessageStringOf(x)
  92. }
  93. func (*SimplifiedConfig) ProtoMessage() {}
  94. func (x *SimplifiedConfig) ProtoReflect() protoreflect.Message {
  95. mi := &file_proxy_dns_config_proto_msgTypes[1]
  96. if x != nil {
  97. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  98. if ms.LoadMessageInfo() == nil {
  99. ms.StoreMessageInfo(mi)
  100. }
  101. return ms
  102. }
  103. return mi.MessageOf(x)
  104. }
  105. // Deprecated: Use SimplifiedConfig.ProtoReflect.Descriptor instead.
  106. func (*SimplifiedConfig) Descriptor() ([]byte, []int) {
  107. return file_proxy_dns_config_proto_rawDescGZIP(), []int{1}
  108. }
  109. func (x *SimplifiedConfig) GetOverrideResponseTtl() bool {
  110. if x != nil {
  111. return x.OverrideResponseTtl
  112. }
  113. return false
  114. }
  115. func (x *SimplifiedConfig) GetResponseTtl() uint32 {
  116. if x != nil {
  117. return x.ResponseTtl
  118. }
  119. return 0
  120. }
  121. var File_proxy_dns_config_proto protoreflect.FileDescriptor
  122. var file_proxy_dns_config_proto_rawDesc = string([]byte{
  123. 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66,
  124. 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e,
  125. 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x1a, 0x1c,
  126. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69,
  127. 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x6f,
  128. 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x65, 0x78, 0x74, 0x2f, 0x65, 0x78,
  129. 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7,
  130. 0x01, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x65, 0x72,
  131. 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61,
  132. 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65,
  133. 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76,
  134. 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c,
  135. 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65,
  136. 0x6c, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x72, 0x65,
  137. 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
  138. 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
  139. 0x73, 0x65, 0x54, 0x74, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
  140. 0x65, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x73,
  141. 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x74, 0x6c, 0x22, 0x7e, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x70,
  142. 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x15,
  143. 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
  144. 0x65, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6f, 0x76, 0x65,
  145. 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x74, 0x6c,
  146. 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x74, 0x6c,
  147. 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
  148. 0x54, 0x74, 0x6c, 0x3a, 0x13, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x62, 0x6f,
  149. 0x75, 0x6e, 0x64, 0x12, 0x03, 0x64, 0x6e, 0x73, 0x42, 0x5d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e,
  150. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79,
  151. 0x2e, 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
  152. 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63,
  153. 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6e, 0x73,
  154. 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72,
  155. 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  156. })
  157. var (
  158. file_proxy_dns_config_proto_rawDescOnce sync.Once
  159. file_proxy_dns_config_proto_rawDescData []byte
  160. )
  161. func file_proxy_dns_config_proto_rawDescGZIP() []byte {
  162. file_proxy_dns_config_proto_rawDescOnce.Do(func() {
  163. file_proxy_dns_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proxy_dns_config_proto_rawDesc), len(file_proxy_dns_config_proto_rawDesc)))
  164. })
  165. return file_proxy_dns_config_proto_rawDescData
  166. }
  167. var file_proxy_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  168. var file_proxy_dns_config_proto_goTypes = []any{
  169. (*Config)(nil), // 0: v2ray.core.proxy.dns.Config
  170. (*SimplifiedConfig)(nil), // 1: v2ray.core.proxy.dns.SimplifiedConfig
  171. (*net.Endpoint)(nil), // 2: v2ray.core.common.net.Endpoint
  172. }
  173. var file_proxy_dns_config_proto_depIdxs = []int32{
  174. 2, // 0: v2ray.core.proxy.dns.Config.server:type_name -> v2ray.core.common.net.Endpoint
  175. 1, // [1:1] is the sub-list for method output_type
  176. 1, // [1:1] is the sub-list for method input_type
  177. 1, // [1:1] is the sub-list for extension type_name
  178. 1, // [1:1] is the sub-list for extension extendee
  179. 0, // [0:1] is the sub-list for field type_name
  180. }
  181. func init() { file_proxy_dns_config_proto_init() }
  182. func file_proxy_dns_config_proto_init() {
  183. if File_proxy_dns_config_proto != nil {
  184. return
  185. }
  186. type x struct{}
  187. out := protoimpl.TypeBuilder{
  188. File: protoimpl.DescBuilder{
  189. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  190. RawDescriptor: unsafe.Slice(unsafe.StringData(file_proxy_dns_config_proto_rawDesc), len(file_proxy_dns_config_proto_rawDesc)),
  191. NumEnums: 0,
  192. NumMessages: 2,
  193. NumExtensions: 0,
  194. NumServices: 0,
  195. },
  196. GoTypes: file_proxy_dns_config_proto_goTypes,
  197. DependencyIndexes: file_proxy_dns_config_proto_depIdxs,
  198. MessageInfos: file_proxy_dns_config_proto_msgTypes,
  199. }.Build()
  200. File_proxy_dns_config_proto = out.File
  201. file_proxy_dns_config_proto_goTypes = nil
  202. file_proxy_dns_config_proto_depIdxs = nil
  203. }