config.pb.go 12 KB

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