config.pb.go 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.11
  4. // protoc v6.33.5
  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. unsafe "unsafe"
  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. type Account struct {
  22. state protoimpl.MessageState `protogen:"open.v1"`
  23. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  24. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  25. unknownFields protoimpl.UnknownFields
  26. sizeCache protoimpl.SizeCache
  27. }
  28. func (x *Account) Reset() {
  29. *x = Account{}
  30. mi := &file_proxy_http_config_proto_msgTypes[0]
  31. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  32. ms.StoreMessageInfo(mi)
  33. }
  34. func (x *Account) String() string {
  35. return protoimpl.X.MessageStringOf(x)
  36. }
  37. func (*Account) ProtoMessage() {}
  38. func (x *Account) ProtoReflect() protoreflect.Message {
  39. mi := &file_proxy_http_config_proto_msgTypes[0]
  40. if x != nil {
  41. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  42. if ms.LoadMessageInfo() == nil {
  43. ms.StoreMessageInfo(mi)
  44. }
  45. return ms
  46. }
  47. return mi.MessageOf(x)
  48. }
  49. // Deprecated: Use Account.ProtoReflect.Descriptor instead.
  50. func (*Account) Descriptor() ([]byte, []int) {
  51. return file_proxy_http_config_proto_rawDescGZIP(), []int{0}
  52. }
  53. func (x *Account) GetUsername() string {
  54. if x != nil {
  55. return x.Username
  56. }
  57. return ""
  58. }
  59. func (x *Account) GetPassword() string {
  60. if x != nil {
  61. return x.Password
  62. }
  63. return ""
  64. }
  65. // Config for HTTP proxy server.
  66. type ServerConfig struct {
  67. state protoimpl.MessageState `protogen:"open.v1"`
  68. Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  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. unknownFields protoimpl.UnknownFields
  72. sizeCache protoimpl.SizeCache
  73. }
  74. func (x *ServerConfig) Reset() {
  75. *x = ServerConfig{}
  76. mi := &file_proxy_http_config_proto_msgTypes[1]
  77. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  78. ms.StoreMessageInfo(mi)
  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 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. func (x *ServerConfig) GetAccounts() map[string]string {
  100. if x != nil {
  101. return x.Accounts
  102. }
  103. return nil
  104. }
  105. func (x *ServerConfig) GetAllowTransparent() bool {
  106. if x != nil {
  107. return x.AllowTransparent
  108. }
  109. return false
  110. }
  111. func (x *ServerConfig) GetUserLevel() uint32 {
  112. if x != nil {
  113. return x.UserLevel
  114. }
  115. return 0
  116. }
  117. type Header struct {
  118. state protoimpl.MessageState `protogen:"open.v1"`
  119. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  120. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  121. unknownFields protoimpl.UnknownFields
  122. sizeCache protoimpl.SizeCache
  123. }
  124. func (x *Header) Reset() {
  125. *x = Header{}
  126. mi := &file_proxy_http_config_proto_msgTypes[2]
  127. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  128. ms.StoreMessageInfo(mi)
  129. }
  130. func (x *Header) String() string {
  131. return protoimpl.X.MessageStringOf(x)
  132. }
  133. func (*Header) ProtoMessage() {}
  134. func (x *Header) ProtoReflect() protoreflect.Message {
  135. mi := &file_proxy_http_config_proto_msgTypes[2]
  136. if x != nil {
  137. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  138. if ms.LoadMessageInfo() == nil {
  139. ms.StoreMessageInfo(mi)
  140. }
  141. return ms
  142. }
  143. return mi.MessageOf(x)
  144. }
  145. // Deprecated: Use Header.ProtoReflect.Descriptor instead.
  146. func (*Header) Descriptor() ([]byte, []int) {
  147. return file_proxy_http_config_proto_rawDescGZIP(), []int{2}
  148. }
  149. func (x *Header) GetKey() string {
  150. if x != nil {
  151. return x.Key
  152. }
  153. return ""
  154. }
  155. func (x *Header) GetValue() string {
  156. if x != nil {
  157. return x.Value
  158. }
  159. return ""
  160. }
  161. // ClientConfig is the protobuf config for HTTP proxy client.
  162. type ClientConfig struct {
  163. state protoimpl.MessageState `protogen:"open.v1"`
  164. // Sever is a list of HTTP server addresses.
  165. Server *protocol.ServerEndpoint `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  166. Header []*Header `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty"`
  167. unknownFields protoimpl.UnknownFields
  168. sizeCache protoimpl.SizeCache
  169. }
  170. func (x *ClientConfig) Reset() {
  171. *x = ClientConfig{}
  172. mi := &file_proxy_http_config_proto_msgTypes[3]
  173. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  174. ms.StoreMessageInfo(mi)
  175. }
  176. func (x *ClientConfig) String() string {
  177. return protoimpl.X.MessageStringOf(x)
  178. }
  179. func (*ClientConfig) ProtoMessage() {}
  180. func (x *ClientConfig) ProtoReflect() protoreflect.Message {
  181. mi := &file_proxy_http_config_proto_msgTypes[3]
  182. if x != nil {
  183. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  184. if ms.LoadMessageInfo() == nil {
  185. ms.StoreMessageInfo(mi)
  186. }
  187. return ms
  188. }
  189. return mi.MessageOf(x)
  190. }
  191. // Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
  192. func (*ClientConfig) Descriptor() ([]byte, []int) {
  193. return file_proxy_http_config_proto_rawDescGZIP(), []int{3}
  194. }
  195. func (x *ClientConfig) GetServer() *protocol.ServerEndpoint {
  196. if x != nil {
  197. return x.Server
  198. }
  199. return nil
  200. }
  201. func (x *ClientConfig) GetHeader() []*Header {
  202. if x != nil {
  203. return x.Header
  204. }
  205. return nil
  206. }
  207. var File_proxy_http_config_proto protoreflect.FileDescriptor
  208. const file_proxy_http_config_proto_rawDesc = "" +
  209. "\n" +
  210. "\x17proxy/http/config.proto\x12\x0fxray.proxy.http\x1a!common/protocol/server_spec.proto\"A\n" +
  211. "\aAccount\x12\x1a\n" +
  212. "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
  213. "\bpassword\x18\x02 \x01(\tR\bpassword\"\xe0\x01\n" +
  214. "\fServerConfig\x12G\n" +
  215. "\baccounts\x18\x02 \x03(\v2+.xray.proxy.http.ServerConfig.AccountsEntryR\baccounts\x12+\n" +
  216. "\x11allow_transparent\x18\x03 \x01(\bR\x10allowTransparent\x12\x1d\n" +
  217. "\n" +
  218. "user_level\x18\x04 \x01(\rR\tuserLevel\x1a;\n" +
  219. "\rAccountsEntry\x12\x10\n" +
  220. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  221. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"0\n" +
  222. "\x06Header\x12\x10\n" +
  223. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  224. "\x05value\x18\x02 \x01(\tR\x05value\"}\n" +
  225. "\fClientConfig\x12<\n" +
  226. "\x06server\x18\x01 \x01(\v2$.xray.common.protocol.ServerEndpointR\x06server\x12/\n" +
  227. "\x06header\x18\x02 \x03(\v2\x17.xray.proxy.http.HeaderR\x06headerBO\n" +
  228. "\x13com.xray.proxy.httpP\x01Z$github.com/xtls/xray-core/proxy/http\xaa\x02\x0fXray.Proxy.Httpb\x06proto3"
  229. var (
  230. file_proxy_http_config_proto_rawDescOnce sync.Once
  231. file_proxy_http_config_proto_rawDescData []byte
  232. )
  233. func file_proxy_http_config_proto_rawDescGZIP() []byte {
  234. file_proxy_http_config_proto_rawDescOnce.Do(func() {
  235. file_proxy_http_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proxy_http_config_proto_rawDesc), len(file_proxy_http_config_proto_rawDesc)))
  236. })
  237. return file_proxy_http_config_proto_rawDescData
  238. }
  239. var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
  240. var file_proxy_http_config_proto_goTypes = []any{
  241. (*Account)(nil), // 0: xray.proxy.http.Account
  242. (*ServerConfig)(nil), // 1: xray.proxy.http.ServerConfig
  243. (*Header)(nil), // 2: xray.proxy.http.Header
  244. (*ClientConfig)(nil), // 3: xray.proxy.http.ClientConfig
  245. nil, // 4: xray.proxy.http.ServerConfig.AccountsEntry
  246. (*protocol.ServerEndpoint)(nil), // 5: xray.common.protocol.ServerEndpoint
  247. }
  248. var file_proxy_http_config_proto_depIdxs = []int32{
  249. 4, // 0: xray.proxy.http.ServerConfig.accounts:type_name -> xray.proxy.http.ServerConfig.AccountsEntry
  250. 5, // 1: xray.proxy.http.ClientConfig.server:type_name -> xray.common.protocol.ServerEndpoint
  251. 2, // 2: xray.proxy.http.ClientConfig.header:type_name -> xray.proxy.http.Header
  252. 3, // [3:3] is the sub-list for method output_type
  253. 3, // [3:3] is the sub-list for method input_type
  254. 3, // [3:3] is the sub-list for extension type_name
  255. 3, // [3:3] is the sub-list for extension extendee
  256. 0, // [0:3] is the sub-list for field type_name
  257. }
  258. func init() { file_proxy_http_config_proto_init() }
  259. func file_proxy_http_config_proto_init() {
  260. if File_proxy_http_config_proto != nil {
  261. return
  262. }
  263. type x struct{}
  264. out := protoimpl.TypeBuilder{
  265. File: protoimpl.DescBuilder{
  266. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  267. RawDescriptor: unsafe.Slice(unsafe.StringData(file_proxy_http_config_proto_rawDesc), len(file_proxy_http_config_proto_rawDesc)),
  268. NumEnums: 0,
  269. NumMessages: 5,
  270. NumExtensions: 0,
  271. NumServices: 0,
  272. },
  273. GoTypes: file_proxy_http_config_proto_goTypes,
  274. DependencyIndexes: file_proxy_http_config_proto_depIdxs,
  275. MessageInfos: file_proxy_http_config_proto_msgTypes,
  276. }.Build()
  277. File_proxy_http_config_proto = out.File
  278. file_proxy_http_config_proto_goTypes = nil
  279. file_proxy_http_config_proto_depIdxs = nil
  280. }