addons.pb.go 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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. // 186 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, 0xdd, 0x89, 0x47, 0x72, 0x8c, 0x17,
  83. 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x03, 0x97, 0x72, 0x72, 0x7e,
  84. 0xae, 0x1e, 0x01, 0x8b, 0x02, 0x18, 0xa3, 0x94, 0x61, 0x4a, 0x72, 0xf5, 0x41, 0xca, 0xf4, 0xb1,
  85. 0xb9, 0x7e, 0x15, 0x93, 0x7c, 0x98, 0x51, 0x50, 0x62, 0xa5, 0x9e, 0x33, 0xc8, 0xa0, 0x00, 0xb0,
  86. 0x41, 0x61, 0x60, 0x83, 0x5c, 0xa1, 0x2a, 0x92, 0xd8, 0xc0, 0x3e, 0x33, 0x06, 0x04, 0x00, 0x00,
  87. 0xff, 0xff, 0x36, 0x32, 0x14, 0x7c, 0xfe, 0x00, 0x00, 0x00,
  88. }
  89. func (m *Addons) Marshal() (dAtA []byte, err error) {
  90. size := m.Size()
  91. dAtA = make([]byte, size)
  92. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  93. if err != nil {
  94. return nil, err
  95. }
  96. return dAtA[:n], nil
  97. }
  98. func (m *Addons) MarshalTo(dAtA []byte) (int, error) {
  99. size := m.Size()
  100. return m.MarshalToSizedBuffer(dAtA[:size])
  101. }
  102. func (m *Addons) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  103. i := len(dAtA)
  104. _ = i
  105. var l int
  106. _ = l
  107. if m.XXX_unrecognized != nil {
  108. i -= len(m.XXX_unrecognized)
  109. copy(dAtA[i:], m.XXX_unrecognized)
  110. }
  111. if len(m.Seed) > 0 {
  112. i -= len(m.Seed)
  113. copy(dAtA[i:], m.Seed)
  114. i = encodeVarintAddons(dAtA, i, uint64(len(m.Seed)))
  115. i--
  116. dAtA[i] = 0x12
  117. }
  118. if len(m.Flow) > 0 {
  119. i -= len(m.Flow)
  120. copy(dAtA[i:], m.Flow)
  121. i = encodeVarintAddons(dAtA, i, uint64(len(m.Flow)))
  122. i--
  123. dAtA[i] = 0xa
  124. }
  125. return len(dAtA) - i, nil
  126. }
  127. func encodeVarintAddons(dAtA []byte, offset int, v uint64) int {
  128. offset -= sovAddons(v)
  129. base := offset
  130. for v >= 1<<7 {
  131. dAtA[offset] = uint8(v&0x7f | 0x80)
  132. v >>= 7
  133. offset++
  134. }
  135. dAtA[offset] = uint8(v)
  136. return base
  137. }
  138. func (m *Addons) Size() (n int) {
  139. if m == nil {
  140. return 0
  141. }
  142. var l int
  143. _ = l
  144. l = len(m.Flow)
  145. if l > 0 {
  146. n += 1 + l + sovAddons(uint64(l))
  147. }
  148. l = len(m.Seed)
  149. if l > 0 {
  150. n += 1 + l + sovAddons(uint64(l))
  151. }
  152. if m.XXX_unrecognized != nil {
  153. n += len(m.XXX_unrecognized)
  154. }
  155. return n
  156. }
  157. func sovAddons(x uint64) (n int) {
  158. return (math_bits.Len64(x|1) + 6) / 7
  159. }
  160. func sozAddons(x uint64) (n int) {
  161. return sovAddons(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  162. }
  163. func (m *Addons) Unmarshal(dAtA []byte) error {
  164. l := len(dAtA)
  165. iNdEx := 0
  166. for iNdEx < l {
  167. preIndex := iNdEx
  168. var wire uint64
  169. for shift := uint(0); ; shift += 7 {
  170. if shift >= 64 {
  171. return ErrIntOverflowAddons
  172. }
  173. if iNdEx >= l {
  174. return io.ErrUnexpectedEOF
  175. }
  176. b := dAtA[iNdEx]
  177. iNdEx++
  178. wire |= uint64(b&0x7F) << shift
  179. if b < 0x80 {
  180. break
  181. }
  182. }
  183. fieldNum := int32(wire >> 3)
  184. wireType := int(wire & 0x7)
  185. if wireType == 4 {
  186. return fmt.Errorf("proto: Addons: wiretype end group for non-group")
  187. }
  188. if fieldNum <= 0 {
  189. return fmt.Errorf("proto: Addons: illegal tag %d (wire type %d)", fieldNum, wire)
  190. }
  191. switch fieldNum {
  192. case 1:
  193. if wireType != 2 {
  194. return fmt.Errorf("proto: wrong wireType = %d for field Flow", wireType)
  195. }
  196. var stringLen uint64
  197. for shift := uint(0); ; shift += 7 {
  198. if shift >= 64 {
  199. return ErrIntOverflowAddons
  200. }
  201. if iNdEx >= l {
  202. return io.ErrUnexpectedEOF
  203. }
  204. b := dAtA[iNdEx]
  205. iNdEx++
  206. stringLen |= uint64(b&0x7F) << shift
  207. if b < 0x80 {
  208. break
  209. }
  210. }
  211. intStringLen := int(stringLen)
  212. if intStringLen < 0 {
  213. return ErrInvalidLengthAddons
  214. }
  215. postIndex := iNdEx + intStringLen
  216. if postIndex < 0 {
  217. return ErrInvalidLengthAddons
  218. }
  219. if postIndex > l {
  220. return io.ErrUnexpectedEOF
  221. }
  222. m.Flow = string(dAtA[iNdEx:postIndex])
  223. iNdEx = postIndex
  224. case 2:
  225. if wireType != 2 {
  226. return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType)
  227. }
  228. var byteLen int
  229. for shift := uint(0); ; shift += 7 {
  230. if shift >= 64 {
  231. return ErrIntOverflowAddons
  232. }
  233. if iNdEx >= l {
  234. return io.ErrUnexpectedEOF
  235. }
  236. b := dAtA[iNdEx]
  237. iNdEx++
  238. byteLen |= int(b&0x7F) << shift
  239. if b < 0x80 {
  240. break
  241. }
  242. }
  243. if byteLen < 0 {
  244. return ErrInvalidLengthAddons
  245. }
  246. postIndex := iNdEx + byteLen
  247. if postIndex < 0 {
  248. return ErrInvalidLengthAddons
  249. }
  250. if postIndex > l {
  251. return io.ErrUnexpectedEOF
  252. }
  253. m.Seed = append(m.Seed[:0], dAtA[iNdEx:postIndex]...)
  254. if m.Seed == nil {
  255. m.Seed = []byte{}
  256. }
  257. iNdEx = postIndex
  258. default:
  259. iNdEx = preIndex
  260. skippy, err := skipAddons(dAtA[iNdEx:])
  261. if err != nil {
  262. return err
  263. }
  264. if skippy < 0 {
  265. return ErrInvalidLengthAddons
  266. }
  267. if (iNdEx + skippy) < 0 {
  268. return ErrInvalidLengthAddons
  269. }
  270. if (iNdEx + skippy) > l {
  271. return io.ErrUnexpectedEOF
  272. }
  273. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  274. iNdEx += skippy
  275. }
  276. }
  277. if iNdEx > l {
  278. return io.ErrUnexpectedEOF
  279. }
  280. return nil
  281. }
  282. func skipAddons(dAtA []byte) (n int, err error) {
  283. l := len(dAtA)
  284. iNdEx := 0
  285. depth := 0
  286. for iNdEx < l {
  287. var wire uint64
  288. for shift := uint(0); ; shift += 7 {
  289. if shift >= 64 {
  290. return 0, ErrIntOverflowAddons
  291. }
  292. if iNdEx >= l {
  293. return 0, io.ErrUnexpectedEOF
  294. }
  295. b := dAtA[iNdEx]
  296. iNdEx++
  297. wire |= (uint64(b) & 0x7F) << shift
  298. if b < 0x80 {
  299. break
  300. }
  301. }
  302. wireType := int(wire & 0x7)
  303. switch wireType {
  304. case 0:
  305. for shift := uint(0); ; shift += 7 {
  306. if shift >= 64 {
  307. return 0, ErrIntOverflowAddons
  308. }
  309. if iNdEx >= l {
  310. return 0, io.ErrUnexpectedEOF
  311. }
  312. iNdEx++
  313. if dAtA[iNdEx-1] < 0x80 {
  314. break
  315. }
  316. }
  317. case 1:
  318. iNdEx += 8
  319. case 2:
  320. var length int
  321. for shift := uint(0); ; shift += 7 {
  322. if shift >= 64 {
  323. return 0, ErrIntOverflowAddons
  324. }
  325. if iNdEx >= l {
  326. return 0, io.ErrUnexpectedEOF
  327. }
  328. b := dAtA[iNdEx]
  329. iNdEx++
  330. length |= (int(b) & 0x7F) << shift
  331. if b < 0x80 {
  332. break
  333. }
  334. }
  335. if length < 0 {
  336. return 0, ErrInvalidLengthAddons
  337. }
  338. iNdEx += length
  339. case 3:
  340. depth++
  341. case 4:
  342. if depth == 0 {
  343. return 0, ErrUnexpectedEndOfGroupAddons
  344. }
  345. depth--
  346. case 5:
  347. iNdEx += 4
  348. default:
  349. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  350. }
  351. if iNdEx < 0 {
  352. return 0, ErrInvalidLengthAddons
  353. }
  354. if depth == 0 {
  355. return iNdEx, nil
  356. }
  357. }
  358. return 0, io.ErrUnexpectedEOF
  359. }
  360. var (
  361. ErrInvalidLengthAddons = fmt.Errorf("proto: negative length found during unmarshaling")
  362. ErrIntOverflowAddons = fmt.Errorf("proto: integer overflow")
  363. ErrUnexpectedEndOfGroupAddons = fmt.Errorf("proto: unexpected end of group")
  364. )