config.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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: core/config.proto
  6. package core
  7. import (
  8. serial "github.com/xtls/xray-core/common/serial"
  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. // Config is the master config of Xray. Xray takes this config as input and
  22. // functions accordingly.
  23. type Config struct {
  24. state protoimpl.MessageState `protogen:"open.v1"`
  25. // Inbound handler configurations. Must have at least one item.
  26. Inbound []*InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound,proto3" json:"inbound,omitempty"`
  27. // Outbound handler configurations. Must have at least one item. The first
  28. // item is used as default for routing.
  29. Outbound []*OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound,proto3" json:"outbound,omitempty"`
  30. // App is for configurations of all features in Xray. A feature must
  31. // implement the Feature interface, and its config type must be registered
  32. // through common.RegisterConfig.
  33. App []*serial.TypedMessage `protobuf:"bytes,4,rep,name=app,proto3" json:"app,omitempty"`
  34. // Configuration for extensions. The config may not work if corresponding
  35. // extension is not loaded into Xray. Xray will ignore such config during
  36. // initialization.
  37. Extension []*serial.TypedMessage `protobuf:"bytes,6,rep,name=extension,proto3" json:"extension,omitempty"`
  38. unknownFields protoimpl.UnknownFields
  39. sizeCache protoimpl.SizeCache
  40. }
  41. func (x *Config) Reset() {
  42. *x = Config{}
  43. mi := &file_core_config_proto_msgTypes[0]
  44. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  45. ms.StoreMessageInfo(mi)
  46. }
  47. func (x *Config) String() string {
  48. return protoimpl.X.MessageStringOf(x)
  49. }
  50. func (*Config) ProtoMessage() {}
  51. func (x *Config) ProtoReflect() protoreflect.Message {
  52. mi := &file_core_config_proto_msgTypes[0]
  53. if x != nil {
  54. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  55. if ms.LoadMessageInfo() == nil {
  56. ms.StoreMessageInfo(mi)
  57. }
  58. return ms
  59. }
  60. return mi.MessageOf(x)
  61. }
  62. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  63. func (*Config) Descriptor() ([]byte, []int) {
  64. return file_core_config_proto_rawDescGZIP(), []int{0}
  65. }
  66. func (x *Config) GetInbound() []*InboundHandlerConfig {
  67. if x != nil {
  68. return x.Inbound
  69. }
  70. return nil
  71. }
  72. func (x *Config) GetOutbound() []*OutboundHandlerConfig {
  73. if x != nil {
  74. return x.Outbound
  75. }
  76. return nil
  77. }
  78. func (x *Config) GetApp() []*serial.TypedMessage {
  79. if x != nil {
  80. return x.App
  81. }
  82. return nil
  83. }
  84. func (x *Config) GetExtension() []*serial.TypedMessage {
  85. if x != nil {
  86. return x.Extension
  87. }
  88. return nil
  89. }
  90. // InboundHandlerConfig is the configuration for inbound handler.
  91. type InboundHandlerConfig struct {
  92. state protoimpl.MessageState `protogen:"open.v1"`
  93. // Tag of the inbound handler. The tag must be unique among all inbound
  94. // handlers
  95. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  96. // Settings for how this inbound proxy is handled.
  97. ReceiverSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings,proto3" json:"receiver_settings,omitempty"`
  98. // Settings for inbound proxy. Must be one of the inbound proxies.
  99. ProxySettings *serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
  100. unknownFields protoimpl.UnknownFields
  101. sizeCache protoimpl.SizeCache
  102. }
  103. func (x *InboundHandlerConfig) Reset() {
  104. *x = InboundHandlerConfig{}
  105. mi := &file_core_config_proto_msgTypes[1]
  106. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  107. ms.StoreMessageInfo(mi)
  108. }
  109. func (x *InboundHandlerConfig) String() string {
  110. return protoimpl.X.MessageStringOf(x)
  111. }
  112. func (*InboundHandlerConfig) ProtoMessage() {}
  113. func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message {
  114. mi := &file_core_config_proto_msgTypes[1]
  115. if x != nil {
  116. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  117. if ms.LoadMessageInfo() == nil {
  118. ms.StoreMessageInfo(mi)
  119. }
  120. return ms
  121. }
  122. return mi.MessageOf(x)
  123. }
  124. // Deprecated: Use InboundHandlerConfig.ProtoReflect.Descriptor instead.
  125. func (*InboundHandlerConfig) Descriptor() ([]byte, []int) {
  126. return file_core_config_proto_rawDescGZIP(), []int{1}
  127. }
  128. func (x *InboundHandlerConfig) GetTag() string {
  129. if x != nil {
  130. return x.Tag
  131. }
  132. return ""
  133. }
  134. func (x *InboundHandlerConfig) GetReceiverSettings() *serial.TypedMessage {
  135. if x != nil {
  136. return x.ReceiverSettings
  137. }
  138. return nil
  139. }
  140. func (x *InboundHandlerConfig) GetProxySettings() *serial.TypedMessage {
  141. if x != nil {
  142. return x.ProxySettings
  143. }
  144. return nil
  145. }
  146. // OutboundHandlerConfig is the configuration for outbound handler.
  147. type OutboundHandlerConfig struct {
  148. state protoimpl.MessageState `protogen:"open.v1"`
  149. // Tag of this outbound handler.
  150. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  151. // Settings for how to dial connection for this outbound handler.
  152. SenderSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=sender_settings,json=senderSettings,proto3" json:"sender_settings,omitempty"`
  153. // Settings for this outbound proxy. Must be one of the outbound proxies.
  154. ProxySettings *serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
  155. // If not zero, this outbound will be expired in seconds. Not used for now.
  156. Expire int64 `protobuf:"varint,4,opt,name=expire,proto3" json:"expire,omitempty"`
  157. // Comment of this outbound handler. Not used for now.
  158. Comment string `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"`
  159. unknownFields protoimpl.UnknownFields
  160. sizeCache protoimpl.SizeCache
  161. }
  162. func (x *OutboundHandlerConfig) Reset() {
  163. *x = OutboundHandlerConfig{}
  164. mi := &file_core_config_proto_msgTypes[2]
  165. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  166. ms.StoreMessageInfo(mi)
  167. }
  168. func (x *OutboundHandlerConfig) String() string {
  169. return protoimpl.X.MessageStringOf(x)
  170. }
  171. func (*OutboundHandlerConfig) ProtoMessage() {}
  172. func (x *OutboundHandlerConfig) ProtoReflect() protoreflect.Message {
  173. mi := &file_core_config_proto_msgTypes[2]
  174. if x != nil {
  175. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  176. if ms.LoadMessageInfo() == nil {
  177. ms.StoreMessageInfo(mi)
  178. }
  179. return ms
  180. }
  181. return mi.MessageOf(x)
  182. }
  183. // Deprecated: Use OutboundHandlerConfig.ProtoReflect.Descriptor instead.
  184. func (*OutboundHandlerConfig) Descriptor() ([]byte, []int) {
  185. return file_core_config_proto_rawDescGZIP(), []int{2}
  186. }
  187. func (x *OutboundHandlerConfig) GetTag() string {
  188. if x != nil {
  189. return x.Tag
  190. }
  191. return ""
  192. }
  193. func (x *OutboundHandlerConfig) GetSenderSettings() *serial.TypedMessage {
  194. if x != nil {
  195. return x.SenderSettings
  196. }
  197. return nil
  198. }
  199. func (x *OutboundHandlerConfig) GetProxySettings() *serial.TypedMessage {
  200. if x != nil {
  201. return x.ProxySettings
  202. }
  203. return nil
  204. }
  205. func (x *OutboundHandlerConfig) GetExpire() int64 {
  206. if x != nil {
  207. return x.Expire
  208. }
  209. return 0
  210. }
  211. func (x *OutboundHandlerConfig) GetComment() string {
  212. if x != nil {
  213. return x.Comment
  214. }
  215. return ""
  216. }
  217. var File_core_config_proto protoreflect.FileDescriptor
  218. const file_core_config_proto_rawDesc = "" +
  219. "\n" +
  220. "\x11core/config.proto\x12\txray.core\x1a!common/serial/typed_message.proto\"\xfb\x01\n" +
  221. "\x06Config\x129\n" +
  222. "\ainbound\x18\x01 \x03(\v2\x1f.xray.core.InboundHandlerConfigR\ainbound\x12<\n" +
  223. "\boutbound\x18\x02 \x03(\v2 .xray.core.OutboundHandlerConfigR\boutbound\x122\n" +
  224. "\x03app\x18\x04 \x03(\v2 .xray.common.serial.TypedMessageR\x03app\x12>\n" +
  225. "\textension\x18\x06 \x03(\v2 .xray.common.serial.TypedMessageR\textensionJ\x04\b\x03\x10\x04\"\xc0\x01\n" +
  226. "\x14InboundHandlerConfig\x12\x10\n" +
  227. "\x03tag\x18\x01 \x01(\tR\x03tag\x12M\n" +
  228. "\x11receiver_settings\x18\x02 \x01(\v2 .xray.common.serial.TypedMessageR\x10receiverSettings\x12G\n" +
  229. "\x0eproxy_settings\x18\x03 \x01(\v2 .xray.common.serial.TypedMessageR\rproxySettings\"\xef\x01\n" +
  230. "\x15OutboundHandlerConfig\x12\x10\n" +
  231. "\x03tag\x18\x01 \x01(\tR\x03tag\x12I\n" +
  232. "\x0fsender_settings\x18\x02 \x01(\v2 .xray.common.serial.TypedMessageR\x0esenderSettings\x12G\n" +
  233. "\x0eproxy_settings\x18\x03 \x01(\v2 .xray.common.serial.TypedMessageR\rproxySettings\x12\x16\n" +
  234. "\x06expire\x18\x04 \x01(\x03R\x06expire\x12\x18\n" +
  235. "\acomment\x18\x05 \x01(\tR\acommentB=\n" +
  236. "\rcom.xray.coreP\x01Z\x1egithub.com/xtls/xray-core/core\xaa\x02\tXray.Coreb\x06proto3"
  237. var (
  238. file_core_config_proto_rawDescOnce sync.Once
  239. file_core_config_proto_rawDescData []byte
  240. )
  241. func file_core_config_proto_rawDescGZIP() []byte {
  242. file_core_config_proto_rawDescOnce.Do(func() {
  243. file_core_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_core_config_proto_rawDesc), len(file_core_config_proto_rawDesc)))
  244. })
  245. return file_core_config_proto_rawDescData
  246. }
  247. var file_core_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  248. var file_core_config_proto_goTypes = []any{
  249. (*Config)(nil), // 0: xray.core.Config
  250. (*InboundHandlerConfig)(nil), // 1: xray.core.InboundHandlerConfig
  251. (*OutboundHandlerConfig)(nil), // 2: xray.core.OutboundHandlerConfig
  252. (*serial.TypedMessage)(nil), // 3: xray.common.serial.TypedMessage
  253. }
  254. var file_core_config_proto_depIdxs = []int32{
  255. 1, // 0: xray.core.Config.inbound:type_name -> xray.core.InboundHandlerConfig
  256. 2, // 1: xray.core.Config.outbound:type_name -> xray.core.OutboundHandlerConfig
  257. 3, // 2: xray.core.Config.app:type_name -> xray.common.serial.TypedMessage
  258. 3, // 3: xray.core.Config.extension:type_name -> xray.common.serial.TypedMessage
  259. 3, // 4: xray.core.InboundHandlerConfig.receiver_settings:type_name -> xray.common.serial.TypedMessage
  260. 3, // 5: xray.core.InboundHandlerConfig.proxy_settings:type_name -> xray.common.serial.TypedMessage
  261. 3, // 6: xray.core.OutboundHandlerConfig.sender_settings:type_name -> xray.common.serial.TypedMessage
  262. 3, // 7: xray.core.OutboundHandlerConfig.proxy_settings:type_name -> xray.common.serial.TypedMessage
  263. 8, // [8:8] is the sub-list for method output_type
  264. 8, // [8:8] is the sub-list for method input_type
  265. 8, // [8:8] is the sub-list for extension type_name
  266. 8, // [8:8] is the sub-list for extension extendee
  267. 0, // [0:8] is the sub-list for field type_name
  268. }
  269. func init() { file_core_config_proto_init() }
  270. func file_core_config_proto_init() {
  271. if File_core_config_proto != nil {
  272. return
  273. }
  274. type x struct{}
  275. out := protoimpl.TypeBuilder{
  276. File: protoimpl.DescBuilder{
  277. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  278. RawDescriptor: unsafe.Slice(unsafe.StringData(file_core_config_proto_rawDesc), len(file_core_config_proto_rawDesc)),
  279. NumEnums: 0,
  280. NumMessages: 3,
  281. NumExtensions: 0,
  282. NumServices: 0,
  283. },
  284. GoTypes: file_core_config_proto_goTypes,
  285. DependencyIndexes: file_core_config_proto_depIdxs,
  286. MessageInfos: file_core_config_proto_msgTypes,
  287. }.Build()
  288. File_core_config_proto = out.File
  289. file_core_config_proto_goTypes = nil
  290. file_core_config_proto_depIdxs = nil
  291. }