fix srcset handler in html rewriter

This commit is contained in:
Kevin Pham
2023-11-27 21:36:50 -06:00
parent 78e15d8342
commit 0fe02c397d
8 changed files with 59 additions and 33 deletions

View File

@@ -19,11 +19,12 @@ func init() {
"x-forwarded-for": true,
"x-real-ip": true,
"forwarded": true,
"accept-encoding": true,
}
}
// ForwardRequestHeaders forwards the requests headers sent from the client to the upstream server
func ForwardRequestHeaders(ua string) proxychain.RequestModification {
func ForwardRequestHeaders() proxychain.RequestModification {
return func(chain *proxychain.ProxyChain) error {
forwardHeaders := func(key, value []byte) {
@@ -32,6 +33,7 @@ func ForwardRequestHeaders(ua string) proxychain.RequestModification {
if forwardBlacklist[k] {
return
}
//fmt.Println(k, v)
chain.Request.Header.Set(k, v)
}

View File

@@ -1,8 +1,8 @@
package requestmodifers
import (
//"net/http"
http "github.com/Danny-Dasilva/fhttp"
"net/http"
//http "github.com/Danny-Dasilva/fhttp"
"ladder/proxychain"
)

View File

@@ -5,8 +5,8 @@ import (
"encoding/json"
"fmt"
"net"
//"net/http"
http "github.com/Danny-Dasilva/fhttp"
"net/http"
//http "github.com/Danny-Dasilva/fhttp"
"time"
"ladder/proxychain"

View File

@@ -1,5 +1,15 @@
package requestmodifers
import "ladder/proxychain"
// TODO: fix
func SpoofJA3fingerprint(ja3 string, userAgent string) proxychain.RequestModification {
return func(chain *proxychain.ProxyChain) error {
return nil
}
}
/*
import (
"github.com/Danny-Dasilva/CycleTLS/cycletls"
http "github.com/Danny-Dasilva/fhttp"
@@ -44,3 +54,4 @@ func SpoofJA3fingerprintWithProxy(ja3 string, userAgent string, proxy proxy.Cont
return nil
}
}
*/