addons.pb.go 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proxy/vless/encoding/addons.proto
  3. package encoding
  4. import (
  5. fmt "fmt"
  6. proto "github.com/golang/protobuf/proto"
  7. io "io"
  8. math "math"
  9. math_bits "math/bits"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. // This is a compile-time assertion to ensure that this generated file
  16. // is compatible with the proto package it is being compiled against.
  17. // A compilation error at this line likely means your copy of the
  18. // proto package needs to be updated.
  19. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  20. type Addons struct {
  21. Flow string `protobuf:"bytes,1,opt,name=Flow,proto3" json:"Flow,omitempty"`
  22. Seed []byte `protobuf:"bytes,2,opt,name=Seed,proto3" json:"Seed,omitempty"`
  23. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  24. XXX_unrecognized []byte `json:"-"`
  25. XXX_sizecache int32 `json:"-"`
  26. }
  27. func (m *Addons) Reset() { *m = Addons{} }
  28. func (m *Addons) String() string { return proto.CompactTextString(m) }
  29. func (*Addons) ProtoMessage() {}
  30. func (*Addons) Descriptor() ([]byte, []int) {
  31. return fileDescriptor_75ab671b0ca8b1cc, []int{0}
  32. }
  33. func (m *Addons) XXX_Unmarshal(b []byte) error {
  34. return m.Unmarshal(b)
  35. }
  36. func (m *Addons) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  37. if deterministic {
  38. return xxx_messageInfo_Addons.Marshal(b, m, deterministic)
  39. } else {
  40. b = b[:cap(b)]
  41. n, err := m.MarshalToSizedBuffer(b)
  42. if err != nil {
  43. return nil, err
  44. }
  45. return b[:n], nil
  46. }
  47. }
  48. func (m *Addons) XXX_Merge(src proto.Message) {
  49. xxx_messageInfo_Addons.Merge(m, src)
  50. }
  51. func (m *Addons) XXX_Size() int {
  52. return m.Size()
  53. }
  54. func (m *Addons) XXX_DiscardUnknown() {
  55. xxx_messageInfo_Addons.DiscardUnknown(m)
  56. }
  57. var xxx_messageInfo_Addons proto.InternalMessageInfo
  58. func (m *Addons) GetFlow() string {
  59. if m != nil {
  60. return m.Flow
  61. }
  62. return ""
  63. }
  64. func (m *Addons) GetSeed() []byte {
  65. if m != nil {
  66. return m.Seed
  67. }
  68. return nil
  69. }
  70. func init() {
  71. proto.RegisterType((*Addons)(nil), "v2ray.core.proxy.vless.encoding.Addons")
  72. }
  73. func init() { proto.RegisterFile("proxy/vless/encoding/addons.proto", fileDescriptor_75ab671b0ca8b1cc) }
  74. var fileDescriptor_75ab671b0ca8b1cc = []byte{
  75. // 206 bytes of a gzipped FileDescriptorProto
  76. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x28, 0xca, 0xaf,
  77. 0xa8, 0xd4, 0x2f, 0xcb, 0x49, 0x2d, 0x2e, 0xd6, 0x4f, 0xcd, 0x4b, 0xce, 0x4f, 0xc9, 0xcc, 0x4b,
  78. 0xd7, 0x4f, 0x4c, 0x49, 0xc9, 0xcf, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2f,
  79. 0x33, 0x2a, 0x4a, 0xac, 0xd4, 0x4b, 0xce, 0x2f, 0x4a, 0xd5, 0x03, 0xab, 0xd6, 0x03, 0xab, 0xd6,
  80. 0x83, 0xa9, 0x56, 0x32, 0xe0, 0x62, 0x73, 0x04, 0x6b, 0x10, 0x12, 0xe2, 0x62, 0x71, 0xcb, 0xc9,
  81. 0x2f, 0x97, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x41, 0x62, 0xc1, 0xa9, 0xa9, 0x29,
  82. 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x60, 0xb6, 0x53, 0x1f, 0xe3, 0x89, 0x47, 0x72, 0x8c,
  83. 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x03, 0x97, 0x72, 0x72,
  84. 0x7e, 0xae, 0x1e, 0x01, 0x9b, 0x02, 0x18, 0xa3, 0x8c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4,
  85. 0x92, 0xf3, 0x73, 0xf5, 0xcb, 0x8c, 0xd2, 0x72, 0x2a, 0xf5, 0xc1, 0x7a, 0x74, 0x41, 0x7a, 0xf4,
  86. 0xcb, 0x4c, 0xf4, 0xb1, 0x79, 0x67, 0x15, 0x93, 0x7c, 0x98, 0x51, 0x50, 0x62, 0xa5, 0x9e, 0x33,
  87. 0xc8, 0xe0, 0x00, 0xb0, 0xc1, 0x61, 0x60, 0x83, 0x5d, 0xa1, 0x2a, 0x92, 0xd8, 0xc0, 0x5e, 0x35,
  88. 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x1d, 0xb4, 0x93, 0x0f, 0x01, 0x00, 0x00,
  89. }
  90. func (m *Addons) Marshal() (dAtA []byte, err error) {
  91. size := m.Size()
  92. dAtA = make([]byte, size)
  93. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  94. if err != nil {
  95. return nil, err
  96. }
  97. return dAtA[:n], nil
  98. }
  99. func (m *Addons) MarshalTo(dAtA []byte) (int, error) {
  100. size := m.Size()
  101. return m.MarshalToSizedBuffer(dAtA[:size])
  102. }
  103. func (m *Addons) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  104. i := len(dAtA)
  105. _ = i
  106. var l int
  107. _ = l
  108. if m.XXX_unrecognized != nil {
  109. i -= len(m.XXX_unrecognized)
  110. copy(dAtA[i:], m.XXX_unrecognized)
  111. }
  112. if len(m.Seed) > 0 {
  113. i -= len(m.Seed)
  114. copy(dAtA[i:], m.Seed)
  115. i = encodeVarintAddons(dAtA, i, uint64(len(m.Seed)))
  116. i--
  117. dAtA[i] = 0x12
  118. }
  119. if len(m.Flow) > 0 {
  120. i -= len(m.Flow)
  121. copy(dAtA[i:], m.Flow)
  122. i = encodeVarintAddons(dAtA, i, uint64(len(m.Flow)))
  123. i--
  124. dAtA[i] = 0xa
  125. }
  126. return len(dAtA) - i, nil
  127. }
  128. func encodeVarintAddons(dAtA []byte, offset int, v uint64) int {
  129. offset -= sovAddons(v)
  130. base := offset
  131. for v >= 1<<7 {
  132. dAtA[offset] = uint8(v&0x7f | 0x80)
  133. v >>= 7
  134. offset++
  135. }
  136. dAtA[offset] = uint8(v)
  137. return base
  138. }
  139. func (m *Addons) Size() (n int) {
  140. if m == nil {
  141. return 0
  142. }
  143. var l int
  144. _ = l
  145. l = len(m.Flow)
  146. if l > 0 {
  147. n += 1 + l + sovAddons(uint64(l))
  148. }
  149. l = len(m.Seed)
  150. if l > 0 {
  151. n += 1 + l + sovAddons(uint64(l))
  152. }
  153. if m.XXX_unrecognized != nil {
  154. n += len(m.XXX_unrecognized)
  155. }
  156. return n
  157. }
  158. func sovAddons(x uint64) (n int) {
  159. return (math_bits.Len64(x|1) + 6) / 7
  160. }
  161. func sozAddons(x uint64) (n int) {
  162. return sovAddons(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  163. }
  164. func (m *Addons) Unmarshal(dAtA []byte) error {
  165. l := len(dAtA)
  166. iNdEx := 0
  167. for iNdEx < l {
  168. preIndex := iNdEx
  169. var wire uint64
  170. for shift := uint(0); ; shift += 7 {
  171. if shift >= 64 {
  172. return ErrIntOverflowAddons
  173. }
  174. if iNdEx >= l {
  175. return io.ErrUnexpectedEOF
  176. }
  177. b := dAtA[iNdEx]
  178. iNdEx++
  179. wire |= uint64(b&0x7F) << shift
  180. if b < 0x80 {
  181. break
  182. }
  183. }
  184. fieldNum := int32(wire >> 3)
  185. wireType := int(wire & 0x7)
  186. if wireType == 4 {
  187. return fmt.Errorf("proto: Addons: wiretype end group for non-group")
  188. }
  189. if fieldNum <= 0 {
  190. return fmt.Errorf("proto: Addons: illegal tag %d (wire type %d)", fieldNum, wire)
  191. }
  192. switch fieldNum {
  193. case 1:
  194. if wireType != 2 {
  195. return fmt.Errorf("proto: wrong wireType = %d for field Flow", wireType)
  196. }
  197. var stringLen uint64
  198. for shift := uint(0); ; shift += 7 {
  199. if shift >= 64 {
  200. return ErrIntOverflowAddons
  201. }
  202. if iNdEx >= l {
  203. return io.ErrUnexpectedEOF
  204. }
  205. b := dAtA[iNdEx]
  206. iNdEx++
  207. stringLen |= uint64(b&0x7F) << shift
  208. if b < 0x80 {
  209. break
  210. }
  211. }
  212. intStringLen := int(stringLen)
  213. if intStringLen < 0 {
  214. return ErrInvalidLengthAddons
  215. }
  216. postIndex := iNdEx + intStringLen
  217. if postIndex < 0 {
  218. return ErrInvalidLengthAddons
  219. }
  220. if postIndex > l {
  221. return io.ErrUnexpectedEOF
  222. }
  223. m.Flow = string(dAtA[iNdEx:postIndex])
  224. iNdEx = postIndex
  225. case 2:
  226. if wireType != 2 {
  227. return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType)
  228. }
  229. var byteLen int
  230. for shift := uint(0); ; shift += 7 {
  231. if shift >= 64 {
  232. return ErrIntOverflowAddons
  233. }
  234. if iNdEx >= l {
  235. return io.ErrUnexpectedEOF
  236. }
  237. b := dAtA[iNdEx]
  238. iNdEx++
  239. byteLen |= int(b&0x7F) << shift
  240. if b < 0x80 {
  241. break
  242. }
  243. }
  244. if byteLen < 0 {
  245. return ErrInvalidLengthAddons
  246. }
  247. postIndex := iNdEx + byteLen
  248. if postIndex < 0 {
  249. return ErrInvalidLengthAddons
  250. }
  251. if postIndex > l {
  252. return io.ErrUnexpectedEOF
  253. }
  254. m.Seed = append(m.Seed[:0], dAtA[iNdEx:postIndex]...)
  255. if m.Seed == nil {
  256. m.Seed = []byte{}
  257. }
  258. iNdEx = postIndex
  259. default:
  260. iNdEx = preIndex
  261. skippy, err := skipAddons(dAtA[iNdEx:])
  262. if err != nil {
  263. return err
  264. }
  265. if (skippy < 0) || (iNdEx+skippy) < 0 {
  266. return ErrInvalidLengthAddons
  267. }
  268. if (iNdEx + skippy) > l {
  269. return io.ErrUnexpectedEOF
  270. }
  271. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  272. iNdEx += skippy
  273. }
  274. }
  275. if iNdEx > l {
  276. return io.ErrUnexpectedEOF
  277. }
  278. return nil
  279. }
  280. func skipAddons(dAtA []byte) (n int, err error) {
  281. l := len(dAtA)
  282. iNdEx := 0
  283. depth := 0
  284. for iNdEx < l {
  285. var wire uint64
  286. for shift := uint(0); ; shift += 7 {
  287. if shift >= 64 {
  288. return 0, ErrIntOverflowAddons
  289. }
  290. if iNdEx >= l {
  291. return 0, io.ErrUnexpectedEOF
  292. }
  293. b := dAtA[iNdEx]
  294. iNdEx++
  295. wire |= (uint64(b) & 0x7F) << shift
  296. if b < 0x80 {
  297. break
  298. }
  299. }
  300. wireType := int(wire & 0x7)
  301. switch wireType {
  302. case 0:
  303. for shift := uint(0); ; shift += 7 {
  304. if shift >= 64 {
  305. return 0, ErrIntOverflowAddons
  306. }
  307. if iNdEx >= l {
  308. return 0, io.ErrUnexpectedEOF
  309. }
  310. iNdEx++
  311. if dAtA[iNdEx-1] < 0x80 {
  312. break
  313. }
  314. }
  315. case 1:
  316. iNdEx += 8
  317. case 2:
  318. var length int
  319. for shift := uint(0); ; shift += 7 {
  320. if shift >= 64 {
  321. return 0, ErrIntOverflowAddons
  322. }
  323. if iNdEx >= l {
  324. return 0, io.ErrUnexpectedEOF
  325. }
  326. b := dAtA[iNdEx]
  327. iNdEx++
  328. length |= (int(b) & 0x7F) << shift
  329. if b < 0x80 {
  330. break
  331. }
  332. }
  333. if length < 0 {
  334. return 0, ErrInvalidLengthAddons
  335. }
  336. iNdEx += length
  337. case 3:
  338. depth++
  339. case 4:
  340. if depth == 0 {
  341. return 0, ErrUnexpectedEndOfGroupAddons
  342. }
  343. depth--
  344. case 5:
  345. iNdEx += 4
  346. default:
  347. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  348. }
  349. if iNdEx < 0 {
  350. return 0, ErrInvalidLengthAddons
  351. }
  352. if depth == 0 {
  353. return iNdEx, nil
  354. }
  355. }
  356. return 0, io.ErrUnexpectedEOF
  357. }
  358. var (
  359. ErrInvalidLengthAddons = fmt.Errorf("proto: negative length found during unmarshaling")
  360. ErrIntOverflowAddons = fmt.Errorf("proto: integer overflow")
  361. ErrUnexpectedEndOfGroupAddons = fmt.Errorf("proto: unexpected end of group")
  362. )