config.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.14.0
  5. // source: proxy/http/config.proto
  6. package http
  7. import (
  8. proto "github.com/golang/protobuf/proto"
  9. protocol "github.com/xtls/xray-core/common/protocol"
  10. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  11. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  12. reflect "reflect"
  13. sync "sync"
  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, 0x0f, 0x78, 0x72, 0x61, 0x79, 0x2e,
  178. 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d,
  179. 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76,
  180. 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a,
  181. 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
  182. 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
  183. 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
  184. 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
  185. 0x22, 0xfe, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69,
  186. 0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01,
  187. 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12,
  188. 0x47, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
  189. 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68,
  190. 0x74, 0x74, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
  191. 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08,
  192. 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f,
  193. 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
  194. 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70,
  195. 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65,
  196. 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c,
  197. 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
  198. 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
  199. 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
  200. 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
  201. 0x01, 0x22, 0x4c, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
  202. 0x67, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28,
  203. 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
  204. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45,
  205. 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42,
  206. 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78,
  207. 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
  208. 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63,
  209. 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02,
  210. 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48, 0x74, 0x74, 0x70,
  211. 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  212. }
  213. var (
  214. file_proxy_http_config_proto_rawDescOnce sync.Once
  215. file_proxy_http_config_proto_rawDescData = file_proxy_http_config_proto_rawDesc
  216. )
  217. func file_proxy_http_config_proto_rawDescGZIP() []byte {
  218. file_proxy_http_config_proto_rawDescOnce.Do(func() {
  219. file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_http_config_proto_rawDescData)
  220. })
  221. return file_proxy_http_config_proto_rawDescData
  222. }
  223. var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  224. var file_proxy_http_config_proto_goTypes = []interface{}{
  225. (*Account)(nil), // 0: xray.proxy.http.Account
  226. (*ServerConfig)(nil), // 1: xray.proxy.http.ServerConfig
  227. (*ClientConfig)(nil), // 2: xray.proxy.http.ClientConfig
  228. nil, // 3: xray.proxy.http.ServerConfig.AccountsEntry
  229. (*protocol.ServerEndpoint)(nil), // 4: xray.common.protocol.ServerEndpoint
  230. }
  231. var file_proxy_http_config_proto_depIdxs = []int32{
  232. 3, // 0: xray.proxy.http.ServerConfig.accounts:type_name -> xray.proxy.http.ServerConfig.AccountsEntry
  233. 4, // 1: xray.proxy.http.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
  234. 2, // [2:2] is the sub-list for method output_type
  235. 2, // [2:2] is the sub-list for method input_type
  236. 2, // [2:2] is the sub-list for extension type_name
  237. 2, // [2:2] is the sub-list for extension extendee
  238. 0, // [0:2] is the sub-list for field type_name
  239. }
  240. func init() { file_proxy_http_config_proto_init() }
  241. func file_proxy_http_config_proto_init() {
  242. if File_proxy_http_config_proto != nil {
  243. return
  244. }
  245. if !protoimpl.UnsafeEnabled {
  246. file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  247. switch v := v.(*Account); i {
  248. case 0:
  249. return &v.state
  250. case 1:
  251. return &v.sizeCache
  252. case 2:
  253. return &v.unknownFields
  254. default:
  255. return nil
  256. }
  257. }
  258. file_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  259. switch v := v.(*ServerConfig); i {
  260. case 0:
  261. return &v.state
  262. case 1:
  263. return &v.sizeCache
  264. case 2:
  265. return &v.unknownFields
  266. default:
  267. return nil
  268. }
  269. }
  270. file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  271. switch v := v.(*ClientConfig); i {
  272. case 0:
  273. return &v.state
  274. case 1:
  275. return &v.sizeCache
  276. case 2:
  277. return &v.unknownFields
  278. default:
  279. return nil
  280. }
  281. }
  282. }
  283. type x struct{}
  284. out := protoimpl.TypeBuilder{
  285. File: protoimpl.DescBuilder{
  286. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  287. RawDescriptor: file_proxy_http_config_proto_rawDesc,
  288. NumEnums: 0,
  289. NumMessages: 4,
  290. NumExtensions: 0,
  291. NumServices: 0,
  292. },
  293. GoTypes: file_proxy_http_config_proto_goTypes,
  294. DependencyIndexes: file_proxy_http_config_proto_depIdxs,
  295. MessageInfos: file_proxy_http_config_proto_msgTypes,
  296. }.Build()
  297. File_proxy_http_config_proto = out.File
  298. file_proxy_http_config_proto_rawDesc = nil
  299. file_proxy_http_config_proto_goTypes = nil
  300. file_proxy_http_config_proto_depIdxs = nil
  301. }