Documentation ¶
Index ¶
- Variables
- func GenAuthDataService(payload *waProto.ClientPayload) error
- func IsEmpty(s string) bool
- type AccountInfo
- func (l AccountInfo) Ctx() context.Context
- func (a *AccountInfo) GetClientPayload() *waProto.ClientPayload
- func (l AccountInfo) GetLoginSettings() *WAHandshakeSettings
- func (a *AccountInfo) GetPlatform() string
- func (a *AccountInfo) GetStaticKeys() *DHKey
- func (l AccountInfo) GetStaticPriKey() *[32]byte
- func (l AccountInfo) GetStaticPubKey() *[32]byte
- func (a *AccountInfo) GetUserName() string
- func (a *AccountInfo) GetVeriFiledName() uint64
- func (l AccountInfo) SetCliPayload(payload *waProto.ClientPayload)
- func (l AccountInfo) SetCliPayloadData(data []byte) error
- func (a *AccountInfo) SetLogCtx(k, v string)
- func (l AccountInfo) SetRoutingInfo(d []byte)
- func (l AccountInfo) SetStaticHdBase64Keys(pri, pub string) error
- func (l AccountInfo) SetStaticHdKeys(pri, pub []byte) error
- func (l AccountInfo) SetStaticKeys(base64Data string) error
- func (l AccountInfo) SetStaticPriKey(d string) error
- func (l AccountInfo) SetStaticPubKey(d string) error
- func (a *AccountInfo) SetUserName(u uint64)
- func (a *AccountInfo) SetVeriFiledName(VeriFiledName uint64)
- type AuthDataDto
- type AuthDataDtoActual
- type BusinessVersion42
- type ClientPayload
- type ClientPayload_DnsSource
- type ClientPayload_UserAgent
- type ClientPayload_UserAgent_AppVersion
- type ClientPayload_WebInfo
- type ClientPayload_WebInfo_WebdPayload
- type DHKey
- type LoginDto
- type VerifyCallbackFunc
- type Version42
- type WAHandshakeSettings
- type WAProtocolVersion
Constants ¶
This section is empty.
Variables ¶
View Source
var DHString = []byte{69, 68, 0, 1}
View Source
var InitString = []byte("WA")
Functions ¶
func GenAuthDataService ¶
func GenAuthDataService(payload *waProto.ClientPayload) error
GenAuthDataService 生成认证数据
Types ¶
type AccountInfo ¶
type AccountInfo struct {
// contains filtered or unexported fields
}
AccountInfo
func EmptyAccountInfo ¶
func EmptyAccountInfo() *AccountInfo
func (*AccountInfo) GetClientPayload ¶
func (a *AccountInfo) GetClientPayload() *waProto.ClientPayload
func (AccountInfo) GetLoginSettings ¶
func (l AccountInfo) GetLoginSettings() *WAHandshakeSettings
GetLoginSettings
func (*AccountInfo) GetStaticKeys ¶
func (a *AccountInfo) GetStaticKeys() *DHKey
func (AccountInfo) GetStaticPriKey ¶
func (l AccountInfo) GetStaticPriKey() *[32]byte
func (AccountInfo) GetStaticPubKey ¶
func (l AccountInfo) GetStaticPubKey() *[32]byte
func (*AccountInfo) GetVeriFiledName ¶
func (a *AccountInfo) GetVeriFiledName() uint64
func (AccountInfo) SetCliPayload ¶
func (l AccountInfo) SetCliPayload(payload *waProto.ClientPayload)
func (AccountInfo) SetCliPayloadData ¶
SetCliPayloadData
func (AccountInfo) SetRoutingInfo ¶
func (l AccountInfo) SetRoutingInfo(d []byte)
func (AccountInfo) SetStaticHdBase64Keys ¶
func (AccountInfo) SetStaticHdKeys ¶
func (AccountInfo) SetStaticKeys ¶
SetStaticKeys
func (AccountInfo) SetStaticPriKey ¶
func (AccountInfo) SetStaticPubKey ¶
func (*AccountInfo) SetUserName ¶
func (a *AccountInfo) SetUserName(u uint64)
func (*AccountInfo) SetVeriFiledName ¶
func (a *AccountInfo) SetVeriFiledName(VeriFiledName uint64)
type AuthDataDto ¶
type AuthDataDto struct {
*ClientPayload
}
type AuthDataDtoActual ¶
type AuthDataDtoActual struct {
*waProto.ClientPayload
}
type BusinessVersion42 ¶
企业版
func GetBusinessVersion42 ¶
func GetBusinessVersion42() *BusinessVersion42
type ClientPayload ¶
type ClientPayload struct { Username *uint64 `protobuf:"varint,1,opt,name=username" json:"username,omitempty"` Passive *bool `protobuf:"varint,3,opt,name=passive" json:"passive,omitempty"` ClientFeatures []int32 `protobuf:"varint,4,rep,name=client_features,json=clientFeatures,enum=int32" json:"client_features,omitempty"` UserAgent *ClientPayload_UserAgent `protobuf:"bytes,5,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` WebInfo *ClientPayload_WebInfo `protobuf:"bytes,6,opt,name=web_info,json=webInfo" json:"web_info,omitempty"` PushName *string `protobuf:"bytes,7,opt,name=push_name,json=pushName" json:"push_name,omitempty"` SessionId *int32 `protobuf:"fixed32,9,opt,name=session_id,json=sessionId" json:"session_id,omitempty"` ShortConnect *bool `protobuf:"varint,10,opt,name=short_connect,json=shortConnect" json:"short_connect,omitempty"` ConnectType *int32 `protobuf:"varint,12,opt,name=connect_type,json=connectType,enum=int32" json:"connect_type,omitempty"` ConnectReason *int32 `protobuf:"varint,13,opt,name=connect_reason,json=connectReason,enum=int32" json:"connect_reason,omitempty"` Shards []int32 `protobuf:"fixed32,14,rep,name=shards" json:"shards,omitempty"` DnsSource *ClientPayload_DnsSource `protobuf:"bytes,15,opt,name=dns_source,json=dnsSource" json:"dns_source,omitempty"` ConnectAttemptCount *int32 `protobuf:"fixed32,16,opt,name=connect_attempt_count,json=connectAttemptCount" json:"connect_attempt_count,omitempty"` Oc *bool `protobuf:"varint,23,opt,name=oc" json:"oc,omitempty"` Lc *int32 `protobuf:"varint,24,opt,name=lc" json:"lc,omitempty"` IosAppExtension *int32 `protobuf:"varint,30,opt,name=ios_app_extension,json=iosAppExtension,enum=int32" json:"ios_app_extension,omitempty"` FbAppId *uint64 `protobuf:"varint,31,opt,name=fb_app_id,json=fbAppId" json:"fb_app_id,omitempty"` // 128-bit UUID https://www.internalfb.com/intern/wiki/How-do-we-uniquely-identify-devices/device-id/ FbDeviceId []byte `protobuf:"bytes,32,opt,name=fb_device_id,json=fbDeviceId" json:"fb_device_id,omitempty"` YearClass *int32 `protobuf:"varint,36,opt,name=ok_36,json=ok36" json:"ok_36,omitempty"` MemClass *int32 `protobuf:"varint,37,opt,name=ok_37,json=ok37" json:"ok_37,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
type ClientPayload_DnsSource ¶
type ClientPayload_DnsSource struct { DnsMethod *int32 `protobuf:"varint,15,opt,name=dnsMethod,enum=int32" json:"dnsMethod,omitempty"` AppCached *bool `protobuf:"varint,16,opt,name=appCached" json:"appCached,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
type ClientPayload_UserAgent ¶
type ClientPayload_UserAgent struct { Platform *int32 `protobuf:"varint,1,opt,name=platform,enum=int32" json:"platform,omitempty"` AppVersion *ClientPayload_UserAgent_AppVersion `protobuf:"bytes,2,opt,name=app_version,json=appVersion" json:"app_version,omitempty"` Mcc *string `protobuf:"bytes,3,opt,name=mcc" json:"mcc,omitempty"` Mnc *string `protobuf:"bytes,4,opt,name=mnc" json:"mnc,omitempty"` OsVersion *string `protobuf:"bytes,5,opt,name=os_version,json=osVersion" json:"os_version,omitempty"` Manufacturer *string `protobuf:"bytes,6,opt,name=manufacturer" json:"manufacturer,omitempty"` Device *string `protobuf:"bytes,7,opt,name=device" json:"device,omitempty"` OsBuildNumber *string `protobuf:"bytes,8,opt,name=os_build_number,json=osBuildNumber" json:"os_build_number,omitempty"` PhoneId *string `protobuf:"bytes,9,opt,name=phone_id,json=phoneId" json:"phone_id,omitempty"` ReleaseChannel *int32 `protobuf:"varint,10,opt,name=release_channel,json=releaseChannel,enum=int32" json:"release_channel,omitempty"` LocaleLanguageIso6391 *string `protobuf:"bytes,11,opt,name=locale_language_iso_639_1,json=localeLanguageIso6391" json:"locale_language_iso_639_1,omitempty"` LocaleCountryIso31661Alpha2 *string `` /* 146-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
type ClientPayload_UserAgent_AppVersion ¶
type ClientPayload_UserAgent_AppVersion struct { Primary *uint32 `protobuf:"varint,1,opt,name=primary" json:"primary,omitempty"` Secondary *uint32 `protobuf:"varint,2,opt,name=secondary" json:"secondary,omitempty"` Tertiary *uint32 `protobuf:"varint,3,opt,name=tertiary" json:"tertiary,omitempty"` Quaternary *uint32 `protobuf:"varint,4,opt,name=quaternary" json:"quaternary,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
type ClientPayload_WebInfo ¶
type ClientPayload_WebInfo struct { RefToken *string `protobuf:"bytes,1,opt,name=ref_token,json=refToken" json:"ref_token,omitempty"` Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` WebdPayload *ClientPayload_WebInfo_WebdPayload `protobuf:"bytes,3,opt,name=webd_payload,json=webdPayload" json:"webd_payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
type ClientPayload_WebInfo_WebdPayload ¶
type ClientPayload_WebInfo_WebdPayload struct { UsesParticipantInKey *bool `protobuf:"varint,1,opt,name=uses_participant_in_key,json=usesParticipantInKey" json:"uses_participant_in_key,omitempty"` SupportsStarredMessages *bool `` /* 126-byte string literal not displayed */ SupportsDocumentMessages *bool `` /* 129-byte string literal not displayed */ SupportsUrlMessages *bool `protobuf:"varint,4,opt,name=supports_url_messages,json=supportsUrlMessages" json:"supports_url_messages,omitempty"` SupportsMediaRetry *bool `protobuf:"varint,5,opt,name=supports_media_retry,json=supportsMediaRetry" json:"supports_media_retry,omitempty"` SupportsE2EImage *bool `protobuf:"varint,6,opt,name=supports_e2e_image,json=supportsE2eImage" json:"supports_e2e_image,omitempty"` SupportsE2EVideo *bool `protobuf:"varint,7,opt,name=supports_e2e_video,json=supportsE2eVideo" json:"supports_e2e_video,omitempty"` SupportsE2EAudio *bool `protobuf:"varint,8,opt,name=supports_e2e_audio,json=supportsE2eAudio" json:"supports_e2e_audio,omitempty"` SupportsE2EDocument *bool `protobuf:"varint,9,opt,name=supports_e2e_document,json=supportsE2eDocument" json:"supports_e2e_document,omitempty"` DocumentTypes *string `protobuf:"bytes,10,opt,name=document_types,json=documentTypes" json:"document_types,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
type LoginDto ¶
type LoginDto struct { // socks 5 代理 UUID string Socks5 string AuthBody *AuthDataDto AuthBodyActual *AuthDataDtoActual // AuthHexData 握手认证数据 AuthHexData string // StaticPriKey 认证私钥 StaticPriKey string // StaticPubKey 认证公钥 StaticPubKey string //注册返回 ClientStaticKeypair string //EdgeRouting EdgeRouting string // IdentityPubKey string IdentityPriKey string Hash string }
LoginDto 登录信息
type VerifyCallbackFunc ¶
type Version42 ¶
func GetVersion42 ¶
func GetVersion42() *Version42
type WAHandshakeSettings ¶
type WAProtocolVersion ¶
WAProtocolVersion noise 握手版本
Click to show internal directories.
Click to hide internal directories.