surfclient

package
v0.0.0-...-bcdcc2b Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package surfclient produces *net/http.Client instances backed by github.com/enetx/surf with Chrome browser impersonation enabled.

Using surf gives a modern TLS JA3 fingerprint, HTTP/2 settings and browser-accurate header ordering — but the returned client is a standard net/http.Client, so consumers in this project keep using stdlib types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dialer core.ContextDialer, rootCAs *x509.CertPool) *http.Client

New builds an *http.Client that uses surf under the hood.

If dialer is non-nil, it is injected into the underlying transport's DialContext via a client middleware that runs before surf's JA3 round tripper wraps the transport, so the dialer is preserved through wrapping.

If rootCAs is non-nil, it is set on the TLS config used by surf, honoring the project's -cafile flag.

Certificate verification is enabled (SecureTLS). Surf's default is to skip verification, which would be a regression compared to the original net/http based code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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