erase fingerprints (#177)

* add external modules and patches

* migrate pion webrtc to vendored headlessclient, drop local pion replaces

* use chrome ice credentials, one webrtc api per peer connection

* send one user agent everywhere, use the vendored websocket

* route the telemost joiner through headlessclient, drop the dead keylog

* answer telemost dtls without a hello verify round trip

* follow the headlessclient dtls 1.3 mimicry rename

* follow the headless-client rename and apply the profile before the caller settings

* build every webrtc api through relay/headlessapi

* register chrome rtp header extensions for every pion consumer

* dial vk webtransport signaling through the headless quic profile

* dial dion and wb stream through the headless chrome profile

* announce chrome's http/3 settings on the vk webtransport signaling

* send chrome header blocks on bitrix http and livekit websocket

* send chrome's webtransport connect headers on vk signaling

* stop passing invented track names to the library

* move wbp http paths onto the headlessclient profile

* migrate to a published headlessclient

* dedup go.mod
This commit is contained in:
kulikov0 authored and GitHub committed 2026-09-12 20:39:06 +02:00
1 parent 88a0b5f1b9
commit a735b4176e
71 files changed
+571 -2140

No files matched your search

+13 -13
View File
@@ -10,7 +10,7 @@ import (
"net/url"
"strings"
"whitelist-bypass/relay/common"
"github.com/kulikov0/headless-client"
)
const (
@@ -71,9 +71,14 @@ type connectionDetailsResponse struct {
}
func httpDo(client *http.Client, req *http.Request) (*http.Response, error) {
req.Header.Set("User-Agent", common.UserAgent)
req.Header.Set("User-Agent", headless.ChromeWindows.UserAgent())
for name, values := range headless.ChromeWindows.Headers(headless.DestEmpty) {
if _, present := req.Header[name]; !present {
req.Header[name] = values
}
}
if client == nil {
client = http.DefaultClient
client = headless.ChromeWindows.HTTPClient()
}
return client.Do(req)
}
@@ -87,7 +92,7 @@ func (t *cookieTransport) RoundTrip(req *http.Request) (*http.Response, error) {
req.Header.Set("Cookie", t.cookie)
base := t.base
if base == nil {
base = http.DefaultTransport
base = headless.ChromeWindows.HTTPClient().Transport
}
return base.RoundTrip(req)
}
@@ -97,7 +102,7 @@ func clientWithCookies(client *http.Client, cookieHeader string) *http.Client {
return client
}
if client == nil {
client = &http.Client{}
client = headless.ChromeWindows.HTTPClient()
}
wrapped := *client
wrapped.Transport = &cookieTransport{base: client.Transport, cookie: cookieHeader}
@@ -282,12 +287,8 @@ func RefreshAccessToken(client *http.Client, cookieHeader, deviceID string) (str
req.Header.Set("Origin", Origin)
req.Header.Set("Referer", Origin+"/")
req.Header.Set("Cookie", cookieHeader)
req.Header.Set("User-Agent", common.UserAgent)
if client == nil {
client = http.DefaultClient
}
resp, err := client.Do(req)
resp, err := httpDo(client, req)
if err != nil {
return "", nil, err
}
@@ -357,7 +358,7 @@ func SetParticipantPermissions(client *http.Client, accessToken, roomID, partici
func KickParticipant(client *http.Client, accessToken, roomID, participantID string) error {
if client == nil {
client = http.DefaultClient
client = headless.ChromeWindows.HTTPClient()
}
kickURL := fmt.Sprintf("%s/api-room-manager/api/v1/room/%s/participant/%s/kick", APIBase, roomID, participantID)
req, err := http.NewRequest("DELETE", kickURL, strings.NewReader("{}"))
@@ -366,8 +367,7 @@ func KickParticipant(client *http.Client, accessToken, roomID, participantID str
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+accessToken)
req.Header.Set("User-Agent", common.UserAgent)
resp, err := client.Do(req)
resp, err := httpDo(client, req)
if err != nil {
return err
}