tlsadapter

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCustomClientHelloSpec

func GetCustomClientHelloSpec() *tls.ClientHelloSpec

GetCustomClientHelloSpec returns a custom Chrome 96 spec. Please note that this is a function and not a variable because UTLS doesn't allow this to be shared state.

Types

type TLSAdapter

type TLSAdapter struct {
	// TLS fingerprint to use.
	// Defaults to tls.HelloCustom.
	Fingerprint utls.ClientHelloID

	// Optional TLS configuration to use.
	Config *utls.Config
}

TLSAdapter implements a custom gotcha.Adapter with advanced TLS options.

func New

func New(config *utls.Config) *TLSAdapter

New creates a new gotcha adapter configured with a Chrome 96 browser TLS fingerprint.

func (*TLSAdapter) ConnectTLSContext

func (ua *TLSAdapter) ConnectTLSContext(_ context.Context, conn net.Conn) (net.Conn, error)

func (*TLSAdapter) DoRequest

func (ua *TLSAdapter) DoRequest(options *gotcha.Options) (*gotcha.Response, error)

DoRequest executes a HTTP 1 request and returns its response.

Jump to

Keyboard shortcuts

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