tweak dynamic url rewriting logic

This commit is contained in:
Kevin Pham
2023-12-01 18:45:07 -06:00
parent 47def5c610
commit 59a57f2dbd
3 changed files with 316 additions and 298 deletions

View File

@@ -33,7 +33,7 @@ func NewProxySiteHandler(opts *ProxyOptions) fiber.Handler {
SetRequestModifications(
// rx.SpoofJA3fingerprint(ja3, "Googlebot"),
// rx.MasqueradeAsFacebookBot(),
//rx.MasqueradeAsGoogleBot(),
rx.MasqueradeAsGoogleBot(),
rx.DeleteOutgoingCookies(),
rx.ForwardRequestHeaders(),
//rx.SpoofReferrerFromGoogleSearch(),
@@ -42,6 +42,7 @@ func NewProxySiteHandler(opts *ProxyOptions) fiber.Handler {
// rx.RequestArchiveIs(),
).
AddResponseModifications(
tx.InjectScriptBeforeDOMContentLoaded(`(() => {let d = document.createElement("div"); d.id = "adb-check"; document.body.append(d) })()`),
tx.ForwardResponseHeaders(),
tx.BypassCORS(),
tx.BypassContentSecurityPolicy(),