Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedVersion = errors.New("mimic: unsupported version")
)
View Source
var (
PlatformWindows platform = "win"
)
Functions ¶
func GetLatestVersion ¶
GetLatestVersion returns the latest version of Chrome for the given platform.
func MustGetLatestVersion ¶
func MustGetLatestVersion(pf platform) string
MustGetLatestVersion is like GetLatestVersion but panics on error.
Types ¶
type ClientSpec ¶
type ClientSpec struct { HTTP2Options *HTTP2Options GetTlsSpec func() *utls.ClientHelloSpec // contains filtered or unexported fields }
func (*ClientSpec) ClientHintUA ¶
func (c *ClientSpec) ClientHintUA() string
ClientHintUA returns the "sec-ch-ua" header value for the mimicked client.
func (*ClientSpec) ConfigureTransport ¶
func (c *ClientSpec) ConfigureTransport(t1 *http.Transport) *http.Transport
ConfigureTransport configures a http.Transport to follow the client's spec Returns the given Transport for convenience
func (*ClientSpec) PseudoHeaderOrder ¶
func (c *ClientSpec) PseudoHeaderOrder() []string
PseudoHeaderOrder returns the pseudo header order for the mimicked client.
func (*ClientSpec) Version ¶
func (c *ClientSpec) Version() string
Version returns the version for the mimicked client..
Click to show internal directories.
Click to hide internal directories.