mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-10-12 10:07:14 +02:00
Bumped deps Go, surf, x/crypto, compress, x/mod, swapped enetx utls/uquic forks for upstream utls/quic-go and updated surf method calls
Signed-off-by: RonniSkansing <rskansing@gmail.com>
This commit is contained in:
845 files changed
+12486
-157341
No files matched your search
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/enetx/g"
|
||||
"github.com/enetx/surf"
|
||||
"github.com/phishingclub/phishingclub/service"
|
||||
)
|
||||
@@ -103,7 +104,7 @@ func (m *ProxyHandler) createSurfClient(userAgent string, proxyConfig *service.P
|
||||
m.logger.Debugw("applying chrome browser impersonation")
|
||||
case profile.isFirefox:
|
||||
// firefox impersonation
|
||||
builder = impersonate.FireFox()
|
||||
builder = impersonate.Firefox()
|
||||
m.logger.Debugw("applying firefox browser impersonation")
|
||||
case profile.isSafari:
|
||||
// safari uses webkit - default to chrome for now as surf doesn't have safari profile
|
||||
@@ -141,17 +142,20 @@ func (m *ProxyHandler) createSurfClient(userAgent string, proxyConfig *service.P
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
builder = builder.Proxy(proxyURL.String())
|
||||
builder = builder.Proxy(g.String(proxyURL.String()))
|
||||
m.logger.Debugw("configured surf client with proxy",
|
||||
"proxy", proxyURL.String(),
|
||||
)
|
||||
}
|
||||
|
||||
// build the client
|
||||
client := builder.Build()
|
||||
result := builder.Build()
|
||||
if result.IsErr() {
|
||||
return nil, result.Err()
|
||||
}
|
||||
|
||||
// convert surf client to standard http.Client for compatibility
|
||||
return client.Std(), nil
|
||||
return result.Ok().Std(), nil
|
||||
}
|
||||
|
||||
// createHTTPClientWithImpersonation creates surf http client with optional impersonation
|
||||
|
||||
Reference in new issue
Block a user