config.pb.go 12 KB

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