config.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.28.1
  4. // protoc v3.21.12
  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. type Header struct {
  130. state protoimpl.MessageState
  131. sizeCache protoimpl.SizeCache
  132. unknownFields protoimpl.UnknownFields
  133. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  134. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  135. }
  136. func (x *Header) Reset() {
  137. *x = Header{}
  138. if protoimpl.UnsafeEnabled {
  139. mi := &file_proxy_http_config_proto_msgTypes[2]
  140. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  141. ms.StoreMessageInfo(mi)
  142. }
  143. }
  144. func (x *Header) String() string {
  145. return protoimpl.X.MessageStringOf(x)
  146. }
  147. func (*Header) ProtoMessage() {}
  148. func (x *Header) ProtoReflect() protoreflect.Message {
  149. mi := &file_proxy_http_config_proto_msgTypes[2]
  150. if protoimpl.UnsafeEnabled && x != nil {
  151. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  152. if ms.LoadMessageInfo() == nil {
  153. ms.StoreMessageInfo(mi)
  154. }
  155. return ms
  156. }
  157. return mi.MessageOf(x)
  158. }
  159. // Deprecated: Use Header.ProtoReflect.Descriptor instead.
  160. func (*Header) Descriptor() ([]byte, []int) {
  161. return file_proxy_http_config_proto_rawDescGZIP(), []int{2}
  162. }
  163. func (x *Header) GetKey() string {
  164. if x != nil {
  165. return x.Key
  166. }
  167. return ""
  168. }
  169. func (x *Header) GetValue() string {
  170. if x != nil {
  171. return x.Value
  172. }
  173. return ""
  174. }
  175. // ClientConfig is the protobuf config for HTTP proxy client.
  176. type ClientConfig struct {
  177. state protoimpl.MessageState
  178. sizeCache protoimpl.SizeCache
  179. unknownFields protoimpl.UnknownFields
  180. // Sever is a list of HTTP server addresses.
  181. Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
  182. Header []*Header `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty"`
  183. }
  184. func (x *ClientConfig) Reset() {
  185. *x = ClientConfig{}
  186. if protoimpl.UnsafeEnabled {
  187. mi := &file_proxy_http_config_proto_msgTypes[3]
  188. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  189. ms.StoreMessageInfo(mi)
  190. }
  191. }
  192. func (x *ClientConfig) String() string {
  193. return protoimpl.X.MessageStringOf(x)
  194. }
  195. func (*ClientConfig) ProtoMessage() {}
  196. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  197. mi := &file_proxy_http_config_proto_msgTypes[3]
  198. if protoimpl.UnsafeEnabled && x != nil {
  199. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  200. if ms.LoadMessageInfo() == nil {
  201. ms.StoreMessageInfo(mi)
  202. }
  203. return ms
  204. }
  205. return mi.MessageOf(x)
  206. }
  207. // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
  208. func (*ClientConfig) Descriptor() ([]byte, []int) {
  209. return file_proxy_http_config_proto_rawDescGZIP(), []int{3}
  210. }
  211. func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint {
  212. if x != nil {
  213. return x.Server
  214. }
  215. return nil
  216. }
  217. func (x *ClientConfig) GetHeader() []*Header {
  218. if x != nil {
  219. return x.Header
  220. }
  221. return nil
  222. }
  223. var File_proxy_http_config_proto protoreflect.FileDescriptor
  224. var file_proxy_http_config_proto_rawDesc = []byte{
  225. 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e,
  226. 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x78, 0x72, 0x61, 0x79, 0x2e,
  227. 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x1a, 0x21, 0x63, 0x6f, 0x6d, 0x6d,
  228. 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76,
  229. 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a,
  230. 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
  231. 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
  232. 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
  233. 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
  234. 0x22, 0xfe, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69,
  235. 0x67, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01,
  236. 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12,
  237. 0x47, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
  238. 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68,
  239. 0x74, 0x74, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
  240. 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08,
  241. 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f,
  242. 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
  243. 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70,
  244. 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65,
  245. 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c,
  246. 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
  247. 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
  248. 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
  249. 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
  250. 0x01, 0x22, 0x30, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b,
  251. 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
  252. 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
  253. 0x6c, 0x75, 0x65, 0x22, 0x7d, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
  254. 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20,
  255. 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
  256. 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65,
  257. 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,
  258. 0x72, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28,
  259. 0x0b, 0x32, 0x17, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68,
  260. 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64,
  261. 0x65, 0x72, 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x70,
  262. 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74,
  263. 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61,
  264. 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74,
  265. 0x70, 0xaa, 0x02, 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48,
  266. 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  267. }
  268. var (
  269. file_proxy_http_config_proto_rawDescOnce sync.Once
  270. file_proxy_http_config_proto_rawDescData = file_proxy_http_config_proto_rawDesc
  271. )
  272. func file_proxy_http_config_proto_rawDescGZIP() []byte {
  273. file_proxy_http_config_proto_rawDescOnce.Do(func() {
  274. file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proxy_http_config_proto_rawDescData)
  275. })
  276. return file_proxy_http_config_proto_rawDescData
  277. }
  278. var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
  279. var file_proxy_http_config_proto_goTypes = []interface{}{
  280. (*Account)(nil), // 0: xray.proxy.http.Account
  281. (*ServerConfig)(nil), // 1: xray.proxy.http.ServerConfig
  282. (*Header)(nil), // 2: xray.proxy.http.Header
  283. (*ClientConfig)(nil), // 3: xray.proxy.http.ClientConfig
  284. nil, // 4: xray.proxy.http.ServerConfig.AccountsEntry
  285. (*protocol.ServerEndpoint)(nil), // 5: xray.common.protocol.ServerEndpoint
  286. }
  287. var file_proxy_http_config_proto_depIdxs = []int32{
  288. 4, // 0: xray.proxy.http.ServerConfig.accounts:type_name -> xray.proxy.http.ServerConfig.AccountsEntry
  289. 5, // 1: xray.proxy.http.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
  290. 2, // 2: xray.proxy.http.ClientConfig.header:type_name -> xray.proxy.http.Header
  291. 3, // [3:3] is the sub-list for method output_type
  292. 3, // [3:3] is the sub-list for method input_type
  293. 3, // [3:3] is the sub-list for extension type_name
  294. 3, // [3:3] is the sub-list for extension extendee
  295. 0, // [0:3] is the sub-list for field type_name
  296. }
  297. func init() { file_proxy_http_config_proto_init() }
  298. func file_proxy_http_config_proto_init() {
  299. if File_proxy_http_config_proto != nil {
  300. return
  301. }
  302. if !protoimpl.UnsafeEnabled {
  303. file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  304. switch v := v.(*Account); i {
  305. case 0:
  306. return &v.state
  307. case 1:
  308. return &v.sizeCache
  309. case 2:
  310. return &v.unknownFields
  311. default:
  312. return nil
  313. }
  314. }
  315. file_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  316. switch v := v.(*ServerConfig); i {
  317. case 0:
  318. return &v.state
  319. case 1:
  320. return &v.sizeCache
  321. case 2:
  322. return &v.unknownFields
  323. default:
  324. return nil
  325. }
  326. }
  327. file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  328. switch v := v.(*Header); i {
  329. case 0:
  330. return &v.state
  331. case 1:
  332. return &v.sizeCache
  333. case 2:
  334. return &v.unknownFields
  335. default:
  336. return nil
  337. }
  338. }
  339. file_proxy_http_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  340. switch v := v.(*ClientConfig); i {
  341. case 0:
  342. return &v.state
  343. case 1:
  344. return &v.sizeCache
  345. case 2:
  346. return &v.unknownFields
  347. default:
  348. return nil
  349. }
  350. }
  351. }
  352. type x struct{}
  353. out := protoimpl.TypeBuilder{
  354. File: protoimpl.DescBuilder{
  355. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  356. RawDescriptor: file_proxy_http_config_proto_rawDesc,
  357. NumEnums: 0,
  358. NumMessages: 5,
  359. NumExtensions: 0,
  360. NumServices: 0,
  361. },
  362. GoTypes: file_proxy_http_config_proto_goTypes,
  363. DependencyIndexes: file_proxy_http_config_proto_depIdxs,
  364. MessageInfos: file_proxy_http_config_proto_msgTypes,
  365. }.Build()
  366. File_proxy_http_config_proto = out.File
  367. file_proxy_http_config_proto_rawDesc = nil
  368. file_proxy_http_config_proto_goTypes = nil
  369. file_proxy_http_config_proto_depIdxs = nil
  370. }