Fix support HKSV for HomeKit cameras #684

This commit is contained in:
Alex X
2025-03-12 22:28:30 +03:00
parent 6a4c73db03
commit 60250a32c2
7 changed files with 364 additions and 42 deletions
+3 -2
View File
@@ -6,7 +6,6 @@ import (
"errors"
"io"
"net"
"sync"
"time"
"github.com/AlexxIT/go2rtc/pkg/hap/chacha20poly1305"
@@ -24,7 +23,7 @@ type Conn struct {
encryptCnt uint64
decryptCnt uint64
mx sync.Mutex
SharedKey []byte
}
func Client(conn net.Conn, sharedKey []byte, isClient bool) (net.Conn, error) {
@@ -42,6 +41,8 @@ func Client(conn net.Conn, sharedKey []byte, isClient bool) (net.Conn, error) {
conn: conn,
rd: bufio.NewReaderSize(conn, 32*1024),
wr: bufio.NewWriterSize(conn, 32*1024),
SharedKey: sharedKey,
}
if isClient {