config.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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.ProtoPackageIsVersion2 // 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. Transport *transport.Config `protobuf:"bytes,5,opt,name=transport,proto3" json:"transport,omitempty"`
  28. // Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray.
  29. // V2Ray will ignore such config during initialization.
  30. Extension []*serial.TypedMessage `protobuf:"bytes,6,rep,name=extension,proto3" json:"extension,omitempty"`
  31. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  32. XXX_unrecognized []byte `json:"-"`
  33. XXX_sizecache int32 `json:"-"`
  34. }
  35. func (m *Config) Reset() { *m = Config{} }
  36. func (m *Config) String() string { return proto.CompactTextString(m) }
  37. func (*Config) ProtoMessage() {}
  38. func (*Config) Descriptor() ([]byte, []int) {
  39. return fileDescriptor_13704400b1045c6b, []int{0}
  40. }
  41. func (m *Config) XXX_Unmarshal(b []byte) error {
  42. return xxx_messageInfo_Config.Unmarshal(m, b)
  43. }
  44. func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  45. return xxx_messageInfo_Config.Marshal(b, m, deterministic)
  46. }
  47. func (m *Config) XXX_Merge(src proto.Message) {
  48. xxx_messageInfo_Config.Merge(m, src)
  49. }
  50. func (m *Config) XXX_Size() int {
  51. return xxx_messageInfo_Config.Size(m)
  52. }
  53. func (m *Config) XXX_DiscardUnknown() {
  54. xxx_messageInfo_Config.DiscardUnknown(m)
  55. }
  56. var xxx_messageInfo_Config proto.InternalMessageInfo
  57. func (m *Config) GetInbound() []*InboundHandlerConfig {
  58. if m != nil {
  59. return m.Inbound
  60. }
  61. return nil
  62. }
  63. func (m *Config) GetOutbound() []*OutboundHandlerConfig {
  64. if m != nil {
  65. return m.Outbound
  66. }
  67. return nil
  68. }
  69. func (m *Config) GetApp() []*serial.TypedMessage {
  70. if m != nil {
  71. return m.App
  72. }
  73. return nil
  74. }
  75. func (m *Config) GetTransport() *transport.Config {
  76. if m != nil {
  77. return m.Transport
  78. }
  79. return nil
  80. }
  81. func (m *Config) GetExtension() []*serial.TypedMessage {
  82. if m != nil {
  83. return m.Extension
  84. }
  85. return nil
  86. }
  87. // InboundHandlerConfig is the configuration for inbound handler.
  88. type InboundHandlerConfig struct {
  89. // Tag of the inbound handler. The tag must be unique among all inbound handlers
  90. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  91. // Settings for how this inbound proxy is handled.
  92. ReceiverSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=receiver_settings,json=receiverSettings,proto3" json:"receiver_settings,omitempty"`
  93. // Settings for inbound proxy. Must be one of the inbound proxies.
  94. ProxySettings *serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
  95. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  96. XXX_unrecognized []byte `json:"-"`
  97. XXX_sizecache int32 `json:"-"`
  98. }
  99. func (m *InboundHandlerConfig) Reset() { *m = InboundHandlerConfig{} }
  100. func (m *InboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  101. func (*InboundHandlerConfig) ProtoMessage() {}
  102. func (*InboundHandlerConfig) Descriptor() ([]byte, []int) {
  103. return fileDescriptor_13704400b1045c6b, []int{1}
  104. }
  105. func (m *InboundHandlerConfig) XXX_Unmarshal(b []byte) error {
  106. return xxx_messageInfo_InboundHandlerConfig.Unmarshal(m, b)
  107. }
  108. func (m *InboundHandlerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  109. return xxx_messageInfo_InboundHandlerConfig.Marshal(b, m, deterministic)
  110. }
  111. func (m *InboundHandlerConfig) XXX_Merge(src proto.Message) {
  112. xxx_messageInfo_InboundHandlerConfig.Merge(m, src)
  113. }
  114. func (m *InboundHandlerConfig) XXX_Size() int {
  115. return xxx_messageInfo_InboundHandlerConfig.Size(m)
  116. }
  117. func (m *InboundHandlerConfig) XXX_DiscardUnknown() {
  118. xxx_messageInfo_InboundHandlerConfig.DiscardUnknown(m)
  119. }
  120. var xxx_messageInfo_InboundHandlerConfig proto.InternalMessageInfo
  121. func (m *InboundHandlerConfig) GetTag() string {
  122. if m != nil {
  123. return m.Tag
  124. }
  125. return ""
  126. }
  127. func (m *InboundHandlerConfig) GetReceiverSettings() *serial.TypedMessage {
  128. if m != nil {
  129. return m.ReceiverSettings
  130. }
  131. return nil
  132. }
  133. func (m *InboundHandlerConfig) GetProxySettings() *serial.TypedMessage {
  134. if m != nil {
  135. return m.ProxySettings
  136. }
  137. return nil
  138. }
  139. // OutboundHandlerConfig is the configuration for outbound handler.
  140. type OutboundHandlerConfig struct {
  141. // Tag of this outbound handler.
  142. Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
  143. // Settings for how to dial connection for this outbound handler.
  144. SenderSettings *serial.TypedMessage `protobuf:"bytes,2,opt,name=sender_settings,json=senderSettings,proto3" json:"sender_settings,omitempty"`
  145. // Settings for this outbound proxy. Must be one of the outbound proxies.
  146. ProxySettings *serial.TypedMessage `protobuf:"bytes,3,opt,name=proxy_settings,json=proxySettings,proto3" json:"proxy_settings,omitempty"`
  147. // If not zero, this outbound will be expired in seconds. Not used for now.
  148. Expire int64 `protobuf:"varint,4,opt,name=expire,proto3" json:"expire,omitempty"`
  149. // Comment of this outbound handler. Not used for now.
  150. Comment string `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"`
  151. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  152. XXX_unrecognized []byte `json:"-"`
  153. XXX_sizecache int32 `json:"-"`
  154. }
  155. func (m *OutboundHandlerConfig) Reset() { *m = OutboundHandlerConfig{} }
  156. func (m *OutboundHandlerConfig) String() string { return proto.CompactTextString(m) }
  157. func (*OutboundHandlerConfig) ProtoMessage() {}
  158. func (*OutboundHandlerConfig) Descriptor() ([]byte, []int) {
  159. return fileDescriptor_13704400b1045c6b, []int{2}
  160. }
  161. func (m *OutboundHandlerConfig) XXX_Unmarshal(b []byte) error {
  162. return xxx_messageInfo_OutboundHandlerConfig.Unmarshal(m, b)
  163. }
  164. func (m *OutboundHandlerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  165. return xxx_messageInfo_OutboundHandlerConfig.Marshal(b, m, deterministic)
  166. }
  167. func (m *OutboundHandlerConfig) XXX_Merge(src proto.Message) {
  168. xxx_messageInfo_OutboundHandlerConfig.Merge(m, src)
  169. }
  170. func (m *OutboundHandlerConfig) XXX_Size() int {
  171. return xxx_messageInfo_OutboundHandlerConfig.Size(m)
  172. }
  173. func (m *OutboundHandlerConfig) XXX_DiscardUnknown() {
  174. xxx_messageInfo_OutboundHandlerConfig.DiscardUnknown(m)
  175. }
  176. var xxx_messageInfo_OutboundHandlerConfig proto.InternalMessageInfo
  177. func (m *OutboundHandlerConfig) GetTag() string {
  178. if m != nil {
  179. return m.Tag
  180. }
  181. return ""
  182. }
  183. func (m *OutboundHandlerConfig) GetSenderSettings() *serial.TypedMessage {
  184. if m != nil {
  185. return m.SenderSettings
  186. }
  187. return nil
  188. }
  189. func (m *OutboundHandlerConfig) GetProxySettings() *serial.TypedMessage {
  190. if m != nil {
  191. return m.ProxySettings
  192. }
  193. return nil
  194. }
  195. func (m *OutboundHandlerConfig) GetExpire() int64 {
  196. if m != nil {
  197. return m.Expire
  198. }
  199. return 0
  200. }
  201. func (m *OutboundHandlerConfig) GetComment() string {
  202. if m != nil {
  203. return m.Comment
  204. }
  205. return ""
  206. }
  207. func init() {
  208. proto.RegisterType((*Config)(nil), "v2ray.core.Config")
  209. proto.RegisterType((*InboundHandlerConfig)(nil), "v2ray.core.InboundHandlerConfig")
  210. proto.RegisterType((*OutboundHandlerConfig)(nil), "v2ray.core.OutboundHandlerConfig")
  211. }
  212. func init() { proto.RegisterFile("v2ray.com/core/config.proto", fileDescriptor_13704400b1045c6b) }
  213. var fileDescriptor_13704400b1045c6b = []byte{
  214. // 405 bytes of a gzipped FileDescriptorProto
  215. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0x41, 0x6f, 0x94, 0x40,
  216. 0x1c, 0xc5, 0x33, 0x0b, 0x6e, 0xcb, 0xbf, 0x71, 0x5d, 0x27, 0x6a, 0x26, 0xd5, 0x03, 0x6e, 0x52,
  217. 0xc3, 0x69, 0x30, 0x78, 0x31, 0x4d, 0xbc, 0x58, 0x0f, 0x6a, 0xd2, 0xd4, 0x50, 0xe3, 0xc1, 0x4b,
  218. 0x33, 0x85, 0xbf, 0x84, 0xa4, 0xcc, 0x90, 0x99, 0x69, 0xb3, 0x7c, 0x25, 0xbf, 0x87, 0x37, 0xbf,
  219. 0x91, 0x17, 0x03, 0x03, 0x0b, 0xd5, 0x3d, 0xb8, 0x26, 0x3d, 0xc1, 0xf0, 0xe6, 0xf7, 0xde, 0xff,
  220. 0x01, 0x03, 0x4f, 0x6f, 0x12, 0x2d, 0x1a, 0x9e, 0xa9, 0x2a, 0xce, 0x94, 0xc6, 0x38, 0x53, 0xf2,
  221. 0x5b, 0x59, 0xf0, 0x5a, 0x2b, 0xab, 0x28, 0x0c, 0xa2, 0xc6, 0xc3, 0x97, 0x7f, 0x6d, 0xac, 0x2a,
  222. 0x25, 0x63, 0x83, 0xba, 0x14, 0x57, 0xb1, 0x6d, 0x6a, 0xcc, 0x2f, 0x2a, 0x34, 0x46, 0x14, 0xe8,
  223. 0xe8, 0xc3, 0xa3, 0x3f, 0x08, 0xab, 0x85, 0x34, 0xb5, 0xd2, 0xf6, 0x56, 0xc8, 0xea, 0xc7, 0x0c,
  224. 0xe6, 0x27, 0xdd, 0x03, 0x7a, 0x0c, 0x7b, 0xa5, 0xbc, 0x54, 0xd7, 0x32, 0x67, 0x24, 0xf4, 0xa2,
  225. 0x83, 0x24, 0xe4, 0xe3, 0x04, 0xfc, 0x83, 0x93, 0xde, 0x0b, 0x99, 0x5f, 0xa1, 0x76, 0x48, 0x3a,
  226. 0x00, 0xf4, 0x0d, 0xec, 0xab, 0x6b, 0xeb, 0xe0, 0x59, 0x07, 0x3f, 0x9f, 0xc2, 0x67, 0xbd, 0x76,
  227. 0x9b, 0xde, 0x20, 0xf4, 0x35, 0x78, 0xa2, 0xae, 0x99, 0xdf, 0x91, 0x2f, 0xa6, 0xa4, 0x2b, 0xca,
  228. 0x5d, 0x51, 0xfe, 0xb9, 0x2d, 0x7a, 0xea, 0x7a, 0xa6, 0x2d, 0x42, 0x8f, 0x21, 0xd8, 0x34, 0x63,
  229. 0xf7, 0x42, 0x12, 0x1d, 0x24, 0xcf, 0xa6, 0xfc, 0x46, 0xe4, 0x7d, 0xe8, 0xb8, 0x9d, 0xbe, 0x83,
  230. 0x00, 0xd7, 0x16, 0xa5, 0x29, 0x95, 0x64, 0xf3, 0x9d, 0xb2, 0x47, 0xf0, 0xa3, 0xbf, 0xef, 0x2d,
  231. 0xfd, 0xd5, 0x4f, 0x02, 0x8f, 0xb6, 0xbd, 0x22, 0xba, 0x04, 0xcf, 0x8a, 0x82, 0x91, 0x90, 0x44,
  232. 0x41, 0xda, 0xde, 0xd2, 0x73, 0x78, 0xa8, 0x31, 0xc3, 0xf2, 0x06, 0xf5, 0x85, 0x41, 0x6b, 0x4b,
  233. 0x59, 0x18, 0x36, 0xeb, 0x46, 0xff, 0xd7, 0xf8, 0xe5, 0x60, 0x70, 0xde, 0xf3, 0xf4, 0x14, 0x16,
  234. 0xb5, 0x56, 0xeb, 0x66, 0x74, 0xf4, 0x76, 0x72, 0xbc, 0xdf, 0xd1, 0x83, 0xdd, 0xea, 0x17, 0x81,
  235. 0xc7, 0x5b, 0x3f, 0xda, 0x96, 0x3e, 0x67, 0xf0, 0xc0, 0xa0, 0xcc, 0xff, 0xbf, 0xcd, 0xc2, 0xe1,
  236. 0x77, 0xd4, 0x85, 0x3e, 0x81, 0x39, 0xae, 0xeb, 0x52, 0x23, 0xf3, 0x43, 0x12, 0x79, 0x69, 0xbf,
  237. 0xa2, 0x0c, 0xf6, 0x5a, 0x13, 0x94, 0xee, 0xc7, 0x09, 0xd2, 0x61, 0xf9, 0xf6, 0x08, 0x16, 0x99,
  238. 0xaa, 0x26, 0x69, 0x9f, 0xc8, 0x57, 0xbf, 0xbd, 0x7e, 0x9f, 0xc1, 0x97, 0x24, 0x15, 0x0d, 0x3f,
  239. 0x51, 0x1a, 0x2f, 0xe7, 0xdd, 0x11, 0x7a, 0xf5, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x15, 0xee,
  240. 0x31, 0xc6, 0x03, 0x00, 0x00,
  241. }