mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
c6334e61aa
This adds the ability to have multiple concurrent connections to a single device. This is primarily useful when the network has multiple physical links for aggregated bandwidth. A single connection will never see a higher rate than a single link can give, but multiple connections are load-balanced over multiple links. It is also incidentally useful for older multi-core CPUs, where bandwidth could be limited by the TLS performance of a single CPU core -- using multiple connections achieves concurrency in the required crypto calculations... Co-authored-by: Simon Frei <freisim93@gmail.com> Co-authored-by: tomasz1986 <twilczynski@naver.com> Co-authored-by: bt90 <btom1990@googlemail.com>
1058 lines
32 KiB
Go
1058 lines
32 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: lib/config/deviceconfiguration.proto
|
|
|
|
package config
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
|
|
protocol "github.com/syncthing/syncthing/lib/protocol"
|
|
_ "github.com/syncthing/syncthing/proto/ext"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type DeviceConfiguration struct {
|
|
DeviceID github_com_syncthing_syncthing_lib_protocol.DeviceID `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.DeviceID" json:"deviceID" xml:"id,attr" nodefault:"true"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" xml:"name,attr,omitempty"`
|
|
Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses" xml:"address,omitempty"`
|
|
Compression protocol.Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression" xml:"compression,attr"`
|
|
CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"certName" xml:"certName,attr,omitempty"`
|
|
Introducer bool `protobuf:"varint,6,opt,name=introducer,proto3" json:"introducer" xml:"introducer,attr"`
|
|
SkipIntroductionRemovals bool `protobuf:"varint,7,opt,name=skip_introduction_removals,json=skipIntroductionRemovals,proto3" json:"skipIntroductionRemovals" xml:"skipIntroductionRemovals,attr"`
|
|
IntroducedBy github_com_syncthing_syncthing_lib_protocol.DeviceID `protobuf:"bytes,8,opt,name=introduced_by,json=introducedBy,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.DeviceID" json:"introducedBy" xml:"introducedBy,attr" nodefault:"true"`
|
|
Paused bool `protobuf:"varint,9,opt,name=paused,proto3" json:"paused" xml:"paused"`
|
|
AllowedNetworks []string `protobuf:"bytes,10,rep,name=allowed_networks,json=allowedNetworks,proto3" json:"allowedNetworks" xml:"allowedNetwork,omitempty"`
|
|
AutoAcceptFolders bool `protobuf:"varint,11,opt,name=auto_accept_folders,json=autoAcceptFolders,proto3" json:"autoAcceptFolders" xml:"autoAcceptFolders"`
|
|
MaxSendKbps int `protobuf:"varint,12,opt,name=max_send_kbps,json=maxSendKbps,proto3,casttype=int" json:"maxSendKbps" xml:"maxSendKbps"`
|
|
MaxRecvKbps int `protobuf:"varint,13,opt,name=max_recv_kbps,json=maxRecvKbps,proto3,casttype=int" json:"maxRecvKbps" xml:"maxRecvKbps"`
|
|
IgnoredFolders []ObservedFolder `protobuf:"bytes,14,rep,name=ignored_folders,json=ignoredFolders,proto3" json:"ignoredFolders" xml:"ignoredFolder"`
|
|
DeprecatedPendingFolders []ObservedFolder `protobuf:"bytes,15,rep,name=pending_folders,json=pendingFolders,proto3" json:"-" xml:"pendingFolder,omitempty"` // Deprecated: Do not use.
|
|
MaxRequestKiB int `protobuf:"varint,16,opt,name=max_request_kib,json=maxRequestKib,proto3,casttype=int" json:"maxRequestKiB" xml:"maxRequestKiB"`
|
|
Untrusted bool `protobuf:"varint,17,opt,name=untrusted,proto3" json:"untrusted" xml:"untrusted"`
|
|
RemoteGUIPort int `protobuf:"varint,18,opt,name=remote_gui_port,json=remoteGuiPort,proto3,casttype=int" json:"remoteGUIPort" xml:"remoteGUIPort"`
|
|
RawNumConnections int `protobuf:"varint,19,opt,name=num_connections,json=numConnections,proto3,casttype=int" json:"numConnections" xml:"numConnections"`
|
|
}
|
|
|
|
func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} }
|
|
func (m *DeviceConfiguration) String() string { return proto.CompactTextString(m) }
|
|
func (*DeviceConfiguration) ProtoMessage() {}
|
|
func (*DeviceConfiguration) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_744b782bd13071dd, []int{0}
|
|
}
|
|
func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeviceConfiguration.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *DeviceConfiguration) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeviceConfiguration.Merge(m, src)
|
|
}
|
|
func (m *DeviceConfiguration) XXX_Size() int {
|
|
return m.ProtoSize()
|
|
}
|
|
func (m *DeviceConfiguration) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*DeviceConfiguration)(nil), "config.DeviceConfiguration")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("lib/config/deviceconfiguration.proto", fileDescriptor_744b782bd13071dd)
|
|
}
|
|
|
|
var fileDescriptor_744b782bd13071dd = []byte{
|
|
// 1057 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x41, 0x6f, 0xe3, 0x44,
|
|
0x14, 0x8e, 0xe9, 0x6e, 0xb7, 0x99, 0x6d, 0x9b, 0xc6, 0x65, 0xbb, 0xde, 0x4a, 0x9b, 0x89, 0x42,
|
|
0x0e, 0x41, 0xec, 0xa6, 0xa8, 0x70, 0xaa, 0x00, 0x89, 0xb4, 0x82, 0xad, 0x2a, 0xba, 0x65, 0x10,
|
|
0x97, 0xdd, 0x83, 0x71, 0x3c, 0xd3, 0xac, 0xd5, 0x78, 0xc6, 0xd8, 0xe3, 0xb4, 0x95, 0x38, 0x72,
|
|
0x80, 0x1b, 0xaa, 0xc4, 0x89, 0xcb, 0xc2, 0xdf, 0xe0, 0xc0, 0xb5, 0xb7, 0xe6, 0x08, 0x1c, 0x46,
|
|
0xda, 0xf4, 0xe6, 0xa3, 0x8f, 0x9c, 0xd0, 0x8c, 0x1d, 0xc7, 0x76, 0x37, 0x2b, 0x24, 0x6e, 0x9e,
|
|
0xef, 0x7b, 0xf3, 0x7d, 0xf3, 0x9e, 0xdf, 0x9b, 0x01, 0xed, 0xa1, 0xd3, 0xdf, 0xb2, 0x19, 0x3d,
|
|
0x76, 0x06, 0x5b, 0x98, 0x8c, 0x1c, 0x9b, 0x24, 0x8b, 0xd0, 0xb7, 0xb8, 0xc3, 0x68, 0xd7, 0xf3,
|
|
0x19, 0x67, 0xfa, 0x62, 0x02, 0x6e, 0x6e, 0xc8, 0x68, 0x05, 0xd9, 0x6c, 0xb8, 0xd5, 0x27, 0x5e,
|
|
0xc2, 0x6f, 0x3e, 0xc8, 0xa9, 0xb0, 0x7e, 0x40, 0xfc, 0x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, 0xf6, 0x17, 0xd5,
|
|
0xdd, 0xfb, 0xc1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x75, 0x19, 0xf5, 0x92, 0x9d, 0x09, 0x00,
|
|
0x00,
|
|
}
|
|
|
|
func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) {
|
|
size := m.ProtoSize()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.ProtoSize()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.RawNumConnections != 0 {
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.RawNumConnections))
|
|
i--
|
|
dAtA[i] = 0x1
|
|
i--
|
|
dAtA[i] = 0x98
|
|
}
|
|
if m.RemoteGUIPort != 0 {
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.RemoteGUIPort))
|
|
i--
|
|
dAtA[i] = 0x1
|
|
i--
|
|
dAtA[i] = 0x90
|
|
}
|
|
if m.Untrusted {
|
|
i--
|
|
if m.Untrusted {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1
|
|
i--
|
|
dAtA[i] = 0x88
|
|
}
|
|
if m.MaxRequestKiB != 0 {
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRequestKiB))
|
|
i--
|
|
dAtA[i] = 0x1
|
|
i--
|
|
dAtA[i] = 0x80
|
|
}
|
|
if len(m.DeprecatedPendingFolders) > 0 {
|
|
for iNdEx := len(m.DeprecatedPendingFolders) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.DeprecatedPendingFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x7a
|
|
}
|
|
}
|
|
if len(m.IgnoredFolders) > 0 {
|
|
for iNdEx := len(m.IgnoredFolders) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.IgnoredFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x72
|
|
}
|
|
}
|
|
if m.MaxRecvKbps != 0 {
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRecvKbps))
|
|
i--
|
|
dAtA[i] = 0x68
|
|
}
|
|
if m.MaxSendKbps != 0 {
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxSendKbps))
|
|
i--
|
|
dAtA[i] = 0x60
|
|
}
|
|
if m.AutoAcceptFolders {
|
|
i--
|
|
if m.AutoAcceptFolders {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x58
|
|
}
|
|
if len(m.AllowedNetworks) > 0 {
|
|
for iNdEx := len(m.AllowedNetworks) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.AllowedNetworks[iNdEx])
|
|
copy(dAtA[i:], m.AllowedNetworks[iNdEx])
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.AllowedNetworks[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x52
|
|
}
|
|
}
|
|
if m.Paused {
|
|
i--
|
|
if m.Paused {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x48
|
|
}
|
|
{
|
|
size := m.IntroducedBy.ProtoSize()
|
|
i -= size
|
|
if _, err := m.IntroducedBy.MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x42
|
|
if m.SkipIntroductionRemovals {
|
|
i--
|
|
if m.SkipIntroductionRemovals {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x38
|
|
}
|
|
if m.Introducer {
|
|
i--
|
|
if m.Introducer {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x30
|
|
}
|
|
if len(m.CertName) > 0 {
|
|
i -= len(m.CertName)
|
|
copy(dAtA[i:], m.CertName)
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.CertName)))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if m.Compression != 0 {
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.Compression))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.Addresses) > 0 {
|
|
for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Addresses[iNdEx])
|
|
copy(dAtA[i:], m.Addresses[iNdEx])
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Addresses[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
{
|
|
size := m.DeviceID.ProtoSize()
|
|
i -= size
|
|
if _, err := m.DeviceID.MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintDeviceconfiguration(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovDeviceconfiguration(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *DeviceConfiguration) ProtoSize() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = m.DeviceID.ProtoSize()
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
}
|
|
if len(m.Addresses) > 0 {
|
|
for _, s := range m.Addresses {
|
|
l = len(s)
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
}
|
|
}
|
|
if m.Compression != 0 {
|
|
n += 1 + sovDeviceconfiguration(uint64(m.Compression))
|
|
}
|
|
l = len(m.CertName)
|
|
if l > 0 {
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
}
|
|
if m.Introducer {
|
|
n += 2
|
|
}
|
|
if m.SkipIntroductionRemovals {
|
|
n += 2
|
|
}
|
|
l = m.IntroducedBy.ProtoSize()
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
if m.Paused {
|
|
n += 2
|
|
}
|
|
if len(m.AllowedNetworks) > 0 {
|
|
for _, s := range m.AllowedNetworks {
|
|
l = len(s)
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
}
|
|
}
|
|
if m.AutoAcceptFolders {
|
|
n += 2
|
|
}
|
|
if m.MaxSendKbps != 0 {
|
|
n += 1 + sovDeviceconfiguration(uint64(m.MaxSendKbps))
|
|
}
|
|
if m.MaxRecvKbps != 0 {
|
|
n += 1 + sovDeviceconfiguration(uint64(m.MaxRecvKbps))
|
|
}
|
|
if len(m.IgnoredFolders) > 0 {
|
|
for _, e := range m.IgnoredFolders {
|
|
l = e.ProtoSize()
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
}
|
|
}
|
|
if len(m.DeprecatedPendingFolders) > 0 {
|
|
for _, e := range m.DeprecatedPendingFolders {
|
|
l = e.ProtoSize()
|
|
n += 1 + l + sovDeviceconfiguration(uint64(l))
|
|
}
|
|
}
|
|
if m.MaxRequestKiB != 0 {
|
|
n += 2 + sovDeviceconfiguration(uint64(m.MaxRequestKiB))
|
|
}
|
|
if m.Untrusted {
|
|
n += 3
|
|
}
|
|
if m.RemoteGUIPort != 0 {
|
|
n += 2 + sovDeviceconfiguration(uint64(m.RemoteGUIPort))
|
|
}
|
|
if m.RawNumConnections != 0 {
|
|
n += 2 + sovDeviceconfiguration(uint64(m.RawNumConnections))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovDeviceconfiguration(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozDeviceconfiguration(x uint64) (n int) {
|
|
return sovDeviceconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := m.DeviceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
|
|
}
|
|
m.Compression = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Compression |= protocol.Compression(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.CertName = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Introducer = bool(v != 0)
|
|
case 7:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SkipIntroductionRemovals", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.SkipIntroductionRemovals = bool(v != 0)
|
|
case 8:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IntroducedBy", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := m.IntroducedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 9:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Paused = bool(v != 0)
|
|
case 10:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AllowedNetworks", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.AllowedNetworks = append(m.AllowedNetworks, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 11:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AutoAcceptFolders", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.AutoAcceptFolders = bool(v != 0)
|
|
case 12:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxSendKbps", wireType)
|
|
}
|
|
m.MaxSendKbps = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxSendKbps |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 13:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxRecvKbps", wireType)
|
|
}
|
|
m.MaxRecvKbps = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxRecvKbps |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 14:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IgnoredFolders", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.IgnoredFolders = append(m.IgnoredFolders, ObservedFolder{})
|
|
if err := m.IgnoredFolders[len(m.IgnoredFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 15:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedPendingFolders", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.DeprecatedPendingFolders = append(m.DeprecatedPendingFolders, ObservedFolder{})
|
|
if err := m.DeprecatedPendingFolders[len(m.DeprecatedPendingFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 16:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxRequestKiB", wireType)
|
|
}
|
|
m.MaxRequestKiB = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MaxRequestKiB |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 17:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Untrusted", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Untrusted = bool(v != 0)
|
|
case 18:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RemoteGUIPort", wireType)
|
|
}
|
|
m.RemoteGUIPort = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.RemoteGUIPort |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 19:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RawNumConnections", wireType)
|
|
}
|
|
m.RawNumConnections = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.RawNumConnections |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipDeviceconfiguration(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipDeviceconfiguration(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowDeviceconfiguration
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupDeviceconfiguration
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthDeviceconfiguration
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthDeviceconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowDeviceconfiguration = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupDeviceconfiguration = fmt.Errorf("proto: unexpected end of group")
|
|
)
|