config.pb.go 12 KB

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