config.pb.go 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. // Master config of V2Ray. V2Ray takes this config as input and functions accordingly.
  17. type Config struct {
  18. // Inbound handler configurations. Must have at least one item.
  19. Inbound []*InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound" json:"inbound,omitempty"`
  20. // Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
  21. Outbound []*OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound" json:"outbound,omitempty"`
  22. // App configuration. Must be one in the app directory.
  23. App []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,4,rep,name=app" json:"app,omitempty"`
  24. // Transport settings.
  25. Transport *v2ray_core_transport.Config `protobuf:"bytes,5,opt,name=transport" json:"transport,omitempty"`
  26. // Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray.
  27. // V2Ray will ignore such config during initialization.
  28. Extension []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"`
  29. }
  30. func (m *Config) Reset() { *m = Config{} }
  31. func (m *Config) String() string { return proto.CompactTextString(m) }
  32. func (*Config) ProtoMessage() {}
  33. func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  34. func (m *Config) GetInbound() []*InboundHandlerConfig {
  35. if m != nil {
  36. return m.Inbound
  37. }
  38. return nil
  39. }
  40. func (m *Config) GetOutbound() []*OutboundHandlerConfig {
  41. if m != nil {
  42. return m.Outbound
  43. }
  44. return nil
  45. }
  46. func (m *Config) GetApp() []*v2ray_core_common_serial.TypedMessage {
  47. if m != nil {
  48. return m.App
  49. }
  50. return nil
  51. }
  52. func (m *Config) GetTransport() *v2ray_core_transport.Config {
  53. if m != nil {
  54. return m.Transport
  55. }
  56. return nil
  57. }
  58. func (m *Config) GetExtension() []*v2ray_core_common_serial.TypedMessage {
  59. if m != nil {
  60. return m.Extension
  61. }
  62. return nil
  63. }
  64. type InboundHandlerConfig struct {
  65. // Tag of the inbound handler.
  66. Tag string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
  67. // Settings for how this inbound proxy is handled. Must be ReceiverConfig above.
  68. ReceiverSettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings" json:"receiver_settings,omitempty"`
  69. // Settings for inbound proxy. Must be one of the inbound proxies.
  70. ProxySettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings" json:"proxy_settings,omitempty"`
  71. }
  72. func (m *InboundHandlerConfig) Reset() { *m = InboundHandlerConfig{} }
  73. func (m *InboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  74. func (*InboundHandlerConfig) ProtoMessage() {}
  75. func (*InboundHandlerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  76. func (m *InboundHandlerConfig) GetTag() string {
  77. if m != nil {
  78. return m.Tag
  79. }
  80. return ""
  81. }
  82. func (m *InboundHandlerConfig) GetReceiverSettings() *v2ray_core_common_serial.TypedMessage {
  83. if m != nil {
  84. return m.ReceiverSettings
  85. }
  86. return nil
  87. }
  88. func (m *InboundHandlerConfig) GetProxySettings() *v2ray_core_common_serial.TypedMessage {
  89. if m != nil {
  90. return m.ProxySettings
  91. }
  92. return nil
  93. }
  94. type OutboundHandlerConfig struct {
  95. // Tag of this outbound handler.
  96. Tag string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
  97. // Settings for how to dial connection for this outbound handler. Must be SenderConfig above.
  98. SenderSettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,2,opt,name=sender_settings,json=senderSettings" json:"sender_settings,omitempty"`
  99. // Settings for this outbound proxy. Must be one of the outbound proxies.
  100. ProxySettings *v2ray_core_common_serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings" json:"proxy_settings,omitempty"`
  101. // If not zero, this outbound will be expired in seconds. Not used for now.
  102. Expire int64 `protobuf:"varint,4,opt,name=expire" json:"expire,omitempty"`
  103. // Comment of this outbound handler. Not used for now.
  104. Comment string `protobuf:"bytes,5,opt,name=comment" json:"comment,omitempty"`
  105. }
  106. func (m *OutboundHandlerConfig) Reset() { *m = OutboundHandlerConfig{} }
  107. func (m *OutboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  108. func (*OutboundHandlerConfig) ProtoMessage() {}
  109. func (*OutboundHandlerConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  110. func (m *OutboundHandlerConfig) GetTag() string {
  111. if m != nil {
  112. return m.Tag
  113. }
  114. return ""
  115. }
  116. func (m *OutboundHandlerConfig) GetSenderSettings() *v2ray_core_common_serial.TypedMessage {
  117. if m != nil {
  118. return m.SenderSettings
  119. }
  120. return nil
  121. }
  122. func (m *OutboundHandlerConfig) GetProxySettings() *v2ray_core_common_serial.TypedMessage {
  123. if m != nil {
  124. return m.ProxySettings
  125. }
  126. return nil
  127. }
  128. func (m *OutboundHandlerConfig) GetExpire() int64 {
  129. if m != nil {
  130. return m.Expire
  131. }
  132. return 0
  133. }
  134. func (m *OutboundHandlerConfig) GetComment() string {
  135. if m != nil {
  136. return m.Comment
  137. }
  138. return ""
  139. }
  140. func init() {
  141. proto.RegisterType((*Config)(nil), "v2ray.core.Config")
  142. proto.RegisterType((*InboundHandlerConfig)(nil), "v2ray.core.InboundHandlerConfig")
  143. proto.RegisterType((*OutboundHandlerConfig)(nil), "v2ray.core.OutboundHandlerConfig")
  144. }
  145. func init() { proto.RegisterFile("v2ray.com/core/config.proto", fileDescriptor0) }
  146. var fileDescriptor0 = []byte{
  147. // 405 bytes of a gzipped FileDescriptorProto
  148. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0x41, 0x6f, 0x94, 0x40,
  149. 0x1c, 0xc5, 0x33, 0x0b, 0x6e, 0xcb, 0xbf, 0x71, 0x5d, 0x27, 0x6a, 0x26, 0xd5, 0x03, 0x6e, 0x52,
  150. 0xc3, 0x69, 0x30, 0x78, 0x31, 0x4d, 0xbc, 0x58, 0x0f, 0x6a, 0xd2, 0xd4, 0x50, 0xe3, 0xc1, 0x4b,
  151. 0x33, 0x85, 0xbf, 0x84, 0xa4, 0xcc, 0x90, 0x99, 0x69, 0xb3, 0x7c, 0x25, 0xbf, 0x87, 0x37, 0xbf,
  152. 0x91, 0x17, 0x03, 0x03, 0x0b, 0xd5, 0x3d, 0xb8, 0x26, 0x3d, 0xc1, 0xf0, 0xe6, 0xf7, 0xde, 0xff,
  153. 0x01, 0x03, 0x4f, 0x6f, 0x12, 0x2d, 0x1a, 0x9e, 0xa9, 0x2a, 0xce, 0x94, 0xc6, 0x38, 0x53, 0xf2,
  154. 0x5b, 0x59, 0xf0, 0x5a, 0x2b, 0xab, 0x28, 0x0c, 0xa2, 0xc6, 0xc3, 0x97, 0x7f, 0x6d, 0xac, 0x2a,
  155. 0x25, 0x63, 0x83, 0xba, 0x14, 0x57, 0xb1, 0x6d, 0x6a, 0xcc, 0x2f, 0x2a, 0x34, 0x46, 0x14, 0xe8,
  156. 0xe8, 0xc3, 0xa3, 0x3f, 0x08, 0xab, 0x85, 0x34, 0xb5, 0xd2, 0xf6, 0x56, 0xc8, 0xea, 0xc7, 0x0c,
  157. 0xe6, 0x27, 0xdd, 0x03, 0x7a, 0x0c, 0x7b, 0xa5, 0xbc, 0x54, 0xd7, 0x32, 0x67, 0x24, 0xf4, 0xa2,
  158. 0x83, 0x24, 0xe4, 0xe3, 0x04, 0xfc, 0x83, 0x93, 0xde, 0x0b, 0x99, 0x5f, 0xa1, 0x76, 0x48, 0x3a,
  159. 0x00, 0xf4, 0x0d, 0xec, 0xab, 0x6b, 0xeb, 0xe0, 0x59, 0x07, 0x3f, 0x9f, 0xc2, 0x67, 0xbd, 0x76,
  160. 0x9b, 0xde, 0x20, 0xf4, 0x35, 0x78, 0xa2, 0xae, 0x99, 0xdf, 0x91, 0x2f, 0xa6, 0xa4, 0x2b, 0xca,
  161. 0x5d, 0x51, 0xfe, 0xb9, 0x2d, 0x7a, 0xea, 0x7a, 0xa6, 0x2d, 0x42, 0x8f, 0x21, 0xd8, 0x34, 0x63,
  162. 0xf7, 0x42, 0x12, 0x1d, 0x24, 0xcf, 0xa6, 0xfc, 0x46, 0xe4, 0x7d, 0xe8, 0xb8, 0x9d, 0xbe, 0x83,
  163. 0x00, 0xd7, 0x16, 0xa5, 0x29, 0x95, 0x64, 0xf3, 0x9d, 0xb2, 0x47, 0xf0, 0xa3, 0xbf, 0xef, 0x2d,
  164. 0xfd, 0xd5, 0x4f, 0x02, 0x8f, 0xb6, 0xbd, 0x22, 0xba, 0x04, 0xcf, 0x8a, 0x82, 0x91, 0x90, 0x44,
  165. 0x41, 0xda, 0xde, 0xd2, 0x73, 0x78, 0xa8, 0x31, 0xc3, 0xf2, 0x06, 0xf5, 0x85, 0x41, 0x6b, 0x4b,
  166. 0x59, 0x18, 0x36, 0xeb, 0x46, 0xff, 0xd7, 0xf8, 0xe5, 0x60, 0x70, 0xde, 0xf3, 0xf4, 0x14, 0x16,
  167. 0xb5, 0x56, 0xeb, 0x66, 0x74, 0xf4, 0x76, 0x72, 0xbc, 0xdf, 0xd1, 0x83, 0xdd, 0xea, 0x17, 0x81,
  168. 0xc7, 0x5b, 0x3f, 0xda, 0x96, 0x3e, 0x67, 0xf0, 0xc0, 0xa0, 0xcc, 0xff, 0xbf, 0xcd, 0xc2, 0xe1,
  169. 0x77, 0xd4, 0x85, 0x3e, 0x81, 0x39, 0xae, 0xeb, 0x52, 0x23, 0xf3, 0x43, 0x12, 0x79, 0x69, 0xbf,
  170. 0xa2, 0x0c, 0xf6, 0x5a, 0x13, 0x94, 0xee, 0xc7, 0x09, 0xd2, 0x61, 0xf9, 0xf6, 0x08, 0x16, 0x99,
  171. 0xaa, 0x26, 0x69, 0x9f, 0xc8, 0x57, 0xbf, 0xbd, 0x7e, 0x9f, 0xc1, 0x97, 0x24, 0x15, 0x0d, 0x3f,
  172. 0x51, 0x1a, 0x2f, 0xe7, 0xdd, 0x11, 0x7a, 0xf5, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x15, 0xee,
  173. 0x31, 0xc6, 0x03, 0x00, 0x00,
  174. }