Add support Roborock source

This commit is contained in:
Alexey Khit
2023-03-19 12:14:20 +03:00
parent 12a7b96289
commit e728643aad
14 changed files with 1257 additions and 30 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ func NewClient(tracker, share, pwd string, pc *pion.PeerConnection) (*webrtc.Con
// 5. Send offer
msg := fmt.Sprintf(
`{"action":"announce","info_hash":"%s","peer_id":"%s","offers":[{"offer_id":"%s","offer":{"type":"offer","sdp":"%s"}}],"numwant":1}`,
InfoHash(share), core.RandString(16), nonce, base64.StdEncoding.EncodeToString(enc),
InfoHash(share), core.RandString(16, 36), nonce, base64.StdEncoding.EncodeToString(enc),
)
if err = ws.WriteMessage(websocket.TextMessage, []byte(msg)); err != nil {
return nil, err