Documentation ¶
Index ¶
- func CustomPaddingStyle(unpaddedLen int) (int, bool)
- func JA3toClientHello(ja3 string) (*tls.ClientHelloSpec, error)
- func ParrotStringToClientHelloID(parrot string) (clientHello tls.ClientHelloID, err error)
- type Transport
- func NewTransportFromJA3Insecure(ja3 string) (*Transport, error)
- func NewTransportFromJA3WithConfig(ja3 string, config *tls.Config) (*Transport, error)
- func NewTransportFromParrotInsecure(parrot string) (*Transport, error)
- func NewTransportFromParrotWithConfig(parrot string, config *tls.Config) (*Transport, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomPaddingStyle ¶
CustomPaddingStyle is a function to use with TLS extension ID 21, padding. In order to ensure this TLS extension is always enabled, the function never returns 0 or false like the BoringPaddingStyle function in the uTLS library does. Returns a random number between 0 and 65,535 Adapted from https://github.com/refraction-networking/utls/blob/8e1e65eb22d21c635523a31ec2bcb8730991aaad/u_tls_extensions.go#L680 https://www.rfc-editor.org/rfc/rfc7685.html
func JA3toClientHello ¶
func JA3toClientHello(ja3 string) (*tls.ClientHelloSpec, error)
JA3toClientHello creates a ClientHelloSpec based on a JA3 string JA3 string format: SSLVersion,Cipher,SSLExtension,EllipticCurve,EllipticCurvePointFormat
func ParrotStringToClientHelloID ¶
func ParrotStringToClientHelloID(parrot string) (clientHello tls.ClientHelloID, err error)
ParrotStringToClientHelloID reads in a string that represents a uTLS ClientHelloID and returns the real ClientHelloID object https://github.com/refraction-networking/utls/blob/8e1e65eb22d21c635523a31ec2bcb8730991aaad/u_common.go#L150
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is custom http.Transport that switches clients between HTTP/1.1 and HTTP2 depending on which protocol was negotiated during the TLS handshake. It is also used to create a http.Transport from a JA3 or parrot string
func NewTransportFromJA3Insecure ¶
NewTransportFromJA3Insecure creates a http.Transport which mocks the given JA3 signature when HTTPS is used The transport allows an insecure TLS connection by setting InsecureSkipVerify to true
func NewTransportFromJA3WithConfig ¶
NewTransportFromJA3WithConfig creates a http.Transport object given an utls.Config
func NewTransportFromParrotInsecure ¶
NewTransportFromParrotInsecure takes in a string that represents a ClientHelloID to parrot a TLS connection that looks like associated browser and returns a http transport The InsecureSkipVerify configuration is set to true so that the client WILL accept untrusted SSL/TLS certificates This function exists so that other tools do not need to import the uTLS library to build a config to pass in
func NewTransportFromParrotWithConfig ¶
NewTransportFromParrotWithConfig takes in a string that represents a ClientHelloID to parrot a TLS connection that looks like associated browser and returns a http transport
func (*Transport) Proxy ¶
Proxy adds a Proxy function to the http/1.1 client. HTTP/2 does not support a proxy