config.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. package receiver
  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_common_net "v2ray.com/core/common/net"
  7. import v2ray_core_common_net1 "v2ray.com/core/common/net"
  8. import v2ray_core_transport_internet "v2ray.com/core/transport/internet"
  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. type AllocationStrategy_Type int32
  19. const (
  20. // Always allocate all connection handlers.
  21. AllocationStrategy_Always AllocationStrategy_Type = 0
  22. // Randomly allocate specific range of handlers.
  23. AllocationStrategy_Random AllocationStrategy_Type = 1
  24. // External. Not supported yet.
  25. AllocationStrategy_External AllocationStrategy_Type = 2
  26. )
  27. var AllocationStrategy_Type_name = map[int32]string{
  28. 0: "Always",
  29. 1: "Random",
  30. 2: "External",
  31. }
  32. var AllocationStrategy_Type_value = map[string]int32{
  33. "Always": 0,
  34. "Random": 1,
  35. "External": 2,
  36. }
  37. func (x AllocationStrategy_Type) String() string {
  38. return proto.EnumName(AllocationStrategy_Type_name, int32(x))
  39. }
  40. func (AllocationStrategy_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
  41. type AllocationStrategy struct {
  42. Type AllocationStrategy_Type `protobuf:"varint,1,opt,name=type,enum=v2ray.core.app.receiver.AllocationStrategy_Type" json:"type,omitempty"`
  43. // Number of handlers (ports) running in parallel.
  44. // Default value is 3 if unset.
  45. Concurrency *AllocationStrategy_AllocationStrategyConcurrency `protobuf:"bytes,2,opt,name=concurrency" json:"concurrency,omitempty"`
  46. // Number of minutes before a handler is regenerated.
  47. // Default value is 5 if unset.
  48. Refresh *AllocationStrategy_AllocationStrategyRefresh `protobuf:"bytes,3,opt,name=refresh" json:"refresh,omitempty"`
  49. }
  50. func (m *AllocationStrategy) Reset() { *m = AllocationStrategy{} }
  51. func (m *AllocationStrategy) String() string { return proto.CompactTextString(m) }
  52. func (*AllocationStrategy) ProtoMessage() {}
  53. func (*AllocationStrategy) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  54. func (m *AllocationStrategy) GetType() AllocationStrategy_Type {
  55. if m != nil {
  56. return m.Type
  57. }
  58. return AllocationStrategy_Always
  59. }
  60. func (m *AllocationStrategy) GetConcurrency() *AllocationStrategy_AllocationStrategyConcurrency {
  61. if m != nil {
  62. return m.Concurrency
  63. }
  64. return nil
  65. }
  66. func (m *AllocationStrategy) GetRefresh() *AllocationStrategy_AllocationStrategyRefresh {
  67. if m != nil {
  68. return m.Refresh
  69. }
  70. return nil
  71. }
  72. type AllocationStrategy_AllocationStrategyConcurrency struct {
  73. Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
  74. }
  75. func (m *AllocationStrategy_AllocationStrategyConcurrency) Reset() {
  76. *m = AllocationStrategy_AllocationStrategyConcurrency{}
  77. }
  78. func (m *AllocationStrategy_AllocationStrategyConcurrency) String() string {
  79. return proto.CompactTextString(m)
  80. }
  81. func (*AllocationStrategy_AllocationStrategyConcurrency) ProtoMessage() {}
  82. func (*AllocationStrategy_AllocationStrategyConcurrency) Descriptor() ([]byte, []int) {
  83. return fileDescriptor0, []int{0, 0}
  84. }
  85. func (m *AllocationStrategy_AllocationStrategyConcurrency) GetValue() uint32 {
  86. if m != nil {
  87. return m.Value
  88. }
  89. return 0
  90. }
  91. type AllocationStrategy_AllocationStrategyRefresh struct {
  92. Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
  93. }
  94. func (m *AllocationStrategy_AllocationStrategyRefresh) Reset() {
  95. *m = AllocationStrategy_AllocationStrategyRefresh{}
  96. }
  97. func (m *AllocationStrategy_AllocationStrategyRefresh) String() string {
  98. return proto.CompactTextString(m)
  99. }
  100. func (*AllocationStrategy_AllocationStrategyRefresh) ProtoMessage() {}
  101. func (*AllocationStrategy_AllocationStrategyRefresh) Descriptor() ([]byte, []int) {
  102. return fileDescriptor0, []int{0, 1}
  103. }
  104. func (m *AllocationStrategy_AllocationStrategyRefresh) GetValue() uint32 {
  105. if m != nil {
  106. return m.Value
  107. }
  108. return 0
  109. }
  110. type StreamReceiverConfig struct {
  111. PortRange *v2ray_core_common_net1.PortRange `protobuf:"bytes,1,opt,name=port_range,json=portRange" json:"port_range,omitempty"`
  112. Listen *v2ray_core_common_net.IPOrDomain `protobuf:"bytes,2,opt,name=listen" json:"listen,omitempty"`
  113. AllocationStrategy *AllocationStrategy `protobuf:"bytes,3,opt,name=allocation_strategy,json=allocationStrategy" json:"allocation_strategy,omitempty"`
  114. StreamSettings *v2ray_core_transport_internet.StreamConfig `protobuf:"bytes,4,opt,name=stream_settings,json=streamSettings" json:"stream_settings,omitempty"`
  115. }
  116. func (m *StreamReceiverConfig) Reset() { *m = StreamReceiverConfig{} }
  117. func (m *StreamReceiverConfig) String() string { return proto.CompactTextString(m) }
  118. func (*StreamReceiverConfig) ProtoMessage() {}
  119. func (*StreamReceiverConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  120. func (m *StreamReceiverConfig) GetPortRange() *v2ray_core_common_net1.PortRange {
  121. if m != nil {
  122. return m.PortRange
  123. }
  124. return nil
  125. }
  126. func (m *StreamReceiverConfig) GetListen() *v2ray_core_common_net.IPOrDomain {
  127. if m != nil {
  128. return m.Listen
  129. }
  130. return nil
  131. }
  132. func (m *StreamReceiverConfig) GetAllocationStrategy() *AllocationStrategy {
  133. if m != nil {
  134. return m.AllocationStrategy
  135. }
  136. return nil
  137. }
  138. func (m *StreamReceiverConfig) GetStreamSettings() *v2ray_core_transport_internet.StreamConfig {
  139. if m != nil {
  140. return m.StreamSettings
  141. }
  142. return nil
  143. }
  144. type DatagramReceiverConfig struct {
  145. PortRange *v2ray_core_common_net1.PortRange `protobuf:"bytes,1,opt,name=port_range,json=portRange" json:"port_range,omitempty"`
  146. Listen *v2ray_core_common_net.IPOrDomain `protobuf:"bytes,2,opt,name=listen" json:"listen,omitempty"`
  147. AllocationStrategy *AllocationStrategy `protobuf:"bytes,3,opt,name=allocation_strategy,json=allocationStrategy" json:"allocation_strategy,omitempty"`
  148. }
  149. func (m *DatagramReceiverConfig) Reset() { *m = DatagramReceiverConfig{} }
  150. func (m *DatagramReceiverConfig) String() string { return proto.CompactTextString(m) }
  151. func (*DatagramReceiverConfig) ProtoMessage() {}
  152. func (*DatagramReceiverConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  153. func (m *DatagramReceiverConfig) GetPortRange() *v2ray_core_common_net1.PortRange {
  154. if m != nil {
  155. return m.PortRange
  156. }
  157. return nil
  158. }
  159. func (m *DatagramReceiverConfig) GetListen() *v2ray_core_common_net.IPOrDomain {
  160. if m != nil {
  161. return m.Listen
  162. }
  163. return nil
  164. }
  165. func (m *DatagramReceiverConfig) GetAllocationStrategy() *AllocationStrategy {
  166. if m != nil {
  167. return m.AllocationStrategy
  168. }
  169. return nil
  170. }
  171. type PerProxyConfig struct {
  172. Tag string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"`
  173. Settings []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,2,rep,name=settings" json:"settings,omitempty"`
  174. }
  175. func (m *PerProxyConfig) Reset() { *m = PerProxyConfig{} }
  176. func (m *PerProxyConfig) String() string { return proto.CompactTextString(m) }
  177. func (*PerProxyConfig) ProtoMessage() {}
  178. func (*PerProxyConfig) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  179. func (m *PerProxyConfig) GetTag() string {
  180. if m != nil {
  181. return m.Tag
  182. }
  183. return ""
  184. }
  185. func (m *PerProxyConfig) GetSettings() []*v2ray_core_common_serial.TypedMessage {
  186. if m != nil {
  187. return m.Settings
  188. }
  189. return nil
  190. }
  191. type Config struct {
  192. Settings []*PerProxyConfig `protobuf:"bytes,1,rep,name=settings" json:"settings,omitempty"`
  193. }
  194. func (m *Config) Reset() { *m = Config{} }
  195. func (m *Config) String() string { return proto.CompactTextString(m) }
  196. func (*Config) ProtoMessage() {}
  197. func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  198. func (m *Config) GetSettings() []*PerProxyConfig {
  199. if m != nil {
  200. return m.Settings
  201. }
  202. return nil
  203. }
  204. func init() {
  205. proto.RegisterType((*AllocationStrategy)(nil), "v2ray.core.app.receiver.AllocationStrategy")
  206. proto.RegisterType((*AllocationStrategy_AllocationStrategyConcurrency)(nil), "v2ray.core.app.receiver.AllocationStrategy.AllocationStrategyConcurrency")
  207. proto.RegisterType((*AllocationStrategy_AllocationStrategyRefresh)(nil), "v2ray.core.app.receiver.AllocationStrategy.AllocationStrategyRefresh")
  208. proto.RegisterType((*StreamReceiverConfig)(nil), "v2ray.core.app.receiver.StreamReceiverConfig")
  209. proto.RegisterType((*DatagramReceiverConfig)(nil), "v2ray.core.app.receiver.DatagramReceiverConfig")
  210. proto.RegisterType((*PerProxyConfig)(nil), "v2ray.core.app.receiver.PerProxyConfig")
  211. proto.RegisterType((*Config)(nil), "v2ray.core.app.receiver.Config")
  212. proto.RegisterEnum("v2ray.core.app.receiver.AllocationStrategy_Type", AllocationStrategy_Type_name, AllocationStrategy_Type_value)
  213. }
  214. func init() { proto.RegisterFile("v2ray.com/core/app/receiver/config.proto", fileDescriptor0) }
  215. var fileDescriptor0 = []byte{
  216. // 572 bytes of a gzipped FileDescriptorProto
  217. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x94, 0xd1, 0x6e, 0xd3, 0x3e,
  218. 0x14, 0xc6, 0xff, 0x69, 0xf7, 0x2f, 0xdb, 0x29, 0x8c, 0xca, 0x4c, 0xac, 0x14, 0x21, 0x95, 0x08,
  219. 0xb1, 0x4a, 0x20, 0x67, 0x04, 0x71, 0xc1, 0x15, 0xda, 0xda, 0x5d, 0xec, 0x62, 0x50, 0xb9, 0x13,
  220. 0x17, 0x08, 0xa9, 0x32, 0xa9, 0x1b, 0x22, 0x12, 0x3b, 0x3a, 0xf6, 0xca, 0xf2, 0x4a, 0x3c, 0x05,
  221. 0x57, 0x3c, 0x10, 0x4f, 0x80, 0x12, 0x27, 0x5d, 0x59, 0x1b, 0xa4, 0x89, 0x4b, 0xee, 0x5c, 0xf7,
  222. 0xfb, 0x7e, 0xf6, 0x77, 0x8e, 0x73, 0x60, 0xb0, 0xf0, 0x91, 0x67, 0x34, 0x50, 0x89, 0x17, 0x28,
  223. 0x14, 0x1e, 0x4f, 0x53, 0x0f, 0x45, 0x20, 0xa2, 0x85, 0x40, 0x2f, 0x50, 0x72, 0x1e, 0x85, 0x34,
  224. 0x45, 0x65, 0x14, 0xd9, 0xaf, 0x94, 0x28, 0x28, 0x4f, 0x53, 0x5a, 0xa9, 0x7a, 0x87, 0xd7, 0x10,
  225. 0x81, 0x4a, 0x12, 0x25, 0x3d, 0x2d, 0x30, 0xe2, 0xb1, 0x67, 0xb2, 0x54, 0xcc, 0xa6, 0x89, 0xd0,
  226. 0x9a, 0x87, 0xc2, 0xa2, 0x7a, 0x07, 0x9b, 0x1d, 0x52, 0x18, 0x8f, 0xcf, 0x66, 0x28, 0xb4, 0x2e,
  227. 0x85, 0x4f, 0xea, 0x85, 0xa9, 0x42, 0x53, 0xaa, 0xe8, 0x35, 0x95, 0x41, 0x2e, 0x75, 0xfe, 0xbf,
  228. 0x17, 0x49, 0x23, 0x30, 0x57, 0xaf, 0x26, 0x71, 0xbf, 0x37, 0x81, 0x1c, 0xc5, 0xb1, 0x0a, 0xb8,
  229. 0x89, 0x94, 0x9c, 0x18, 0xe4, 0x46, 0x84, 0x19, 0x19, 0xc1, 0x56, 0x7e, 0xd9, 0xae, 0xd3, 0x77,
  230. 0x06, 0xbb, 0xfe, 0x21, 0xad, 0xc9, 0x4b, 0xd7, 0xad, 0xf4, 0x3c, 0x4b, 0x05, 0x2b, 0xdc, 0xe4,
  231. 0x0b, 0xb4, 0x03, 0x25, 0x83, 0x0b, 0x44, 0x21, 0x83, 0xac, 0xdb, 0xe8, 0x3b, 0x83, 0xb6, 0x7f,
  232. 0x7a, 0x13, 0xd8, 0xfa, 0xd6, 0xf0, 0x0a, 0xc8, 0x56, 0xe9, 0x64, 0x0a, 0xb7, 0x50, 0xcc, 0x51,
  233. 0xe8, 0xcf, 0xdd, 0x66, 0x71, 0xd0, 0xc9, 0xdf, 0x1d, 0xc4, 0x2c, 0x8c, 0x55, 0xd4, 0xde, 0x2b,
  234. 0x78, 0xf4, 0xc7, 0xeb, 0x90, 0x3d, 0xf8, 0x7f, 0xc1, 0xe3, 0x0b, 0x5b, 0xb5, 0x3b, 0xcc, 0xfe,
  235. 0xe8, 0xbd, 0x80, 0x07, 0xb5, 0xf0, 0xcd, 0x16, 0xf7, 0x39, 0x6c, 0xe5, 0x55, 0x24, 0x00, 0xad,
  236. 0xa3, 0xf8, 0x2b, 0xcf, 0x74, 0xe7, 0xbf, 0x7c, 0xcd, 0xb8, 0x9c, 0xa9, 0xa4, 0xe3, 0x90, 0xdb,
  237. 0xb0, 0x7d, 0x72, 0x99, 0x77, 0x93, 0xc7, 0x9d, 0x86, 0xfb, 0xa3, 0x01, 0x7b, 0x13, 0x83, 0x82,
  238. 0x27, 0xac, 0x0c, 0x38, 0x2c, 0x3a, 0x4c, 0xde, 0x00, 0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