feat(session): open a websocket on the rnet session

This commit is contained in:
imSp4rky
2026-11-27 18:05:34 -07:00
parent e098ad38b9
commit 32250f6f95
3 changed files with 141 additions and 1 deletions
+5 -1
View File
@@ -171,7 +171,11 @@ class TrackRequest:
streaming platform blocks you on TLS fingerprint alone, override it to return
`session("Chrome131")` (any `rnet.Impersonate` preset). `RnetSession` is a
drop-in `requests.Session` replacement (same `.get`/`.post`/cookie-jar
interface), so nothing else in the service changes. If instead you need
interface), so nothing else in the service changes. For a websocket,
`self.session.websocket(url, headers)` opens one with the same preset and
proxy, and sends only the headers you give. Its `recv()` has no read
timeout and gives each ping to you, so the thread that reads answers the
pings and closes the socket. If instead you need
specific SSL *cipher* behaviour, mount
`unshackle.core.utils.sslciphers.SSLCiphers` onto a plain `requests.Session`.