add common referrer options

This commit is contained in:
Kevin Pham
2023-11-21 20:33:52 -06:00
parent 0e620e46ab
commit a4e016b36c
12 changed files with 263 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package requestmodifers
import (
"ladder/proxychain"
)
// SpoofReferrerFromVkontaktePost modifies the referrer header
// pretending to be from a vkontakte post (popular in Russia)
func SpoofReferrerFromVkontaktePost(url string) proxychain.RequestModification {
return func(chain *proxychain.ProxyChain) error {
chain.AddRequestModifications(
SpoofReferrer("https://away.vk.com/"),
SetRequestHeader("sec-fetch-site", "cross-site"),
SetRequestHeader("sec-fetch-dest", "document"),
SetRequestHeader("sec-fetch-mode", "navigate"),
)
return nil
}
}