config.pb.go 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. package core
  2. import proto "github.com/golang/protobuf/proto"
  3. import fmt "fmt"
  4. import math "math"
  5. import v2ray_core_common_serial "v2ray.com/core/common/serial"
  6. import v2ray_core_transport "v2ray.com/core/transport"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. // Configuration serialization format.
  17. type ConfigFormat int32
  18. const (
  19. ConfigFormat_Protobuf ConfigFormat = 0
  20. ConfigFormat_JSON ConfigFormat = 1
  21. )
  22. var ConfigFormat_name = map[int32]string{
  23. 0: "Protobuf",
  24. 1: "JSON",
  25. }
  26. var ConfigFormat_value = map[string]int32{
  27. "Protobuf": 0,
  28. "JSON": 1,
  29. }
  30. func (x ConfigFormat) String() string {
  31. return proto.EnumName(ConfigFormat_name, int32(x))
  32. }
  33. func (ConfigFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  34. // Master config of V2Ray. V2Ray takes this config as input and functions accordingly.
  35. type Config struct {
  36. // Inbound handler configurations. Must have at least one item.
  37. Inbound []*InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound" json:"inbound,omitempty"`
  38. // Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
  39. Outbound []*OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound" json:"outbound,omitempty"`
  40. // App configuration. Must be one in the app directory.
  41. App []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,4,rep,name=app" json:"app,omitempty"`
  42. // Transport settings.
  43. Transport *v2ray_core_transport.Config `protobuf:"bytes,5,opt,name=transport" json:"transport,omitempty"`
  44. // Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray.
  45. // V2Ray will ignore such config during initialization.
  46. Extension []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"`
  47. }
  48. func (m *Config) Reset() { *m = Config{} }
  49. func (m *Config) String() string { return proto.CompactTextString(m) }
  50. func (*Config) ProtoMessage() {}
  51. func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  52. func (m *Config) GetInbound() []*InboundHandlerConfig {
  53. if m != nil {
  54. return m.Inbound
  55. }
  56. return nil
  57. }
  58. func (m *Config) GetOutbound() []*OutboundHandlerConfig {
  59. if m != nil {
  60. return m.Outbound
  61. }
  62. return nil
  63. }
  64. func (m *Config) GetApp() []*v2ray_core_common_serial.TypedMessage {
  65. if m != nil {
  66. return m.App
  67. }
  68. return nil
  69. }
  70. func (m *Config) GetTransport() *v2ray_core_transport.Config {
  71. if m != nil {
  72. return m.Transport
  73. }
  74. return nil
  75. }
  76. func (m *Config) GetExtension() []*v2ray_core_common_serial.TypedMessage {
  77. if m != nil {
  78. return m.Extension
  79. }
  80. return nil
  81. }
  82. type InboundHandlerConfig struct {
  83. // Tag of the inbound handler.
  84. Tag string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
  85. // Settings for how this inbound proxy is handled. Must be ReceiverConfig above.
  86. ReceiverSettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings" json:"receiver_settings,omitempty"`
  87. // Settings for inbound proxy. Must be one of the inbound proxies.
  88. ProxySettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings" json:"proxy_settings,omitempty"`
  89. }
  90. func (m *InboundHandlerConfig) Reset() { *m = InboundHandlerConfig{} }
  91. func (m *InboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  92. func (*InboundHandlerConfig) ProtoMessage() {}
  93. func (*InboundHandlerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  94. func (m *InboundHandlerConfig) GetTag() string {
  95. if m != nil {
  96. return m.Tag
  97. }
  98. return ""
  99. }
  100. func (m *InboundHandlerConfig) GetReceiverSettings() *v2ray_core_common_serial.TypedMessage {
  101. if m != nil {
  102. return m.ReceiverSettings
  103. }
  104. return nil
  105. }
  106. func (m *InboundHandlerConfig) GetProxySettings() *v2ray_core_common_serial.TypedMessage {
  107. if m != nil {
  108. return m.ProxySettings
  109. }
  110. return nil
  111. }
  112. type OutboundHandlerConfig struct {
  113. // Tag of this outbound handler.
  114. Tag string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
  115. // Settings for how to dial connection for this outbound handler. Must be SenderConfig above.
  116. SenderSettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,2,opt,name=sender_settings,json=senderSettings" json:"sender_settings,omitempty"`
  117. // Settings for this outbound proxy. Must be one of the outbound proxies.
  118. ProxySettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings" json:"proxy_settings,omitempty"`
  119. // If not zero, this outbound will be expired in seconds. Not used for now.
  120. Expire int64 `protobuf:"varint,4,opt,name=expire" json:"expire,omitempty"`
  121. // Comment of this outbound handler. Not used for now.
  122. Comment string `protobuf:"bytes,5,opt,name=comment" json:"comment,omitempty"`
  123. }
  124. func (m *OutboundHandlerConfig) Reset() { *m = OutboundHandlerConfig{} }
  125. func (m *OutboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  126. func (*OutboundHandlerConfig) ProtoMessage() {}
  127. func (*OutboundHandlerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  128. func (m *OutboundHandlerConfig) GetTag() string {
  129. if m != nil {
  130. return m.Tag
  131. }
  132. return ""
  133. }
  134. func (m *OutboundHandlerConfig) GetSenderSettings() *v2ray_core_common_serial.TypedMessage {
  135. if m != nil {
  136. return m.SenderSettings
  137. }
  138. return nil
  139. }
  140. func (m *OutboundHandlerConfig) GetProxySettings() *v2ray_core_common_serial.TypedMessage {
  141. if m != nil {
  142. return m.ProxySettings
  143. }
  144. return nil
  145. }
  146. func (m *OutboundHandlerConfig) GetExpire() int64 {
  147. if m != nil {
  148. return m.Expire
  149. }
  150. return 0
  151. }
  152. func (m *OutboundHandlerConfig) GetComment() string {
  153. if m != nil {
  154. return m.Comment
  155. }
  156. return ""
  157. }
  158. func init() {
  159. proto.RegisterType((*Config)(nil), "v2ray.core.Config")
  160. proto.RegisterType((*InboundHandlerConfig)(nil), "v2ray.core.InboundHandlerConfig")
  161. proto.RegisterType((*OutboundHandlerConfig)(nil), "v2ray.core.OutboundHandlerConfig")
  162. proto.RegisterEnum("v2ray.core.ConfigFormat", ConfigFormat_name, ConfigFormat_value)
  163. }
  164. func init() { proto.RegisterFile("v2ray.com/core/config.proto", fileDescriptor0) }
  165. var fileDescriptor0 = []byte{
  166. // 436 bytes of a gzipped FileDescriptorProto
  167. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0x41, 0x6f, 0xd3, 0x30,
  168. 0x14, 0xc7, 0x71, 0x13, 0xba, 0xf6, 0x6d, 0x94, 0x60, 0x01, 0xb2, 0x06, 0x87, 0x50, 0x69, 0x53,
  169. 0xc5, 0xc1, 0x45, 0xe5, 0x82, 0x26, 0x71, 0x61, 0x08, 0xc1, 0xa4, 0xd1, 0x29, 0x45, 0x1c, 0xb8,
  170. 0x4c, 0x6e, 0xfa, 0x56, 0x45, 0x5a, 0xec, 0xc8, 0x76, 0xa7, 0xe6, 0x2b, 0xf1, 0x3d, 0xb8, 0xf1,
  171. 0x8d, 0xb8, 0xa0, 0xc4, 0x49, 0x93, 0x41, 0x0f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 0x9a, 0x44, 0x49, 0xd6, 0xdd, 0xa9, 0x77, 0x03, 0x9e, 0xf9,
  183. 0x3d, 0x2f, 0xf0, 0x87, 0x3f, 0x09, 0x3c, 0xde, 0xf6, 0x8a, 0x68, 0x00, 0x9e, 0x15, 0x4b, 0x46,
  184. 0x42, 0x32, 0xea, 0x47, 0xc5, 0x2d, 0x9d, 0xc1, 0x23, 0x8d, 0x31, 0x26, 0x37, 0xa8, 0x2f, 0x0d,
  185. 0x5a, 0x9b, 0xc8, 0xa5, 0x61, 0x9d, 0x72, 0xf4, 0x7f, 0x6d, 0x1f, 0xd4, 0x01, 0xb3, 0x8a, 0xa7,
  186. 0xe7, 0x30, 0xc8, 0xb4, 0x5a, 0xe7, 0x4d, 0xa2, 0xb7, 0x53, 0xe2, 0x83, 0x92, 0xae, 0xe3, 0x86,
  187. 0xbf, 0x08, 0x3c, 0xd9, 0xfa, 0xd1, 0xb6, 0xf8, 0x4c, 0xe1, 0xa1, 0x41, 0xb9, 0xf8, 0x7f, 0x9b,
  188. 0x81, 0xc3, 0xef, 0xc8, 0x85, 0x3e, 0x85, 0x2e, 0xae, 0xb3, 0x44, 0x23, 0xf3, 0x43, 0x32, 0xf2,
  189. 0xa2, 0x6a, 0x45, 0x19, 0xec, 0x15, 0x21, 0x28, 0xdd, 0x8f, 0xd3, 0x8f, 0xea, 0xe5, 0xcb, 0x63,
  190. 0x38, 0x70, 0xb6, 0x1f, 0x94, 0x4e, 0x85, 0xa5, 0x07, 0xd0, 0xbb, 0x28, 0x4e, 0xcb, 0x7c, 0x75,
  191. 0x15, 0xdc, 0xa3, 0x3d, 0xf0, 0xcf, 0x66, 0xd3, 0xcf, 0x01, 0x79, 0x77, 0x04, 0x83, 0x58, 0xa5,
  192. 0xad, 0xa9, 0x2e, 0xc8, 0x37, 0xbf, 0xb8, 0x7e, 0xef, 0xc0, 0xd7, 0x49, 0x24, 0x72, 0x7e, 0xaa,
  193. 0x34, 0xce, 0xbb, 0xe5, 0x51, 0x7b, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x01, 0x08, 0x59, 0x1b,
  194. 0xee, 0x03, 0x00, 0x00,
  195. }