config.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. package core
  2. import (
  3. fmt "fmt"
  4. proto "github.com/golang/protobuf/proto"
  5. math "math"
  6. serial "v2ray.com/core/common/serial"
  7. transport "v2ray.com/core/transport"
  8. )
  9. // Reference imports to suppress errors if they are not otherwise used.
  10. var _ = proto.Marshal
  11. var _ = fmt.Errorf
  12. var _ = math.Inf
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the proto package it is being compiled against.
  15. // A compilation error at this line likely means your copy of the
  16. // proto package needs to be updated.
  17. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  18. // Config is the master config of V2Ray. V2Ray takes this config as input and functions accordingly.
  19. type Config struct {
  20. // Inbound handler configurations. Must have at least one item.
  21. Inbound []*InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound,proto3" json:"inbound,omitempty"`
  22. // Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
  23. Outbound []*OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound,proto3" json:"outbound,omitempty"`
  24. // App is for configurations of all features in V2Ray. A feature must implement the Feature interface, and its config type must be registered through common.RegisterConfig.
  25. App []*serial.TypedMessage `protobuf:"bytes,4,rep,name=app,proto3" json:"app,omitempty"`
  26. // Transport settings.
  27. // Deprecated. Each inbound and outbound should choose their own transport config.
  28. // Date to remove: 2020-01-13
  29. Transport *transport.Config `protobuf:"bytes,5,opt,name=transport,proto3" json:"transport,omitempty"` // Deprecated: Do not use.
  30. // Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray.
  31. // V2Ray will ignore such config during initialization.
  32. Extension []*serial.TypedMessage `protobuf:"bytes,6,rep,name=extension,proto3" json:"extension,omitempty"`
  33. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  34. XXX_unrecognized []byte `json:"-"`
  35. XXX_sizecache int32 `json:"-"`
  36. }
  37. func (m *Config) Reset() { *m = Config{} }
  38. func (m *Config) String() string { return proto.CompactTextString(m) }
  39. func (*Config) ProtoMessage() {}
  40. func (*Config) Descriptor() ([]byte, []int) {
  41. return fileDescriptor_13704400b1045c6b, []int{0}
  42. }
  43. func (m *Config) XXX_Unmarshal(b []byte) error {
  44. return xxx_messageInfo_Config.Unmarshal(m, b)
  45. }
  46. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  47. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  48. }
  49. func (m *Config) XXX_Merge(src proto.Message) {
  50. xxx_messageInfo_Config.Merge(m, src)
  51. }
  52. func (m *Config) XXX_Size() int {
  53. return xxx_messageInfo_Config.Size(m)
  54. }
  55. func (m *Config) XXX_DiscardUnknown() {
  56. xxx_messageInfo_Config.DiscardUnknown(m)
  57. }
  58. var xxx_messageInfo_Config proto.InternalMessageInfo
  59. func (m *Config) GetInbound() []*InboundHandlerConfig {
  60. if m != nil {
  61. return m.Inbound
  62. }
  63. return nil
  64. }
  65. func (m *Config) GetOutbound() []*OutboundHandlerConfig {
  66. if m != nil {
  67. return m.Outbound
  68. }
  69. return nil
  70. }
  71. func (m *Config) GetApp() []*serial.TypedMessage {
  72. if m != nil {
  73. return m.App
  74. }
  75. return nil
  76. }
  77. // Deprecated: Do not use.
  78. func (m *Config) GetTransport() *transport.Config {
  79. if m != nil {
  80. return m.Transport
  81. }
  82. return nil
  83. }
  84. func (m *Config) GetExtension() []*serial.TypedMessage {
  85. if m != nil {
  86. return m.Extension
  87. }
  88. return nil
  89. }
  90. // InboundHandlerConfig is the configuration for inbound handler.
  91. type InboundHandlerConfig struct {
  92. // Tag of the inbound handler. The tag must be unique among all inbound handlers
  93. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  94. // Settings for how this inbound proxy is handled.
  95. ReceiverSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings,proto3" json:"receiver_settings,omitempty"`
  96. // Settings for inbound proxy. Must be one of the inbound proxies.
  97. ProxySettings *serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
  98. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  99. XXX_unrecognized []byte `json:"-"`
  100. XXX_sizecache int32 `json:"-"`
  101. }
  102. func (m *InboundHandlerConfig) Reset() { *m = InboundHandlerConfig{} }
  103. func (m *InboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  104. func (*InboundHandlerConfig) ProtoMessage() {}
  105. func (*InboundHandlerConfig) Descriptor() ([]byte, []int) {
  106. return fileDescriptor_13704400b1045c6b, []int{1}
  107. }
  108. func (m *InboundHandlerConfig) XXX_Unmarshal(b []byte) error {
  109. return xxx_messageInfo_InboundHandlerConfig.Unmarshal(m, b)
  110. }
  111. func (m *InboundHandlerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  112. return xxx_messageInfo_InboundHandlerConfig.Marshal(b, m, deterministic)
  113. }
  114. func (m *InboundHandlerConfig) XXX_Merge(src proto.Message) {
  115. xxx_messageInfo_InboundHandlerConfig.Merge(m, src)
  116. }
  117. func (m *InboundHandlerConfig) XXX_Size() int {
  118. return xxx_messageInfo_InboundHandlerConfig.Size(m)
  119. }
  120. func (m *InboundHandlerConfig) XXX_DiscardUnknown() {
  121. xxx_messageInfo_InboundHandlerConfig.DiscardUnknown(m)
  122. }
  123. var xxx_messageInfo_InboundHandlerConfig proto.InternalMessageInfo
  124. func (m *InboundHandlerConfig) GetTag() string {
  125. if m != nil {
  126. return m.Tag
  127. }
  128. return ""
  129. }
  130. func (m *InboundHandlerConfig) GetReceiverSettings() *serial.TypedMessage {
  131. if m != nil {
  132. return m.ReceiverSettings
  133. }
  134. return nil
  135. }
  136. func (m *InboundHandlerConfig) GetProxySettings() *serial.TypedMessage {
  137. if m != nil {
  138. return m.ProxySettings
  139. }
  140. return nil
  141. }
  142. // OutboundHandlerConfig is the configuration for outbound handler.
  143. type OutboundHandlerConfig struct {
  144. // Tag of this outbound handler.
  145. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  146. // Settings for how to dial connection for this outbound handler.
  147. SenderSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=sender_settings,json=senderSettings,proto3" json:"sender_settings,omitempty"`
  148. // Settings for this outbound proxy. Must be one of the outbound proxies.
  149. ProxySettings *serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
  150. // If not zero, this outbound will be expired in seconds. Not used for now.
  151. Expire int64 `protobuf:"varint,4,opt,name=expire,proto3" json:"expire,omitempty"`
  152. // Comment of this outbound handler. Not used for now.
  153. Comment string `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"`
  154. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  155. XXX_unrecognized []byte `json:"-"`
  156. XXX_sizecache int32 `json:"-"`
  157. }
  158. func (m *OutboundHandlerConfig) Reset() { *m = OutboundHandlerConfig{} }
  159. func (m *OutboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  160. func (*OutboundHandlerConfig) ProtoMessage() {}
  161. func (*OutboundHandlerConfig) Descriptor() ([]byte, []int) {
  162. return fileDescriptor_13704400b1045c6b, []int{2}
  163. }
  164. func (m *OutboundHandlerConfig) XXX_Unmarshal(b []byte) error {
  165. return xxx_messageInfo_OutboundHandlerConfig.Unmarshal(m, b)
  166. }
  167. func (m *OutboundHandlerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  168. return xxx_messageInfo_OutboundHandlerConfig.Marshal(b, m, deterministic)
  169. }
  170. func (m *OutboundHandlerConfig) XXX_Merge(src proto.Message) {
  171. xxx_messageInfo_OutboundHandlerConfig.Merge(m, src)
  172. }
  173. func (m *OutboundHandlerConfig) XXX_Size() int {
  174. return xxx_messageInfo_OutboundHandlerConfig.Size(m)
  175. }
  176. func (m *OutboundHandlerConfig) XXX_DiscardUnknown() {
  177. xxx_messageInfo_OutboundHandlerConfig.DiscardUnknown(m)
  178. }
  179. var xxx_messageInfo_OutboundHandlerConfig proto.InternalMessageInfo
  180. func (m *OutboundHandlerConfig) GetTag() string {
  181. if m != nil {
  182. return m.Tag
  183. }
  184. return ""
  185. }
  186. func (m *OutboundHandlerConfig) GetSenderSettings() *serial.TypedMessage {
  187. if m != nil {
  188. return m.SenderSettings
  189. }
  190. return nil
  191. }
  192. func (m *OutboundHandlerConfig) GetProxySettings() *serial.TypedMessage {
  193. if m != nil {
  194. return m.ProxySettings
  195. }
  196. return nil
  197. }
  198. func (m *OutboundHandlerConfig) GetExpire() int64 {
  199. if m != nil {
  200. return m.Expire
  201. }
  202. return 0
  203. }
  204. func (m *OutboundHandlerConfig) GetComment() string {
  205. if m != nil {
  206. return m.Comment
  207. }
  208. return ""
  209. }
  210. func init() {
  211. proto.RegisterType((*Config)(nil), "v2ray.core.Config")
  212. proto.RegisterType((*InboundHandlerConfig)(nil), "v2ray.core.InboundHandlerConfig")
  213. proto.RegisterType((*OutboundHandlerConfig)(nil), "v2ray.core.OutboundHandlerConfig")
  214. }
  215. func init() { proto.RegisterFile("v2ray.com/core/config.proto", fileDescriptor_13704400b1045c6b) }
  216. var fileDescriptor_13704400b1045c6b = []byte{
  217. // 409 bytes of a gzipped FileDescriptorProto
  218. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0xd3, 0xcf, 0x6b, 0xd4, 0x40,
  219. 0x14, 0x07, 0x70, 0x26, 0x89, 0xdb, 0xe6, 0x15, 0xd7, 0x75, 0x50, 0x19, 0xaa, 0x87, 0xb8, 0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, 0xa0, 0xdc,
  231. 0x05, 0xe5, 0x9f, 0xba, 0xa0, 0xa7, 0x2e, 0x67, 0xd6, 0x11, 0xfa, 0x06, 0xc2, 0x4d, 0x32, 0x76,
  232. 0x27, 0x22, 0xf1, 0x41, 0xfa, 0x64, 0xea, 0x37, 0x45, 0xee, 0x86, 0x1e, 0x7b, 0x8c, 0x64, 0x23,
  233. 0xa1, 0x6f, 0x21, 0xc4, 0x95, 0x45, 0x69, 0x2a, 0x25, 0xd9, 0x6c, 0xa7, 0xf9, 0x23, 0xfc, 0x10,
  234. 0xec, 0xfb, 0x8b, 0x60, 0xf9, 0x83, 0xc0, 0x83, 0x6d, 0x8f, 0x89, 0x2e, 0xc0, 0xb7, 0xa2, 0x64,
  235. 0x24, 0x22, 0x71, 0x98, 0x75, 0xa7, 0xf4, 0x1c, 0xee, 0x6b, 0xcc, 0xb1, 0xba, 0x41, 0x7d, 0x61,
  236. 0xd0, 0xda, 0x4a, 0x96, 0x86, 0x79, 0xfd, 0xf6, 0xff, 0x76, 0xfc, 0x62, 0x68, 0x70, 0xbe, 0xf6,
  237. 0xf4, 0x14, 0xe6, 0x8d, 0x56, 0xab, 0x76, 0xec, 0xe8, 0xef, 0xd4, 0xf1, 0x6e, 0xaf, 0x87, 0x76,
  238. 0xcb, 0x9f, 0x04, 0x1e, 0x6e, 0x7d, 0x71, 0x5b, 0xf2, 0x9c, 0xc1, 0x3d, 0x83, 0xb2, 0xf8, 0xf7,
  239. 0x34, 0x73, 0xc7, 0xff, 0x53, 0x16, 0xfa, 0x08, 0x66, 0xb8, 0x6a, 0x2a, 0x8d, 0x2c, 0x88, 0x48,
  240. 0xec, 0x67, 0xeb, 0x15, 0x65, 0xb0, 0xd7, 0x35, 0x41, 0xe9, 0x3e, 0x9e, 0x30, 0x1b, 0x96, 0xc7,
  241. 0x47, 0x30, 0xcf, 0x55, 0x3d, 0x99, 0xf6, 0x91, 0x7c, 0x09, 0xba, 0xe3, 0x37, 0x0f, 0x3e, 0xa7,
  242. 0x99, 0x68, 0xf9, 0x89, 0xd2, 0x78, 0x39, 0xeb, 0x7f, 0xa3, 0x17, 0xbf, 0x02, 0x00, 0x00, 0xff,
  243. 0xff, 0xde, 0x43, 0xe7, 0x49, 0xca, 0x03, 0x00, 0x00,
  244. }