raw

package
v3.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP_PROXY_ENV = "HTTP_PROXY"
	SOCKS5         = "socks5"
	HTTP           = "http"
	HTTPS          = "https"
	DefaultTimeout = 10
)

Variables

View Source
var (
	// ProxyURL is the URL for the proxy server
	ProxyURL string
	// ProxySocksURL is the URL for the proxy socks server
	ProxySocksURL string
)

Functions

func AssignVariableRaw

func AssignVariableRaw(find string, variableMap map[string]any) string

func ExpandMapValues

func ExpandMapValues(m map[string]string) map[string][]string

func GetRawHTTP

func GetRawHTTP(proxy string, timeout int) *rawhttp.Client

func LoadProxyServers

func LoadProxyServers(proxy string) error

loadProxyServers load list of proxy servers from file or comma seperated

func RandomIntWithMin

func RandomIntWithMin(min, max int) int

Types

type RawHttp

type RawHttp struct {
	RawhttpClient   *rawhttp.Client
	MaxRespBodySize int
}

func (*RawHttp) RawHttpRequest

func (r *RawHttp) RawHttpRequest(request, baseurl string, header []string, variableMap map[string]any) error

type Request

type Request struct {
	FullURL        string
	Method         string
	Path           string
	Data           string
	Headers        map[string]string
	UnsafeHeaders  client.Headers
	UnsafeRawBytes []byte
}

Request defines a basic HTTP raw request

func Parse

func Parse(request, baseURL string, unsafe bool) (*Request, error)

Parse parses the raw request as supplied by the user

func (*Request) TryFillCustomHeaders

func (r *Request) TryFillCustomHeaders(headers []string) error

TryFillCustomHeaders after the Host header

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL