refactor wip

This commit is contained in:
Kevin Pham
2023-11-19 15:03:11 -06:00
parent 98fa53287b
commit ee9066dedb
27 changed files with 377 additions and 210 deletions

View File

@@ -12,8 +12,8 @@ import (
"ladder/pkg/ruleset"
"ladder/proxychain"
"ladder/proxychain/rqm"
"ladder/proxychain/rsm"
rx "ladder/proxychain/requestmodifers"
tx "ladder/proxychain/responsemodifers"
"github.com/PuerkitoBio/goquery"
"github.com/gofiber/fiber/v2"
@@ -49,19 +49,20 @@ func NewProxySiteHandler(opts *ProxyOptions) fiber.Handler {
rs = r
}
*/
proxychain := proxychain.
NewProxyChain().
SetDebugLogging(opts.Verbose).
SetRequestModifications(
rx.DeleteOutgoingCookies(),
).
AddResponseModifications(
tx.DeleteIncomingCookies(),
)
return func(c *fiber.Ctx) error {
return proxychain.NewProxyChain().
SetCtx(c).
//AddRuleset(&rs).
SetRequestModifications(
rqm.BlockOutgoingCookies(),
).
SetResultModifications(
rsm.BlockIncomingCookies(),
).
Execute()
return proxychain.SetFiberCtx(c).Execute()
}
}
func modifyURL(uri string, rule ruleset.Rule) (string, error) {