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:
1 parent
88a0b5f1b9
commit
a735b4176e
71 files changed
+571
-2140
No files matched your search
+14
-8
@@ -10,6 +10,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
headless "github.com/kulikov0/headless-client"
|
||||
"whitelist-bypass/relay/common"
|
||||
)
|
||||
|
||||
@@ -80,10 +81,10 @@ func (c *Client) bootstrapLogin() (flowToken, sessid, currentURI string, err err
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
}
|
||||
req.Header.Set("User-Agent", c.userAgent)
|
||||
req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
|
||||
req.Header.Set("Accept-Language", "ru,en;q=0.9")
|
||||
req.Header.Set("Upgrade-Insecure-Requests", "1")
|
||||
req.Header = headless.ChromeWindows.Headers(headless.DestDocument)
|
||||
if c.userAgent != "" {
|
||||
req.Header.Set("User-Agent", c.userAgent)
|
||||
}
|
||||
resp, err := c.HTTP.Do(req)
|
||||
if err != nil {
|
||||
return "", "", "", err
|
||||
@@ -183,11 +184,15 @@ func (c *Client) authDo(action string, form url.Values, sessid string) ([]byte,
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
req.Header.Set("User-Agent", c.userAgent)
|
||||
req.Header = headless.ChromeWindows.Headers(headless.DestEmpty)
|
||||
if c.userAgent != "" {
|
||||
req.Header.Set("User-Agent", c.userAgent)
|
||||
}
|
||||
req.Header.Set("Accept", "application/json, text/plain, */*")
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
|
||||
req.Header.Set("Origin", authNetBase)
|
||||
req.Header.Set("Referer", authNetBase+"/authorization/")
|
||||
req.Header.Set("Sec-Fetch-Site", secFetchSiteFor(endpoint, authNetBase))
|
||||
req.Header.Set("X-Requested-With", "XMLHttpRequest")
|
||||
if sessid != "" {
|
||||
req.Header.Set("X-Bitrix-Csrf-Token", sessid)
|
||||
@@ -206,9 +211,10 @@ func (c *Client) getPage(target string) (body, final string, err error) {
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
req.Header.Set("User-Agent", c.userAgent)
|
||||
req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
|
||||
req.Header.Set("Accept-Language", "ru,en;q=0.9")
|
||||
req.Header = headless.ChromeWindows.Headers(headless.DestDocument)
|
||||
if c.userAgent != "" {
|
||||
req.Header.Set("User-Agent", c.userAgent)
|
||||
}
|
||||
resp, err := c.HTTP.Do(req)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
|
||||
Reference in new issue
Block a user