1
0

addons.pb.go 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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), "xray.proxy.vless.encoding.Addons")
  72. }
  73. func init() { proto.RegisterFile("proxy/vless/encoding/addons.proto", fileDescriptor_75ab671b0ca8b1cc) }
  74. var fileDescriptor_75ab671b0ca8b1cc = []byte{
  75. // 191 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, 0xac,
  79. 0x28, 0x4a, 0xac, 0xd4, 0x03, 0xab, 0xd3, 0x03, 0xab, 0xd3, 0x83, 0xa9, 0x53, 0x32, 0xe0, 0x62,
  80. 0x73, 0x04, 0x2b, 0x15, 0x12, 0xe2, 0x62, 0x71, 0xcb, 0xc9, 0x2f, 0x97, 0x60, 0x54, 0x60, 0xd4,
  81. 0xe0, 0x0c, 0x02, 0xb3, 0x41, 0x62, 0xc1, 0xa9, 0xa9, 0x29, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x3c,
  82. 0x41, 0x60, 0xb6, 0x53, 0xed, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24,
  83. 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x03, 0x97, 0x6c, 0x72, 0x7e, 0xae, 0x1e, 0x4e, 0x2b, 0x02, 0x18,
  84. 0xa3, 0xf4, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x2b, 0x4a, 0x72,
  85. 0x8a, 0xf5, 0x41, 0x8a, 0x75, 0x93, 0xf3, 0x8b, 0x52, 0xf5, 0xb1, 0x39, 0x7e, 0x15, 0x93, 0x64,
  86. 0x04, 0xc8, 0xb4, 0x00, 0xb0, 0x69, 0x61, 0x60, 0xd3, 0x5c, 0xa1, 0x72, 0x49, 0x6c, 0x60, 0x2f,
  87. 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x32, 0xfc, 0x98, 0x28, 0xf7, 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) || (iNdEx+skippy) < 0 {
  265. return ErrInvalidLengthAddons
  266. }
  267. if (iNdEx + skippy) > l {
  268. return io.ErrUnexpectedEOF
  269. }
  270. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  271. iNdEx += skippy
  272. }
  273. }
  274. if iNdEx > l {
  275. return io.ErrUnexpectedEOF
  276. }
  277. return nil
  278. }
  279. func skipAddons(dAtA []byte) (n int, err error) {
  280. l := len(dAtA)
  281. iNdEx := 0
  282. depth := 0
  283. for iNdEx < l {
  284. var wire uint64
  285. for shift := uint(0); ; shift += 7 {
  286. if shift >= 64 {
  287. return 0, ErrIntOverflowAddons
  288. }
  289. if iNdEx >= l {
  290. return 0, io.ErrUnexpectedEOF
  291. }
  292. b := dAtA[iNdEx]
  293. iNdEx++
  294. wire |= (uint64(b) & 0x7F) << shift
  295. if b < 0x80 {
  296. break
  297. }
  298. }
  299. wireType := int(wire & 0x7)
  300. switch wireType {
  301. case 0:
  302. for shift := uint(0); ; shift += 7 {
  303. if shift >= 64 {
  304. return 0, ErrIntOverflowAddons
  305. }
  306. if iNdEx >= l {
  307. return 0, io.ErrUnexpectedEOF
  308. }
  309. iNdEx++
  310. if dAtA[iNdEx-1] < 0x80 {
  311. break
  312. }
  313. }
  314. case 1:
  315. iNdEx += 8
  316. case 2:
  317. var length int
  318. for shift := uint(0); ; shift += 7 {
  319. if shift >= 64 {
  320. return 0, ErrIntOverflowAddons
  321. }
  322. if iNdEx >= l {
  323. return 0, io.ErrUnexpectedEOF
  324. }
  325. b := dAtA[iNdEx]
  326. iNdEx++
  327. length |= (int(b) & 0x7F) << shift
  328. if b < 0x80 {
  329. break
  330. }
  331. }
  332. if length < 0 {
  333. return 0, ErrInvalidLengthAddons
  334. }
  335. iNdEx += length
  336. case 3:
  337. depth++
  338. case 4:
  339. if depth == 0 {
  340. return 0, ErrUnexpectedEndOfGroupAddons
  341. }
  342. depth--
  343. case 5:
  344. iNdEx += 4
  345. default:
  346. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  347. }
  348. if iNdEx < 0 {
  349. return 0, ErrInvalidLengthAddons
  350. }
  351. if depth == 0 {
  352. return iNdEx, nil
  353. }
  354. }
  355. return 0, io.ErrUnexpectedEOF
  356. }
  357. var (
  358. ErrInvalidLengthAddons = fmt.Errorf("proto: negative length found during unmarshaling")
  359. ErrIntOverflowAddons = fmt.Errorf("proto: integer overflow")
  360. ErrUnexpectedEndOfGroupAddons = fmt.Errorf("proto: unexpected end of group")
  361. )