config.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. // Code generated by protoc-gen-go.
  2. // source: v2ray.com/core/config.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package core is a generated protocol buffer package.
  6. It is generated from these files:
  7. v2ray.com/core/config.proto
  8. It has these top-level messages:
  9. AllocationStrategyConcurrency
  10. AllocationStrategyRefresh
  11. AllocationStrategy
  12. InboundConnectionConfig
  13. OutboundConnectionConfig
  14. Config
  15. */
  16. package core
  17. import proto "github.com/golang/protobuf/proto"
  18. import fmt "fmt"
  19. import math "math"
  20. import v2ray_core_common_loader "v2ray.com/core/common/loader"
  21. import v2ray_core_common_net "v2ray.com/core/common/net"
  22. import v2ray_core_common_net1 "v2ray.com/core/common/net"
  23. import v2ray_core_common_log "v2ray.com/core/common/log"
  24. import v2ray_core_transport_internet "v2ray.com/core/transport/internet"
  25. import v2ray_core_transport "v2ray.com/core/transport"
  26. // Reference imports to suppress errors if they are not otherwise used.
  27. var _ = proto.Marshal
  28. var _ = fmt.Errorf
  29. var _ = math.Inf
  30. // This is a compile-time assertion to ensure that this generated file
  31. // is compatible with the proto package it is being compiled against.
  32. // A compilation error at this line likely means your copy of the
  33. // proto package needs to be updated.
  34. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  35. // Configuration serialization format.
  36. type ConfigFormat int32
  37. const (
  38. ConfigFormat_Protobuf ConfigFormat = 0
  39. ConfigFormat_JSON ConfigFormat = 1
  40. )
  41. var ConfigFormat_name = map[int32]string{
  42. 0: "Protobuf",
  43. 1: "JSON",
  44. }
  45. var ConfigFormat_value = map[string]int32{
  46. "Protobuf": 0,
  47. "JSON": 1,
  48. }
  49. func (x ConfigFormat) String() string {
  50. return proto.EnumName(ConfigFormat_name, int32(x))
  51. }
  52. func (ConfigFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  53. type AllocationStrategy_Type int32
  54. const (
  55. // Always allocate all connection handlers.
  56. AllocationStrategy_Always AllocationStrategy_Type = 0
  57. // Randomly allocate specific range of handlers.
  58. AllocationStrategy_Random AllocationStrategy_Type = 1
  59. // External. Not supported yet.
  60. AllocationStrategy_External AllocationStrategy_Type = 2
  61. )
  62. var AllocationStrategy_Type_name = map[int32]string{
  63. 0: "Always",
  64. 1: "Random",
  65. 2: "External",
  66. }
  67. var AllocationStrategy_Type_value = map[string]int32{
  68. "Always": 0,
  69. "Random": 1,
  70. "External": 2,
  71. }
  72. func (x AllocationStrategy_Type) String() string {
  73. return proto.EnumName(AllocationStrategy_Type_name, int32(x))
  74. }
  75. func (AllocationStrategy_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
  76. type AllocationStrategyConcurrency struct {
  77. Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
  78. }
  79. func (m *AllocationStrategyConcurrency) Reset() { *m = AllocationStrategyConcurrency{} }
  80. func (m *AllocationStrategyConcurrency) String() string { return proto.CompactTextString(m) }
  81. func (*AllocationStrategyConcurrency) ProtoMessage() {}
  82. func (*AllocationStrategyConcurrency) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  83. type AllocationStrategyRefresh struct {
  84. Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
  85. }
  86. func (m *AllocationStrategyRefresh) Reset() { *m = AllocationStrategyRefresh{} }
  87. func (m *AllocationStrategyRefresh) String() string { return proto.CompactTextString(m) }
  88. func (*AllocationStrategyRefresh) ProtoMessage() {}
  89. func (*AllocationStrategyRefresh) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  90. type AllocationStrategy struct {
  91. Type AllocationStrategy_Type `protobuf:"varint,1,opt,name=type,enum=v2ray.core.AllocationStrategy_Type" json:"type,omitempty"`
  92. // Number of handlers (ports) running in parallel.
  93. // Default value is 3 if unset.
  94. Concurrency *AllocationStrategyConcurrency `protobuf:"bytes,2,opt,name=concurrency" json:"concurrency,omitempty"`
  95. // Number of minutes before a handler is regenerated.
  96. // Default value is 5 if unset.
  97. Refresh *AllocationStrategyRefresh `protobuf:"bytes,3,opt,name=refresh" json:"refresh,omitempty"`
  98. }
  99. func (m *AllocationStrategy) Reset() { *m = AllocationStrategy{} }
  100. func (m *AllocationStrategy) String() string { return proto.CompactTextString(m) }
  101. func (*AllocationStrategy) ProtoMessage() {}
  102. func (*AllocationStrategy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  103. func (m *AllocationStrategy) GetConcurrency() *AllocationStrategyConcurrency {
  104. if m != nil {
  105. return m.Concurrency
  106. }
  107. return nil
  108. }
  109. func (m *AllocationStrategy) GetRefresh() *AllocationStrategyRefresh {
  110. if m != nil {
  111. return m.Refresh
  112. }
  113. return nil
  114. }
  115. // Config for an inbound connection handler.
  116. type InboundConnectionConfig struct {
  117. // Protocol specific settings. Must be one of the supported protocols.
  118. Settings *v2ray_core_common_loader.TypedSettings `protobuf:"bytes,1,opt,name=settings" json:"settings,omitempty"`
  119. // Range of port number to run on. Both inclusive.
  120. PortRange *v2ray_core_common_net.PortRange `protobuf:"bytes,2,opt,name=port_range,json=portRange" json:"port_range,omitempty"`
  121. // IP address to listen on. 0.0.0.0 if unset.
  122. ListenOn *v2ray_core_common_net1.IPOrDomain `protobuf:"bytes,3,opt,name=listen_on,json=listenOn" json:"listen_on,omitempty"`
  123. // Tag of this handler.
  124. Tag string `protobuf:"bytes,4,opt,name=tag" json:"tag,omitempty"`
  125. AllocationStrategy *AllocationStrategy `protobuf:"bytes,5,opt,name=allocation_strategy,json=allocationStrategy" json:"allocation_strategy,omitempty"`
  126. StreamSettings *v2ray_core_transport_internet.StreamConfig `protobuf:"bytes,6,opt,name=stream_settings,json=streamSettings" json:"stream_settings,omitempty"`
  127. AllowPassiveConnection bool `protobuf:"varint,7,opt,name=allow_passive_connection,json=allowPassiveConnection" json:"allow_passive_connection,omitempty"`
  128. }
  129. func (m *InboundConnectionConfig) Reset() { *m = InboundConnectionConfig{} }
  130. func (m *InboundConnectionConfig) String() string { return proto.CompactTextString(m) }
  131. func (*InboundConnectionConfig) ProtoMessage() {}
  132. func (*InboundConnectionConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  133. func (m *InboundConnectionConfig) GetSettings() *v2ray_core_common_loader.TypedSettings {
  134. if m != nil {
  135. return m.Settings
  136. }
  137. return nil
  138. }
  139. func (m *InboundConnectionConfig) GetPortRange() *v2ray_core_common_net.PortRange {
  140. if m != nil {
  141. return m.PortRange
  142. }
  143. return nil
  144. }
  145. func (m *InboundConnectionConfig) GetListenOn() *v2ray_core_common_net1.IPOrDomain {
  146. if m != nil {
  147. return m.ListenOn
  148. }
  149. return nil
  150. }
  151. func (m *InboundConnectionConfig) GetAllocationStrategy() *AllocationStrategy {
  152. if m != nil {
  153. return m.AllocationStrategy
  154. }
  155. return nil
  156. }
  157. func (m *InboundConnectionConfig) GetStreamSettings() *v2ray_core_transport_internet.StreamConfig {
  158. if m != nil {
  159. return m.StreamSettings
  160. }
  161. return nil
  162. }
  163. // Config for an outbound connection handler.
  164. type OutboundConnectionConfig struct {
  165. Settings *v2ray_core_common_loader.TypedSettings `protobuf:"bytes,1,opt,name=settings" json:"settings,omitempty"`
  166. // IP address to send data through. 0.0.0.0 if unset.
  167. SendThrough *v2ray_core_common_net1.IPOrDomain `protobuf:"bytes,2,opt,name=send_through,json=sendThrough" json:"send_through,omitempty"`
  168. StreamSettings *v2ray_core_transport_internet.StreamConfig `protobuf:"bytes,3,opt,name=stream_settings,json=streamSettings" json:"stream_settings,omitempty"`
  169. Tag string `protobuf:"bytes,4,opt,name=tag" json:"tag,omitempty"`
  170. }
  171. func (m *OutboundConnectionConfig) Reset() { *m = OutboundConnectionConfig{} }
  172. func (m *OutboundConnectionConfig) String() string { return proto.CompactTextString(m) }
  173. func (*OutboundConnectionConfig) ProtoMessage() {}
  174. func (*OutboundConnectionConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  175. func (m *OutboundConnectionConfig) GetSettings() *v2ray_core_common_loader.TypedSettings {
  176. if m != nil {
  177. return m.Settings
  178. }
  179. return nil
  180. }
  181. func (m *OutboundConnectionConfig) GetSendThrough() *v2ray_core_common_net1.IPOrDomain {
  182. if m != nil {
  183. return m.SendThrough
  184. }
  185. return nil
  186. }
  187. func (m *OutboundConnectionConfig) GetStreamSettings() *v2ray_core_transport_internet.StreamConfig {
  188. if m != nil {
  189. return m.StreamSettings
  190. }
  191. return nil
  192. }
  193. type Config struct {
  194. // Inbound handler configurations. Must have at least one item.
  195. Inbound []*InboundConnectionConfig `protobuf:"bytes,1,rep,name=inbound" json:"inbound,omitempty"`
  196. // Outbound handler configurations. Must have at least one item. The first item is used as default for routing.
  197. Outbound []*OutboundConnectionConfig `protobuf:"bytes,2,rep,name=outbound" json:"outbound,omitempty"`
  198. Log *v2ray_core_common_log.Config `protobuf:"bytes,3,opt,name=log" json:"log,omitempty"`
  199. // App configuration. Must be one in the app directory.
  200. App []*v2ray_core_common_loader.TypedSettings `protobuf:"bytes,4,rep,name=app" json:"app,omitempty"`
  201. Transport *v2ray_core_transport.Config `protobuf:"bytes,5,opt,name=transport" json:"transport,omitempty"`
  202. }
  203. func (m *Config) Reset() { *m = Config{} }
  204. func (m *Config) String() string { return proto.CompactTextString(m) }
  205. func (*Config) ProtoMessage() {}
  206. func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  207. func (m *Config) GetInbound() []*InboundConnectionConfig {
  208. if m != nil {
  209. return m.Inbound
  210. }
  211. return nil
  212. }
  213. func (m *Config) GetOutbound() []*OutboundConnectionConfig {
  214. if m != nil {
  215. return m.Outbound
  216. }
  217. return nil
  218. }
  219. func (m *Config) GetLog() *v2ray_core_common_log.Config {
  220. if m != nil {
  221. return m.Log
  222. }
  223. return nil
  224. }
  225. func (m *Config) GetApp() []*v2ray_core_common_loader.TypedSettings {
  226. if m != nil {
  227. return m.App
  228. }
  229. return nil
  230. }
  231. func (m *Config) GetTransport() *v2ray_core_transport.Config {
  232. if m != nil {
  233. return m.Transport
  234. }
  235. return nil
  236. }
  237. func init() {
  238. proto.RegisterType((*AllocationStrategyConcurrency)(nil), "v2ray.core.AllocationStrategyConcurrency")
  239. proto.RegisterType((*AllocationStrategyRefresh)(nil), "v2ray.core.AllocationStrategyRefresh")
  240. proto.RegisterType((*AllocationStrategy)(nil), "v2ray.core.AllocationStrategy")
  241. proto.RegisterType((*InboundConnectionConfig)(nil), "v2ray.core.InboundConnectionConfig")
  242. proto.RegisterType((*OutboundConnectionConfig)(nil), "v2ray.core.OutboundConnectionConfig")
  243. proto.RegisterType((*Config)(nil), "v2ray.core.Config")
  244. proto.RegisterEnum("v2ray.core.ConfigFormat", ConfigFormat_name, ConfigFormat_value)
  245. proto.RegisterEnum("v2ray.core.AllocationStrategy_Type", AllocationStrategy_Type_name, AllocationStrategy_Type_value)
  246. }
  247. func init() { proto.RegisterFile("v2ray.com/core/config.proto", fileDescriptor0) }
  248. var fileDescriptor0 = []byte{
  249. // 697 bytes of a gzipped FileDescriptorProto
  250. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x94, 0xdd, 0x6e, 0xd3, 0x3e,
  251. 0x18, 0xc6, 0x97, 0xb6, 0xeb, 0xda, 0xb7, 0xfb, 0xef, 0x5f, 0x19, 0x04, 0x61, 0x30, 0x54, 0xba,
  252. 0xaf, 0xf2, 0xa1, 0x54, 0x14, 0x21, 0x3e, 0x24, 0x18, 0x5b, 0x07, 0xd2, 0x40, 0xa2, 0x95, 0xbb,
  253. 0x23, 0x4e, 0x2a, 0x2f, 0xf5, 0xb2, 0x48, 0x89, 0x1d, 0x39, 0xee, 0x46, 0x2f, 0x81, 0x03, 0x2e,
  254. 0x86, 0x5b, 0xe1, 0x8a, 0x90, 0x1d, 0x37, 0xcd, 0x68, 0x33, 0x26, 0x21, 0xce, 0x9c, 0xf8, 0xf9,
  255. 0xbd, 0xb6, 0x9f, 0xe7, 0xb5, 0xe1, 0xee, 0x79, 0x47, 0x90, 0x89, 0xe3, 0xf2, 0xb0, 0xed, 0x72,
  256. 0x41, 0xdb, 0x2e, 0x67, 0xa7, 0xbe, 0xe7, 0x44, 0x82, 0x4b, 0x8e, 0x60, 0x3a, 0x29, 0xe8, 0xfa,
  257. 0xee, 0x9c, 0x30, 0x0c, 0x39, 0x6b, 0x07, 0x9c, 0x8c, 0xa8, 0x68, 0xcb, 0x49, 0x44, 0x13, 0x68,
  258. 0x7d, 0x6b, 0xb1, 0x90, 0x51, 0xd9, 0x8e, 0xb8, 0x90, 0x46, 0xb5, 0x9b, 0xaf, 0x22, 0xa3, 0x91,
  259. 0xa0, 0x71, 0x6c, 0x84, 0x3b, 0x79, 0xeb, 0x7a, 0x97, 0xf6, 0xba, 0xee, 0xfc, 0xa6, 0x93, 0x82,
  260. 0xb0, 0x58, 0x2d, 0xd8, 0xf6, 0x99, 0xa4, 0x42, 0x15, 0xbe, 0xa4, 0xdf, 0xce, 0xd5, 0x67, 0x65,
  261. 0xcd, 0xe7, 0xb0, 0xb1, 0x1f, 0x04, 0xdc, 0x25, 0xd2, 0xe7, 0x6c, 0x20, 0x05, 0x91, 0xd4, 0x9b,
  262. 0x74, 0x39, 0x73, 0xc7, 0x42, 0x50, 0xe6, 0x4e, 0xd0, 0x4d, 0x58, 0x3e, 0x27, 0xc1, 0x98, 0xda,
  263. 0x56, 0xc3, 0x6a, 0xfd, 0x87, 0x93, 0x8f, 0xe6, 0x53, 0xb8, 0x33, 0x8f, 0x61, 0x7a, 0x2a, 0x68,
  264. 0x7c, 0x96, 0x83, 0x7c, 0x2b, 0x00, 0x9a, 0x67, 0xd0, 0x0b, 0x28, 0x29, 0x73, 0xb5, 0x76, 0xad,
  265. 0xb3, 0xe9, 0xcc, 0x22, 0x71, 0xe6, 0xd5, 0xce, 0xf1, 0x24, 0xa2, 0x58, 0x03, 0xe8, 0x13, 0xd4,
  266. 0xdc, 0xd9, 0x3e, 0xed, 0x42, 0xc3, 0x6a, 0xd5, 0x3a, 0x0f, 0xaf, 0xe6, 0x33, 0x07, 0xc3, 0x59,
  267. 0x1a, 0xed, 0xc1, 0x8a, 0x48, 0x76, 0x6f, 0x17, 0x75, 0xa1, 0xed, 0xab, 0x0b, 0x99, 0xa3, 0xe2,
  268. 0x29, 0xd5, 0x7c, 0x02, 0x25, 0xb5, 0x37, 0x04, 0x50, 0xde, 0x0f, 0x2e, 0xc8, 0x24, 0xae, 0x2f,
  269. 0xa9, 0x31, 0x26, 0x6c, 0xc4, 0xc3, 0xba, 0x85, 0x56, 0xa1, 0xf2, 0xfe, 0xab, 0xca, 0x89, 0x04,
  270. 0xf5, 0x42, 0xf3, 0x67, 0x11, 0x6e, 0x1f, 0xb1, 0x13, 0x3e, 0x66, 0xa3, 0x2e, 0x67, 0x8c, 0xba,
  271. 0xaa, 0x76, 0x57, 0xe7, 0x82, 0xba, 0x50, 0x89, 0xa9, 0x94, 0x3e, 0xf3, 0x62, 0x6d, 0x4a, 0xad,
  272. 0xb3, 0x9b, 0xdd, 0x4b, 0xd2, 0x1f, 0x4e, 0xd2, 0x97, 0xda, 0x8f, 0xd1, 0xc0, 0xc8, 0x71, 0x0a,
  273. 0xa2, 0x3d, 0x00, 0x95, 0xf5, 0x50, 0x10, 0xe6, 0x51, 0xe3, 0x4d, 0x63, 0x41, 0x19, 0x46, 0xa5,
  274. 0xd3, 0xe7, 0x42, 0x62, 0xa5, 0xc3, 0xd5, 0x68, 0x3a, 0x44, 0x6f, 0xa1, 0x1a, 0xf8, 0xb1, 0xa4,
  275. 0x6c, 0xc8, 0x99, 0xb1, 0xe4, 0x41, 0x0e, 0x7f, 0xd4, 0xef, 0x89, 0x43, 0x1e, 0x12, 0x9f, 0xe1,
  276. 0x4a, 0xc2, 0xf4, 0x18, 0xaa, 0x43, 0x51, 0x12, 0xcf, 0x2e, 0x35, 0xac, 0x56, 0x15, 0xab, 0x21,
  277. 0xea, 0xc1, 0x0d, 0x92, 0xfa, 0x38, 0x8c, 0x8d, 0x91, 0xf6, 0xb2, 0xae, 0x7d, 0xff, 0x0f, 0x76,
  278. 0x23, 0x32, 0xdf, 0x39, 0xc7, 0xf0, 0x7f, 0x2c, 0x05, 0x25, 0xe1, 0x30, 0xf5, 0xab, 0xac, 0x8b,
  279. 0x3d, 0xce, 0x16, 0x4b, 0xfb, 0xde, 0x99, 0xde, 0x13, 0x67, 0xa0, 0xa9, 0xc4, 0x6e, 0xbc, 0x96,
  280. 0xd4, 0x98, 0x7a, 0x88, 0x5e, 0x82, 0xad, 0xd6, 0xba, 0x18, 0x46, 0x24, 0x8e, 0xfd, 0x73, 0x3a,
  281. 0x74, 0xd3, 0x80, 0xec, 0x95, 0x86, 0xd5, 0xaa, 0xe0, 0x5b, 0x7a, 0xbe, 0x9f, 0x4c, 0xcf, 0xe2,
  282. 0x6b, 0x7e, 0x2f, 0x80, 0xdd, 0x1b, 0xcb, 0x7f, 0x98, 0xea, 0x21, 0xac, 0xc6, 0x94, 0x8d, 0x86,
  283. 0xf2, 0x4c, 0xf0, 0xb1, 0x77, 0x66, 0x72, 0xbd, 0x46, 0x2e, 0x35, 0x85, 0x1d, 0x27, 0xd4, 0x22,
  284. 0xdf, 0x8a, 0x7f, 0xef, 0xdb, 0x5c, 0xe0, 0xcd, 0x1f, 0x05, 0x28, 0x9b, 0xd3, 0xbf, 0x81, 0x15,
  285. 0x3f, 0x69, 0x77, 0xdb, 0x6a, 0x14, 0x5b, 0xb5, 0xcb, 0xf7, 0x3c, 0xe7, 0x26, 0xe0, 0x29, 0x83,
  286. 0xde, 0x41, 0x85, 0x1b, 0x63, 0xed, 0x82, 0xe6, 0xb7, 0xb2, 0x7c, 0x9e, 0xe9, 0x38, 0xa5, 0x50,
  287. 0x1b, 0x8a, 0x01, 0xf7, 0xcc, 0x39, 0x37, 0x16, 0x3a, 0xef, 0x39, 0x86, 0x52, 0x4a, 0xf4, 0x0a,
  288. 0x8a, 0x24, 0x8a, 0xec, 0x92, 0x5e, 0xed, 0xda, 0x51, 0x29, 0x06, 0xbd, 0x86, 0x6a, 0x6a, 0x9e,
  289. 0x69, 0xef, 0x7b, 0x8b, 0x9d, 0x35, 0x0b, 0xce, 0xe4, 0x8f, 0x76, 0x60, 0x35, 0xf9, 0xf9, 0x81,
  290. 0x8b, 0x90, 0x48, 0xf5, 0x6c, 0xf4, 0xd5, 0x3b, 0x7d, 0x32, 0x3e, 0xad, 0x2f, 0xa1, 0x0a, 0x94,
  291. 0x3e, 0x0e, 0x7a, 0x9f, 0xeb, 0xd6, 0xc1, 0x26, 0xac, 0xb9, 0x3c, 0xcc, 0x54, 0x3d, 0xa8, 0x25,
  292. 0x9c, 0x56, 0x7f, 0x29, 0xa9, 0x5f, 0x27, 0x65, 0xfd, 0xc4, 0x3f, 0xfb, 0x15, 0x00, 0x00, 0xff,
  293. 0xff, 0x1c, 0xfa, 0xca, 0xe6, 0x04, 0x07, 0x00, 0x00,
  294. }