1
0
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:
Mrs4s 2020-11-14 18:52:36 +08:00
parent 90ec60bcb8
commit 1ea9f982fe
3 changed files with 19 additions and 4 deletions

View File

@ -177,6 +177,10 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
version: genVersionInfo(SystemDeviceInfo.Protocol), version: genVersionInfo(SystemDeviceInfo.Protocol),
servers: []*net.TCPAddr{}, 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 adds, err := net.LookupIP("msfwifi.3g.qq.com") // host servers
if err == nil && len(adds) > 0 { if err == nil && len(adds) > 0 {
var hostAddrs []*net.TCPAddr var hostAddrs []*net.TCPAddr
@ -185,13 +189,10 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
IP: addr, IP: addr,
Port: 8080, Port: 8080,
}) })
break // 第一个就好23333
} }
cli.servers = append(hostAddrs, cli.servers...) 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 { if len(cli.servers) == 0 {
cli.servers = []*net.TCPAddr{ // default servers cli.servers = []*net.TCPAddr{ // default servers
{IP: net.IP{42, 81, 172, 81}, Port: 80}, {IP: net.IP{42, 81, 172, 81}, Port: 80},

View File

@ -252,6 +252,7 @@ const (
AndroidPhone ClientProtocol = 1 AndroidPhone ClientProtocol = 1
IPad ClientProtocol = 2 IPad ClientProtocol = 2
AndroidWatch ClientProtocol = 3 AndroidWatch ClientProtocol = 3
MacOS ClientProtocol = 4
) )
func (g *GroupInfo) UpdateName(newName string) { func (g *GroupInfo) UpdateName(newName string) {

View File

@ -184,6 +184,19 @@ func genVersionInfo(p ClientProtocol) *versionInfo {
SubSigmap: 66560, SubSigmap: 66560,
MainSigMap: 1970400, 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 return nil
} }