Documentation ¶
Index ¶
- func NewClient(options *Options) (http.Client, error)
- func StringToSpec(ja3 string, userAgent string, tlsExtensions *TLSExtensions, forceHTTP1 bool) (*utls.ClientHelloSpec, error)
- func ToHTTP2Settings(h2Settings *H2Settings) (http2Settings *http2.HTTP2Settings)
- type Browser
- type ContextKeyHeader
- type Extensions
- type H2Settings
- type Options
- type TLSExtensions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToSpec ¶
func StringToSpec(ja3 string, userAgent string, tlsExtensions *TLSExtensions, forceHTTP1 bool) (*utls.ClientHelloSpec, error)
StringToSpec creates a ClientHelloSpec based on a JA3 string
func ToHTTP2Settings ¶
func ToHTTP2Settings(h2Settings *H2Settings) (http2Settings *http2.HTTP2Settings)
Types ¶
type ContextKeyHeader ¶
type ContextKeyHeader struct{}
ContextKeyHeader Users of context.WithValue should define their own types for keys
type Extensions ¶
type Extensions struct { //PKCS1WithSHA256 SignatureScheme = 0x0401 //PKCS1WithSHA384 SignatureScheme = 0x0501 //PKCS1WithSHA512 SignatureScheme = 0x0601 //PSSWithSHA256 SignatureScheme = 0x0804 //PSSWithSHA384 SignatureScheme = 0x0805 //PSSWithSHA512 SignatureScheme = 0x0806 //ECDSAWithP256AndSHA256 SignatureScheme = 0x0403 //ECDSAWithP384AndSHA384 SignatureScheme = 0x0503 //ECDSAWithP521AndSHA512 SignatureScheme = 0x0603 //Ed25519 SignatureScheme = 0x0807 //PKCS1WithSHA1 SignatureScheme = 0x0201 //ECDSAWithSHA1 SignatureScheme = 0x0203 SupportedSignatureAlgorithms []string `json:"SupportedSignatureAlgorithms"` //CertCompressionZlib CertCompressionAlgo = 0x0001 //CertCompressionBrotli CertCompressionAlgo = 0x0002 //CertCompressionZstd CertCompressionAlgo = 0x0003 CertCompressionAlgo []string `json:"CertCompressionAlgo"` // Limit: 0x4001 RecordSizeLimit int `json:"RecordSizeLimit"` //PKCS1WithSHA256 SignatureScheme = 0x0401 //PKCS1WithSHA384 SignatureScheme = 0x0501 //PKCS1WithSHA512 SignatureScheme = 0x0601 //PSSWithSHA256 SignatureScheme = 0x0804 //PSSWithSHA384 SignatureScheme = 0x0805 //PSSWithSHA512 SignatureScheme = 0x0806 //ECDSAWithP256AndSHA256 SignatureScheme = 0x0403 //ECDSAWithP384AndSHA384 SignatureScheme = 0x0503 //ECDSAWithP521AndSHA512 SignatureScheme = 0x0603 //Ed25519 SignatureScheme = 0x0807 //PKCS1WithSHA1 SignatureScheme = 0x0201 //ECDSAWithSHA1 SignatureScheme = 0x0203 DelegatedCredentials []string `json:"DelegatedCredentials"` //GREASE_PLACEHOLDER = 0x0a0a //VersionTLS10 = 0x0301 //VersionTLS11 = 0x0302 //VersionTLS12 = 0x0303 //VersionTLS13 = 0x0304 //VersionSSL30 = 0x0300 SupportedVersions []string `json:"SupportedVersions"` //PskModePlain uint8 = pskModePlain //PskModeDHE uint8 = pskModeDHE PSKKeyExchangeModes []string `json:"PSKKeyExchangeModes"` //PKCS1WithSHA256 SignatureScheme = 0x0401 //PKCS1WithSHA384 SignatureScheme = 0x0501 //PKCS1WithSHA512 SignatureScheme = 0x0601 //PSSWithSHA256 SignatureScheme = 0x0804 //PSSWithSHA384 SignatureScheme = 0x0805 //PSSWithSHA512 SignatureScheme = 0x0806 //ECDSAWithP256AndSHA256 SignatureScheme = 0x0403 //ECDSAWithP384AndSHA384 SignatureScheme = 0x0503 //ECDSAWithP521AndSHA512 SignatureScheme = 0x0603 //Ed25519 SignatureScheme = 0x0807 //PKCS1WithSHA1 SignatureScheme = 0x0201 //ECDSAWithSHA1 SignatureScheme = 0x0203 SignatureAlgorithmsCert []string `json:"SignatureAlgorithmsCert"` //CurveP256 CurveID = 23 //CurveP384 CurveID = 24 //CurveP521 CurveID = 25 //X25519 CurveID = 29 KeyShareCurves []string `json:"KeyShareCurves"` //default is false, default is used grease, if not used grease the NotUsedGREASE param is true NotUsedGREASE bool `json:"NotUsedGREASE"` }
type H2Settings ¶
type H2Settings struct { //HEADER_TABLE_SIZE //ENABLE_PUSH //MAX_CONCURRENT_STREAMS //INITIAL_WINDOW_SIZE //MAX_FRAME_SIZE //MAX_HEADER_LIST_SIZE Settings map[string]int `json:"Settings"` //HEADER_TABLE_SIZE //ENABLE_PUSH //MAX_CONCURRENT_STREAMS //INITIAL_WINDOW_SIZE //MAX_FRAME_SIZE //MAX_HEADER_LIST_SIZE SettingsOrder []string `json:"SettingsOrder"` ConnectionFlow int `json:"ConnectionFlow"` HeaderPriority map[string]interface{} `json:"HeaderPriority"` PriorityFrames []map[string]interface{} `json:"PriorityFrames"` }
type Options ¶
type Options struct { Browser Browser Timeout int TLSConfig *utls.Config TLSExtensions *TLSExtensions HTTP2Settings *http2.HTTP2Settings ForceHTTP1 bool Proxy string }
type TLSExtensions ¶
type TLSExtensions struct { SupportedSignatureAlgorithms *utls.SignatureAlgorithmsExtension CertCompressionAlgo *utls.UtlsCompressCertExtension RecordSizeLimit *utls.FakeRecordSizeLimitExtension DelegatedCredentials *utls.DelegatedCredentialsExtension SupportedVersions *utls.SupportedVersionsExtension PSKKeyExchangeModes *utls.PSKKeyExchangeModesExtension SignatureAlgorithmsCert *utls.SignatureAlgorithmsCertExtension NotUsedGREASE bool }
func ToTLSExtensions ¶
func ToTLSExtensions(e *Extensions) (extensions *TLSExtensions)
Click to show internal directories.
Click to hide internal directories.