Documentation
¶
Overview ¶
Package stealthhttp provides a stealth HTTP client that mimics browser fingerprints to bypass Cloudflare and other anti-bot protections without external APIs.
Package stealthhttp provides utilities for extracting contact information
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultUserAgents = []string{
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}
DefaultUserAgents are common browser user agents
var DefaultWebProxies = []WebProxy{ { Name: "CroxyProxy", URLPattern: "https://www.croxyproxy.com/browse.php?u=%s&b=4", Enabled: true, }, { Name: "ProxySite", URLPattern: "https://www.proxysite.com/go/%s", Enabled: false, }, }
DefaultWebProxies are fallback web proxies when direct requests fail
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a stealth HTTP client that mimics browser TLS fingerprints
func (*Client) SetProxies ¶
SetProxies replaces the proxy list
type ClientOption ¶
type ClientOption func(*Client)
ClientOption configures the Client
func WithMaxRetries ¶
func WithMaxRetries(retries int) ClientOption
WithMaxRetries sets the maximum number of retries
func WithProxies ¶
func WithProxies(proxies []string) ClientOption
WithProxies sets the proxy list for rotation
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout sets the request timeout
func WithWebProxyFallback ¶
func WithWebProxyFallback(enabled bool) ClientOption
WithWebProxyFallback enables web proxy fallback when direct requests fail
type ContactInfo ¶
type ContactInfo struct {
Emails []string
Phones []string
Facebook string
Instagram string
Twitter string
LinkedIn string
WhatsApp string
YouTube string
TikTok string
Pinterest string
}
ContactInfo holds extracted contact information
func ExtractFromHTML ¶
func ExtractFromHTML(body []byte) *ContactInfo
ExtractFromHTML extracts contact information from HTML content