mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
feature macos protocol.
This commit is contained in:
parent
90ec60bcb8
commit
1ea9f982fe
@ -177,6 +177,10 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
|
||||
version: genVersionInfo(SystemDeviceInfo.Protocol),
|
||||
servers: []*net.TCPAddr{},
|
||||
}
|
||||
sso, err := getSSOAddress()
|
||||
if err == nil && len(sso) > 0 {
|
||||
cli.servers = append(sso, cli.servers...)
|
||||
}
|
||||
adds, err := net.LookupIP("msfwifi.3g.qq.com") // host servers
|
||||
if err == nil && len(adds) > 0 {
|
||||
var hostAddrs []*net.TCPAddr
|
||||
@ -185,13 +189,10 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
|
||||
IP: addr,
|
||||
Port: 8080,
|
||||
})
|
||||
break // 第一个就好23333
|
||||
}
|
||||
cli.servers = append(hostAddrs, cli.servers...)
|
||||
}
|
||||
sso, err := getSSOAddress()
|
||||
if err == nil && len(sso) > 0 {
|
||||
cli.servers = append(sso, cli.servers...)
|
||||
}
|
||||
if len(cli.servers) == 0 {
|
||||
cli.servers = []*net.TCPAddr{ // default servers
|
||||
{IP: net.IP{42, 81, 172, 81}, Port: 80},
|
||||
|
@ -252,6 +252,7 @@ const (
|
||||
AndroidPhone ClientProtocol = 1
|
||||
IPad ClientProtocol = 2
|
||||
AndroidWatch ClientProtocol = 3
|
||||
MacOS ClientProtocol = 4
|
||||
)
|
||||
|
||||
func (g *GroupInfo) UpdateName(newName string) {
|
||||
|
@ -184,6 +184,19 @@ func genVersionInfo(p ClientProtocol) *versionInfo {
|
||||
SubSigmap: 66560,
|
||||
MainSigMap: 1970400,
|
||||
}
|
||||
case MacOS:
|
||||
return &versionInfo{
|
||||
ApkId: "com.tencent.minihd.qq",
|
||||
AppId: 537064315,
|
||||
SortVersionName: "5.8.9",
|
||||
BuildTime: 1595836208,
|
||||
ApkSign: []byte{170, 57, 120, 244, 31, 217, 111, 249, 145, 74, 102, 158, 24, 100, 116, 199},
|
||||
SdkVersion: "6.0.0.2433",
|
||||
SSOVersion: 12,
|
||||
MiscBitmap: 150470524,
|
||||
SubSigmap: 66560,
|
||||
MainSigMap: 1970400,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user