Versions in this module Expand all Collapse all v0 v0.0.2 May 22, 2023 Changes in this version + const HTTP + const HTTPS + const HTTPandHTTPS + const HTTPorHTTPS + var CSPHeaders = []string + var DefaultOptions = Options + func DecodeData(data []byte, headers http.Header) ([]byte, error) + func DecodeKorean(s []byte) ([]byte, error) + func Decodebig5(s []byte) ([]byte, error) + func Decodegbk(s []byte) ([]byte, error) + func Encodebig5(s []byte) ([]byte, error) + func ExtractTitle(r *Response) (title string) + type CSPData struct + Domains []string + type ChainItem struct + Location string + Request string + RequestURL string + Response string + StatusCode int + type CustomCallback func(response *Response) (bool, error) + type Filter interface + Filter func(response *Response) (bool, error) + type FilterCustom struct + CallBacks []CustomCallback + func (f FilterCustom) Filter(response *Response) (bool, error) + type FilterRegex struct + Regexs []string + func (f FilterRegex) Filter(response *Response) (bool, error) + type FilterString struct + Keywords []string + func (f FilterString) Filter(response *Response) (bool, error) + type HTTPX struct + CustomHeaders map[string]string + Dialer *fastdialer.Dialer + Filters []Filter + Options *Options + func New(options *Options) (*HTTPX, error) + func (h *HTTPX) AddFilter(f Filter) + func (h *HTTPX) CSPGrab(r *Response) *CSPData + func (h *HTTPX) CdnCheck(ip string) (bool, string, error) + func (h *HTTPX) Do(req *retryablehttp.Request, unsafeOptions UnsafeOptions) (*Response, error) + func (h *HTTPX) IsVirtualHost(req *retryablehttp.Request, unsafeOptions UnsafeOptions) (bool, error) + func (h *HTTPX) NewRequest(method, targetURL string) (req *retryablehttp.Request, err error) + func (h *HTTPX) NewRequestWithContext(ctx context.Context, method, targetURL string) (req *retryablehttp.Request, err error) + func (h *HTTPX) SetCustomHeaders(r *retryablehttp.Request, headers map[string]string) + func (h *HTTPX) SupportHTTP2(protocol, method, targetURL string) bool + func (h *HTTPX) SupportPipeline(protocol, method, host string, port int) bool + func (h *HTTPX) TLSGrab(r *http.Response) *clients.Response + func (h *HTTPX) Verify(req *retryablehttp.Request, unsafeOptions UnsafeOptions) (bool, error) + type Options struct + Allow []string + CdnCheck bool + CustomHeaders map[string]string + DefaultUserAgent string + Deny []string + ExcludeCdn bool + FollowHostRedirects bool + FollowRedirects bool + HTTPProxy string + MaxRedirects int + MaxResponseBodySizeToRead int64 + MaxResponseBodySizeToSave int64 + RandomAgent bool + Resolvers []string + RetryMax int + SniName string + SocksProxy string + TLSGrab bool + Threads int + Timeout time.Duration + Unsafe bool + UnsafeURI string + VHostIgnoreContentLength bool + VHostIgnoreNumberOfLines bool + VHostIgnoreNumberOfWords bool + VHostIgnoreStatusCode bool + VHostSimilarityRatio int + VHostStripHTML bool + ZTLS bool + type Response struct + CSPData *CSPData + Chain []httputil.ChainItem + ContentLength int + Data []byte + Duration time.Duration + HTTP2 bool + Headers map[string][]string + Lines int + Pipeline bool + Raw string + RawData []byte + RawHeaders string + StatusCode int + TLSData *clients.Response + Words int + func (r *Response) GetChain() string + func (r *Response) GetChainAsSlice() (chain []ChainItem) + func (r *Response) GetChainLastURL() string + func (r *Response) GetChainStatusCodes() []int + func (r *Response) GetHeader(name string) string + func (r *Response) GetHeaderPart(name, sep string) string + func (r *Response) HasChain() bool + type Target struct + CustomHost string + CustomIP string + Host string + type UnsafeOptions struct + URIPath string