#65 use full URL in package line
This commit is contained in:
@@ -7,10 +7,11 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"ladder/handlers"
|
||||
"ladder/internal/cli"
|
||||
"ladder/proxychain/requestmodifiers/bot"
|
||||
"ladder/proxychain/ruleset"
|
||||
"github.com/everywall/ladder/handlers"
|
||||
"github.com/everywall/ladder/internal/cli"
|
||||
|
||||
"github.com/everywall/ladder/proxychain/requestmodifiers/bot"
|
||||
ruleset_v2 "github.com/everywall/ladder/proxychain/ruleset"
|
||||
|
||||
"github.com/akamensky/argparse"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
rx "ladder/proxychain/requestmodifiers"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
rx "github.com/everywall/ladder/proxychain/requestmodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
@@ -2,8 +2,9 @@ package handlers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/api"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"ladder/proxychain/responsemodifiers/api"
|
||||
)
|
||||
|
||||
func NewAPIModifersListHandler(opts *ProxyOptions) fiber.Handler {
|
||||
|
||||
@@ -146,7 +146,7 @@ package handlers
|
||||
// for use in proxychains.
|
||||
|
||||
import (
|
||||
"ladder/proxychain/responsemodifiers/api"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/api"
|
||||
)
|
||||
|
||||
type ModifiersAPIResponse struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ package handlers
|
||||
// for use in proxychains.
|
||||
|
||||
import (
|
||||
"ladder/proxychain/responsemodifiers/api"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/api"
|
||||
)
|
||||
|
||||
type ModifiersAPIResponse struct {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
rx "ladder/proxychain/requestmodifiers"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
rx "github.com/everywall/ladder/proxychain/requestmodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
rx "ladder/proxychain/requestmodifiers"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
rx "github.com/everywall/ladder/proxychain/requestmodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
rx "ladder/proxychain/requestmodifiers"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
"ladder/proxychain/ruleset"
|
||||
rx "github.com/everywall/ladder/proxychain/requestmodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
ruleset_v2 "github.com/everywall/ladder/proxychain/ruleset"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"ladder/proxychain/ruleset"
|
||||
ruleset_v2 "github.com/everywall/ladder/proxychain/ruleset"
|
||||
)
|
||||
|
||||
// HandleRulesetMerge merges a set of ruleset files, specified by the rulesetPath or RULESET env variable, into either YAML or Gzip format.
|
||||
|
||||
@@ -70,8 +70,8 @@ package ruleset_v2
|
||||
// for use in proxychains.
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
)
|
||||
|
||||
type ResponseModifierFactory func(params ...string) proxychain.ResponseModification
|
||||
@@ -142,8 +142,8 @@ package ruleset_v2
|
||||
// for use in proxychains.
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
rx "ladder/proxychain/requestmodifiers"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
rx "github.com/everywall/ladder/proxychain/requestmodifiers"
|
||||
)
|
||||
|
||||
type RequestModifierFactory func(params ...string) proxychain.RequestModification
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"math/rand"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// AddCacheBusterQuery modifies query params to add a random parameter key
|
||||
|
||||
@@ -3,7 +3,7 @@ package requestmodifiers
|
||||
import (
|
||||
"strings"
|
||||
//"fmt"
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
var forwardBlacklist map[string]bool
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"ladder/proxychain/requestmodifiers/bot"
|
||||
"github.com/everywall/ladder/proxychain/requestmodifiers/bot"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// MasqueradeAsGoogleBot modifies user agent and x-forwarded for
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
func ModifyDomainWithRegex(matchRegex string, replacement string) proxychain.RequestModification {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
//http "github.com/Danny-Dasilva/fhttp"
|
||||
http "github.com/bogdanfinn/fhttp"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SetOutgoingCookie modifes a specific cookie name
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
func ModifyPathWithRegex(matchRegex string, replacement string) proxychain.RequestModification {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
//"fmt"
|
||||
"net/url"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// ModifyQueryParams replaces query parameter values in URL's query params in a ProxyChain's URL.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SetRequestHeader modifies a specific outgoing header
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
"net/url"
|
||||
"regexp"
|
||||
|
||||
"ladder/proxychain"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
const archivistUrl string = "https://archive.is/latest"
|
||||
|
||||
@@ -3,7 +3,7 @@ package requestmodifiers
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
const googleCacheUrl string = "https://webcache.googleusercontent.com/search?q=cache:"
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
"net/url"
|
||||
"regexp"
|
||||
|
||||
"ladder/proxychain"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
const waybackUrl string = "https://web.archive.org/web/"
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
//"net/http"
|
||||
*/
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// resolveWithGoogleDoH resolves DNS using Google's DNS-over-HTTPS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofOrigin modifies the origin header
|
||||
|
||||
@@ -3,8 +3,9 @@ package requestmodifiers
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"ladder/proxychain"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrer modifies the referrer header.
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromBaiduSearch modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromBingSearch modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromGoogleSearch modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromLinkedInPost modifies the referrer header
|
||||
|
||||
@@ -3,7 +3,7 @@ package requestmodifiers
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromNaverSearch modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromPinterestPost modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromQQPost modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromRedditPost modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromTumblrPost modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromTwitterPost modifies the referrer header
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromVkontaktePost modifies the referrer header
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofReferrerFromWeiboPost modifies the referrer header
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
_ "embed"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// https://github.com/faisalman/ua-parser-js/tree/master
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofXForwardedFor modifies the X-Forwarded-For header
|
||||
|
||||
@@ -7,8 +7,9 @@ import (
|
||||
|
||||
"github.com/markusmobius/go-trafilatura"
|
||||
|
||||
"ladder/proxychain"
|
||||
"ladder/proxychain/responsemodifiers/api"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/api"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// APIContent creates an JSON representation of the article and returns it as an API response.
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"ladder/proxychain/responsemodifiers/api"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/api"
|
||||
)
|
||||
|
||||
func TestCreateAPIErrReader(t *testing.T) {
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
_ "embed"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"ladder/proxychain/responsemodifiers/rewriters"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/rewriters"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
//go:embed vendor/block_element_removal.js
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"ladder/proxychain/responsemodifiers/rewriters"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/rewriters"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// BlockThirdPartyScripts rewrites HTML and injects JS to block all third party JS from loading.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package responsemodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// BypassCORS modifies response headers to prevent the browser
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package responsemodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// TODO: handle edge case where CSP is specified in meta tag:
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
_ "embed"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// DeleteLocalStorageData deletes localstorage cookies.
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
_ "embed"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// DeleteSessionStorageData deletes localstorage cookies.
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
var forwardBlacklist map[string]bool
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
|
||||
"golang.org/x/net/html"
|
||||
"golang.org/x/net/html/atom"
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
_ "embed"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"ladder/proxychain/responsemodifiers/rewriters"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/rewriters"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// injectScript modifies HTTP responses
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
//"net/http"
|
||||
//http "github.com/Danny-Dasilva/fhttp"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// DeleteIncomingCookies prevents ALL cookies from being sent from the proxy server
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package responsemodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// SetResponseHeader modifies response headers from the upstream server
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"ladder/proxychain/responsemodifiers/rewriters"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/rewriters"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
//go:embed vendor/patch_dynamic_resource_urls.js
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"log"
|
||||
"regexp"
|
||||
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
//go:embed vendor/ddg-tracker-surrogates/mapping.json
|
||||
|
||||
@@ -5,8 +5,9 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"ladder/proxychain"
|
||||
"ladder/proxychain/responsemodifiers/rewriters"
|
||||
"github.com/everywall/ladder/proxychain/responsemodifiers/rewriters"
|
||||
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
// RewriteHTMLResourceURLs modifies HTTP responses
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
//"gopkg.in/yaml.v3"
|
||||
"ladder/proxychain"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
)
|
||||
|
||||
type Rule struct {
|
||||
|
||||
@@ -5,8 +5,8 @@ package ruleset_v2
|
||||
// for use in proxychains.
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
rx "ladder/proxychain/requestmodifiers"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
rx "github.com/everywall/ladder/proxychain/requestmodifiers"
|
||||
)
|
||||
|
||||
type RequestModifierFactory func(params ...string) proxychain.RequestModification
|
||||
|
||||
@@ -5,8 +5,8 @@ package ruleset_v2
|
||||
// for use in proxychains.
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
tx "ladder/proxychain/responsemodifiers"
|
||||
"github.com/everywall/ladder/proxychain"
|
||||
tx "github.com/everywall/ladder/proxychain/responsemodifiers"
|
||||
)
|
||||
|
||||
type ResponseModifierFactory func(params ...string) proxychain.ResponseModification
|
||||
|
||||
Reference in New Issue
Block a user