Documentation
¶
Overview ¶
Package client provides an *http.Client whose TLS handshake matches a persona's utls ClientHelloID.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns an *http.Client configured for the persona. The persona's User-Agent is set automatically unless the caller already set one.
func ParseProxy ¶
ParseProxy accepts both URL form ([scheme://][user:pass@]host:port) and the IP-rotation 4-part form (host:port:user:pass). Default scheme is http; pass socks5:// or https:// explicitly when needed.
Limitation: a 4-part password containing '@' is ambiguous with URL form and not supported — use URL form instead.
func SanitizeHost ¶
SanitizeHost validates a host string for CLI input.
Types ¶
type ConnState ¶
type ConnState struct {
NegotiatedProtocol string
CipherSuite uint16
PeerCertCommonName string
Version uint16
}
ConnState exposes a subset of TLS state for test introspection.
type Options ¶
type Options struct {
Timeout time.Duration
DialTimeout time.Duration
InsecureSkipVerify bool
MaxBodyBytes int64
MinTLSVersion uint16
MaxTLSVersion uint16
ALPNOverride []string // non-nil empty list suppresses ALPN
SNIOverride string // "-" omits SNI entirely
UserAgentOverride string
ExtraHeaders map[string]string
DropHeaders []string
StripCookies bool
MethodOverride string
Proxy *url.URL // build with ParseProxy
}
Options tunes the client. The lower group are the per-probe axis-mutation knobs that hunt uses to vary one aspect of the connection at a time.