config.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.13.0
  5. // source: proxy/http/config.proto
  6. package http
  7. import (
  8. proto "github.com/golang/protobuf/proto"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. protocol "v2ray.com/core/common/protocol"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. // This is a compile-time assertion that a sufficiently up-to-date version
  22. // of the legacy proto package is being used.
  23. const _ = proto.ProtoPackageIsVersion4
  24. type Account struct {
  25. state protoimpl.MessageState
  26. sizeCache protoimpl.SizeCache
  27. unknownFields protoimpl.UnknownFields
  28. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  29. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  30. }
  31. func (x *Account) Reset() {
  32. *x = Account{}
  33. if protoimpl.UnsafeEnabled {
  34. mi := &file_proxy_http_config_proto_msgTypes[0]
  35. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  36. ms.StoreMessageInfo(mi)
  37. }
  38. }
  39. func (x *Account) String() string {
  40. return protoimpl.X.MessageStringOf(x)
  41. }
  42. func (*Account) ProtoMessage() {}
  43. func (x *Account) ProtoReflect() protoreflect.Message {
  44. mi := &file_proxy_http_config_proto_msgTypes[0]
  45. if protoimpl.UnsafeEnabled && x != nil {
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. if ms.LoadMessageInfo() == nil {
  48. ms.StoreMessageInfo(mi)
  49. }
  50. return ms
  51. }
  52. return mi.MessageOf(x)
  53. }
  54. // Deprecated: Use Account.ProtoReflect.Descriptor instead.
  55. func (*Account) Descriptor() ([]byte, []int) {
  56. return file_proxy_http_config_proto_rawDescGZIP(), []int{0}
  57. }
  58. func (x *Account) GetUsername() string {
  59. if x != nil {
  60. return x.Username
  61. }
  62. return ""
  63. }
  64. func (x *Account) GetPassword() string {
  65. if x != nil {
  66. return x.Password
  67. }
  68. return ""
  69. }
  70. // Config for HTTP proxy server.
  71. type ServerConfig struct {
  72. state protoimpl.MessageState
  73. sizeCache protoimpl.SizeCache
  74. unknownFields protoimpl.UnknownFields
  75. // Deprecated: Do not use.
  76. Timeout uint32 `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
  77. Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  78. AllowTransparent bool `protobuf:"varint,3,opt,name=allow_transparent,json=allowTransparent,proto3" json:"allow_transparent,omitempty"`
  79. UserLevel uint32 `protobuf:"varint,4,opt,name=user_level,json=userLevel,proto3" json:"user_level,omitempty"`
  80. }
  81. func (x *ServerConfig) Reset() {
  82. *x = ServerConfig{}
  83. if protoimpl.UnsafeEnabled {
  84. mi := &file_proxy_http_config_proto_msgTypes[1]
  85. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  86. ms.StoreMessageInfo(mi)
  87. }
  88. }
  89. func (x *ServerConfig) String() string {
  90. return protoimpl.X.MessageStringOf(x)
  91. }
  92. func (*ServerConfig) ProtoMessage() {}
  93. func (x *ServerConfig) ProtoReflect() protoreflect.Message {
  94. mi := &file_proxy_http_config_proto_msgTypes[1]
  95. if protoimpl.UnsafeEnabled && x != nil {
  96. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  97. if ms.LoadMessageInfo() == nil {
  98. ms.StoreMessageInfo(mi)
  99. }
  100. return ms
  101. }
  102. return mi.MessageOf(x)
  103. }
  104. // Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
  105. func (*ServerConfig) Descriptor() ([]byte, []int) {
  106. return file_proxy_http_config_proto_rawDescGZIP(), []int{1}
  107. }
  108. // Deprecated: Do not use.
  109. func (x *ServerConfig) GetTimeout() uint32 {
  110. if x != nil {
  111. return x.Timeout
  112. }
  113. return 0
  114. }
  115. func (x *ServerConfig) GetAccounts() map[string]string {
  116. if x != nil {
  117. return x.Accounts
  118. }
  119. return nil
  120. }
  121. func (x *ServerConfig) GetAllowTransparent() bool {
  122. if x != nil {
  123. return x.AllowTransparent
  124. }
  125. return false
  126. }
  127. func (x *ServerConfig) GetUserLevel() uint32 {
  128. if x != nil {
  129. return x.UserLevel
  130. }
  131. return 0
  132. }
  133. // ClientConfig is the protobuf config for HTTP proxy client.
  134. type ClientConfig struct {
  135. state protoimpl.MessageState
  136. sizeCache protoimpl.SizeCache
  137. unknownFields protoimpl.UnknownFields
  138. // Sever is a list of HTTP server addresses.
  139. Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
  140. }
  141. func (x *ClientConfig) Reset() {
  142. *x = ClientConfig{}
  143. if protoimpl.UnsafeEnabled {
  144. mi := &file_proxy_http_config_proto_msgTypes[2]
  145. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  146. ms.StoreMessageInfo(mi)
  147. }
  148. }
  149. func (x *ClientConfig) String() string {
  150. return protoimpl.X.MessageStringOf(x)
  151. }
  152. func (*ClientConfig) ProtoMessage() {}
  153. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  154. mi := &file_proxy_http_config_proto_msgTypes[2]
  155. if protoimpl.UnsafeEnabled && x != nil {
  156. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  157. if ms.LoadMessageInfo() == nil {
  158. ms.StoreMessageInfo(mi)
  159. }
  160. return ms
  161. }
  162. return mi.MessageOf(x)
  163. }
  164. // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
  165. func (*ClientConfig) Descriptor() ([]byte, []int) {
  166. return file_proxy_http_config_proto_rawDescGZIP(), []int{2}
  167. }
  168. func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  169. if x != nil {
  170. return x.Server
  171. }
  172. return nil
  173. }
  174. var File_proxy_http_config_proto protoreflect.FileDescriptor
  175. var file_proxy_http_config_proto_rawDesc = []byte{
  176. 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e,
  177. 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79,
  178. 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70,
  179. 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
  180. 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72,
  181. 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a,
  182. 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
  183. 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
  184. 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
  185. 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65,
  186. 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
  187. 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69,
  188. 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
  189. 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e,
  190. 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e,
  191. 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63,
  192. 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f,
  193. 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x72,
  194. 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
  195. 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e,
  196. 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
  197. 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c,
  198. 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72,
  199. 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
  200. 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
  201. 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52, 0x0a,
  202. 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a,
  203. 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
  204. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
  205. 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65,
  206. 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,
  207. 0x72, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63,
  208. 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01,
  209. 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65,
  210. 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x15, 0x56, 0x32,
  211. 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48,
  212. 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  213. }
  214. var (
  215. file_proxy_http_config_proto_rawDescOnce sync.Once
  216. file_proxy_http_config_proto_rawDescData = file_proxy_http_config_proto_rawDesc
  217. )
  218. func file_proxy_http_config_proto_rawDescGZIP() []byte {
  219. file_proxy_http_config_proto_rawDescOnce.Do(func() {
  220. file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_http_config_proto_rawDescData)
  221. })
  222. return file_proxy_http_config_proto_rawDescData
  223. }
  224. var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  225. var file_proxy_http_config_proto_goTypes = []interface{}{
  226. (*Account)(nil), // 0: v2ray.core.proxy.http.Account
  227. (*ServerConfig)(nil), // 1: v2ray.core.proxy.http.ServerConfig
  228. (*ClientConfig)(nil), // 2: v2ray.core.proxy.http.ClientConfig
  229. nil, // 3: v2ray.core.proxy.http.ServerConfig.AccountsEntry
  230. (*protocol.ServerEndpoint)(nil), // 4: v2ray.core.common.protocol.ServerEndpoint
  231. }
  232. var file_proxy_http_config_proto_depIdxs = []int32{
  233. 3, // 0: v2ray.core.proxy.http.ServerConfig.accounts:type_name -> v2ray.core.proxy.http.ServerConfig.AccountsEntry
  234. 4, // 1: v2ray.core.proxy.http.ClientConfig.server:type_name -> v2ray.core.common.protocol.ServerEndpoint
  235. 2, // [2:2] is the sub-list for method output_type
  236. 2, // [2:2] is the sub-list for method input_type
  237. 2, // [2:2] is the sub-list for extension type_name
  238. 2, // [2:2] is the sub-list for extension extendee
  239. 0, // [0:2] is the sub-list for field type_name
  240. }
  241. func init() { file_proxy_http_config_proto_init() }
  242. func file_proxy_http_config_proto_init() {
  243. if File_proxy_http_config_proto != nil {
  244. return
  245. }
  246. if !protoimpl.UnsafeEnabled {
  247. file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  248. switch v := v.(*Account); i {
  249. case 0:
  250. return &v.state
  251. case 1:
  252. return &v.sizeCache
  253. case 2:
  254. return &v.unknownFields
  255. default:
  256. return nil
  257. }
  258. }
  259. file_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  260. switch v := v.(*ServerConfig); i {
  261. case 0:
  262. return &v.state
  263. case 1:
  264. return &v.sizeCache
  265. case 2:
  266. return &v.unknownFields
  267. default:
  268. return nil
  269. }
  270. }
  271. file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  272. switch v := v.(*ClientConfig); i {
  273. case 0:
  274. return &v.state
  275. case 1:
  276. return &v.sizeCache
  277. case 2:
  278. return &v.unknownFields
  279. default:
  280. return nil
  281. }
  282. }
  283. }
  284. type x struct{}
  285. out := protoimpl.TypeBuilder{
  286. File: protoimpl.DescBuilder{
  287. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  288. RawDescriptor: file_proxy_http_config_proto_rawDesc,
  289. NumEnums: 0,
  290. NumMessages: 4,
  291. NumExtensions: 0,
  292. NumServices: 0,
  293. },
  294. GoTypes: file_proxy_http_config_proto_goTypes,
  295. DependencyIndexes: file_proxy_http_config_proto_depIdxs,
  296. MessageInfos: file_proxy_http_config_proto_msgTypes,
  297. }.Build()
  298. File_proxy_http_config_proto = out.File
  299. file_proxy_http_config_proto_rawDesc = nil
  300. file_proxy_http_config_proto_goTypes = nil
  301. file_proxy_http_config_proto_depIdxs = nil
  302. }