ruleset_v2 integration test working

This commit is contained in:
Kevin Pham
2023-12-05 15:02:18 -06:00
parent e6e8b0edff
commit 52d12dd1ac
8 changed files with 271 additions and 285 deletions

View File

@@ -3,23 +3,13 @@ package proxychain
import (
"errors"
"fmt"
http "github.com/bogdanfinn/fhttp"
tls_client "github.com/bogdanfinn/tls-client"
"io"
"log"
"net/url"
"strings"
//"time"
//"net/http"
//"github.com/Danny-Dasilva/CycleTLS/cycletls"
//http "github.com/Danny-Dasilva/fhttp"
http "github.com/bogdanfinn/fhttp"
tls_client "github.com/bogdanfinn/tls-client"
//"github.com/bogdanfinn/tls-client/profiles"
"ladder/pkg/ruleset"
"github.com/gofiber/fiber/v2"
)
@@ -100,7 +90,6 @@ type ProxyChain struct {
onceRequestModifications []RequestModification
onceResponseModifications []ResponseModification
responseModifications []ResponseModification
Ruleset *ruleset.RuleSet
debugMode bool
abortErr error
APIPrefix string
@@ -177,13 +166,6 @@ func (chain *ProxyChain) WithAPIPath(path string) *ProxyChain {
return chain
}
// Adds a ruleset to ProxyChain
func (chain *ProxyChain) AddRuleset(rs *ruleset.RuleSet) *ProxyChain {
chain.Ruleset = rs
// TODO: add _applyRuleset method
return chain
}
func (chain *ProxyChain) _initializeRequest() (*http.Request, error) {
if chain.Context == nil {
chain.abortErr = chain.abort(errors.New("no context set"))