add support for rulesets in JSON format for frontend use

This commit is contained in:
Kevin Pham
2023-12-05 21:03:27 -06:00
parent 52d12dd1ac
commit 0b33765b4f
5 changed files with 146 additions and 23 deletions

View File

@@ -1,7 +1,6 @@
package handlers
import (
"fmt"
"ladder/proxychain"
rx "ladder/proxychain/requestmodifiers"
tx "ladder/proxychain/responsemodifiers"
@@ -61,12 +60,7 @@ func NewProxySiteHandler(opts *ProxyOptions) fiber.Handler {
// load ruleset
rule, exists := rs.GetRule(proxychain.Request.URL)
fmt.Println("============")
fmt.Println(proxychain.Request.URL)
fmt.Println(rs)
fmt.Println("============")
if exists {
fmt.Println("===========EXISTS=")
proxychain.AddOnceRequestModifications(rule.RequestModifications...)
proxychain.AddOnceResponseModifications(rule.ResponseModifications...)
}