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