config.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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: Do not use.
  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: Do not use.
  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. }
  132. func (x *ClientConfig) Reset() {
  133. *x = ClientConfig{}
  134. if protoimpl.UnsafeEnabled {
  135. mi := &file_proxy_http_config_proto_msgTypes[2]
  136. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  137. ms.StoreMessageInfo(mi)
  138. }
  139. }
  140. func (x *ClientConfig) String() string {
  141. return protoimpl.X.MessageStringOf(x)
  142. }
  143. func (*ClientConfig) ProtoMessage() {}
  144. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  145. mi := &file_proxy_http_config_proto_msgTypes[2]
  146. if protoimpl.UnsafeEnabled && x != nil {
  147. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  148. if ms.LoadMessageInfo() == nil {
  149. ms.StoreMessageInfo(mi)
  150. }
  151. return ms
  152. }
  153. return mi.MessageOf(x)
  154. }
  155. // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
  156. func (*ClientConfig) Descriptor() ([]byte, []int) {
  157. return file_proxy_http_config_proto_rawDescGZIP(), []int{2}
  158. }
  159. func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  160. if x != nil {
  161. return x.Server
  162. }
  163. return nil
  164. }
  165. var File_proxy_http_config_proto protoreflect.FileDescriptor
  166. var file_proxy_http_config_proto_rawDesc = []byte{
  167. 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e,
  168. 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61, 0x79,
  169. 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70,
  170. 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
  171. 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72,
  172. 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a,
  173. 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
  174. 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
  175. 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
  176. 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65,
  177. 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
  178. 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69,
  179. 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4d, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
  180. 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e,
  181. 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e,
  182. 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63,
  183. 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f,
  184. 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x72,
  185. 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
  186. 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e,
  187. 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
  188. 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c,
  189. 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72,
  190. 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
  191. 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
  192. 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52, 0x0a,
  193. 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a,
  194. 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
  195. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
  196. 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65,
  197. 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,
  198. 0x72, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63,
  199. 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01,
  200. 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66,
  201. 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x35,
  202. 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x15, 0x56, 0x32,
  203. 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48,
  204. 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  205. }
  206. var (
  207. file_proxy_http_config_proto_rawDescOnce sync.Once
  208. file_proxy_http_config_proto_rawDescData = file_proxy_http_config_proto_rawDesc
  209. )
  210. func file_proxy_http_config_proto_rawDescGZIP() []byte {
  211. file_proxy_http_config_proto_rawDescOnce.Do(func() {
  212. file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_http_config_proto_rawDescData)
  213. })
  214. return file_proxy_http_config_proto_rawDescData
  215. }
  216. var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  217. var file_proxy_http_config_proto_goTypes = []interface{}{
  218. (*Account)(nil), // 0: v2ray.core.proxy.http.Account
  219. (*ServerConfig)(nil), // 1: v2ray.core.proxy.http.ServerConfig
  220. (*ClientConfig)(nil), // 2: v2ray.core.proxy.http.ClientConfig
  221. nil, // 3: v2ray.core.proxy.http.ServerConfig.AccountsEntry
  222. (*protocol.ServerEndpoint)(nil), // 4: v2ray.core.common.protocol.ServerEndpoint
  223. }
  224. var file_proxy_http_config_proto_depIdxs = []int32{
  225. 3, // 0: v2ray.core.proxy.http.ServerConfig.accounts:type_name -> v2ray.core.proxy.http.ServerConfig.AccountsEntry
  226. 4, // 1: v2ray.core.proxy.http.ClientConfig.server:type_name -> v2ray.core.common.protocol.ServerEndpoint
  227. 2, // [2:2] is the sub-list for method output_type
  228. 2, // [2:2] is the sub-list for method input_type
  229. 2, // [2:2] is the sub-list for extension type_name
  230. 2, // [2:2] is the sub-list for extension extendee
  231. 0, // [0:2] is the sub-list for field type_name
  232. }
  233. func init() { file_proxy_http_config_proto_init() }
  234. func file_proxy_http_config_proto_init() {
  235. if File_proxy_http_config_proto != nil {
  236. return
  237. }
  238. if !protoimpl.UnsafeEnabled {
  239. file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  240. switch v := v.(*Account); i {
  241. case 0:
  242. return &v.state
  243. case 1:
  244. return &v.sizeCache
  245. case 2:
  246. return &v.unknownFields
  247. default:
  248. return nil
  249. }
  250. }
  251. file_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  252. switch v := v.(*ServerConfig); i {
  253. case 0:
  254. return &v.state
  255. case 1:
  256. return &v.sizeCache
  257. case 2:
  258. return &v.unknownFields
  259. default:
  260. return nil
  261. }
  262. }
  263. file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  264. switch v := v.(*ClientConfig); i {
  265. case 0:
  266. return &v.state
  267. case 1:
  268. return &v.sizeCache
  269. case 2:
  270. return &v.unknownFields
  271. default:
  272. return nil
  273. }
  274. }
  275. }
  276. type x struct{}
  277. out := protoimpl.TypeBuilder{
  278. File: protoimpl.DescBuilder{
  279. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  280. RawDescriptor: file_proxy_http_config_proto_rawDesc,
  281. NumEnums: 0,
  282. NumMessages: 4,
  283. NumExtensions: 0,
  284. NumServices: 0,
  285. },
  286. GoTypes: file_proxy_http_config_proto_goTypes,
  287. DependencyIndexes: file_proxy_http_config_proto_depIdxs,
  288. MessageInfos: file_proxy_http_config_proto_msgTypes,
  289. }.Build()
  290. File_proxy_http_config_proto = out.File
  291. file_proxy_http_config_proto_rawDesc = nil
  292. file_proxy_http_config_proto_goTypes = nil
  293. file_proxy_http_config_proto_depIdxs = nil
  294. }