diff --git a/client/client.go b/client/client.go index f4304fcd..959402d4 100644 --- a/client/client.go +++ b/client/client.go @@ -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}, diff --git a/client/entities.go b/client/entities.go index d4f10c56..0f930073 100644 --- a/client/entities.go +++ b/client/entities.go @@ -252,6 +252,7 @@ const ( AndroidPhone ClientProtocol = 1 IPad ClientProtocol = 2 AndroidWatch ClientProtocol = 3 + MacOS ClientProtocol = 4 ) func (g *GroupInfo) UpdateName(newName string) { diff --git a/client/global.go b/client/global.go index d6f12a69..c0157988 100644 --- a/client/global.go +++ b/client/global.go @@ -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 }