config.pb.go 12 KB

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