chrome

package
v1.0.203 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MLDSA44 utls.SignatureScheme = 0x0904
	MLDSA65 utls.SignatureScheme = 0x0905
	MLDSA87 utls.SignatureScheme = 0x0906
)

ML-DSA (post-quantum) TLS 1.3 signature schemes that Chrome 150 advertises at the head of its signature_algorithms list. utls does not yet name them, so they are spelled as raw SignatureScheme code points (per the TLS ML-DSA draft). Without them a Chrome-150 UA ships a pre-150 JA4, which some Akamai deployments reject.

View Source
const SecCHUA = `"Not;A=Brand";v="8", "Chromium";v="150", "Google Chrome";v="150"`

SecCHUA is the static value of the sec-ch-ua header for Chrome 150 (Chromium brand list). If the mobile sec-ch-ua diverges from desktop, introduce SecCHUAMobile here and wire it into chrome.Mobile in variant.go.

Variables

View Source
var Desktop = profiles.Variant{
	HelloSpec:    &HelloChrome_150,
	Boundary:     Boundary,
	ConfigureH2:  configureH2Desktop,
	ConfigureH3:  configureH3Desktop,
	BuildHeaders: buildHeadersDesktop,
	Headers:      DesktopApplier,
}

Desktop is the Chrome 150 desktop variant - current production fingerprint.

View Source
var DesktopApplier = profiles.NewApplier(insertDesktopHeaders, insertDesktopHeaders, headerCache, false)

DesktopApplier applies the desktop Chrome request-header pipeline. Wired into chrome.Desktop.

View Source
var HelloChrome_150 = utls.ClientHelloSpec{
	CipherSuites: []uint16{
		utls.GREASE_PLACEHOLDER,
		utls.TLS_AES_128_GCM_SHA256,
		utls.TLS_AES_256_GCM_SHA384,
		utls.TLS_CHACHA20_POLY1305_SHA256,
		utls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
		utls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
		utls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
		utls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
		utls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
		utls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
		utls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
		utls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
		utls.TLS_RSA_WITH_AES_128_GCM_SHA256,
		utls.TLS_RSA_WITH_AES_256_GCM_SHA384,
		utls.TLS_RSA_WITH_AES_128_CBC_SHA,
		utls.TLS_RSA_WITH_AES_256_CBC_SHA,
	},
	CompressionMethods: []byte{0x00},
	Extensions: utls.ShuffleChromeTLSExtensions(
		[]utls.TLSExtension{
			&utls.UtlsGREASEExtension{},
			&utls.SNIExtension{},
			&utls.ExtendedMasterSecretExtension{},
			&utls.RenegotiationInfoExtension{
				Renegotiation: utls.RenegotiateOnceAsClient,
			},
			&utls.SupportedCurvesExtension{
				Curves: []utls.CurveID{
					utls.GREASE_PLACEHOLDER,
					utls.X25519MLKEM768,
					utls.X25519,
					utls.CurveP256,
					utls.CurveP384,
				},
			},
			&utls.SupportedPointsExtension{
				SupportedPoints: []byte{0x00},
			},
			&utls.SessionTicketExtension{},
			&utls.ALPNExtension{
				AlpnProtocols: []string{"h2", "http/1.1"},
			},
			&utls.StatusRequestExtension{},
			&utls.SignatureAlgorithmsExtension{
				SupportedSignatureAlgorithms: []utls.SignatureScheme{
					MLDSA44,
					MLDSA65,
					MLDSA87,
					utls.ECDSAWithP256AndSHA256,
					utls.PSSWithSHA256,
					utls.PKCS1WithSHA256,
					utls.ECDSAWithP384AndSHA384,
					utls.PSSWithSHA384,
					utls.PKCS1WithSHA384,
					utls.PSSWithSHA512,
					utls.PKCS1WithSHA512,
				},
			},
			&utls.SCTExtension{},
			&utls.KeyShareExtension{
				KeyShares: []utls.KeyShare{
					{Group: utls.GREASE_PLACEHOLDER, Data: []byte{0}},
					{Group: utls.X25519MLKEM768},
					{Group: utls.X25519},
				},
			},
			&utls.PSKKeyExchangeModesExtension{
				Modes: []uint8{
					utls.PskModeDHE,
				},
			},
			&utls.SupportedVersionsExtension{
				Versions: []uint16{
					utls.GREASE_PLACEHOLDER,
					utls.VersionTLS13,
					utls.VersionTLS12,
				},
			},
			&utls.UtlsCompressCertExtension{
				Algorithms: []utls.CertCompressionAlgo{
					utls.CertCompressionBrotli,
				},
			},
			&utls.ApplicationSettingsExtensionNew{
				SupportedProtocols: []string{"h2"},
			},
			utls.BoringGREASEECH(),
			&utls.UtlsGREASEExtension{},
			&utls.UtlsPreSharedKeyExtension{},
		},
	),
}

HelloChrome_150 mirrors HelloChrome_144 but prepends the ML-DSA signature schemes to match Chrome 150's signature_algorithms (and therefore its JA4).

View Source
var HelloChrome_150_Mobile = HelloChrome_150

HelloChrome_150_Mobile is a placeholder mobile variant. On the day real Chrome Android 150 ClientHello bytes are observed, replace this body — it is the single point of substitution for the mobile TLS fingerprint.

View Source
var Mobile = profiles.Variant{
	HelloSpec:    &HelloChrome_150_Mobile,
	Boundary:     Boundary,
	ConfigureH2:  configureH2Mobile,
	ConfigureH3:  configureH3Mobile,
	BuildHeaders: buildHeadersMobile,
	Headers:      MobileApplier,
}

Mobile is a placeholder Chrome 150 mobile variant. On the day real Chrome Android 150 bytes are observed, replace HelloChrome_150_Mobile, configureH2Mobile, configureH3Mobile and buildHeadersMobile bodies — the variant fields below stay as-is.

View Source
var MobileApplier = profiles.NewApplier(insertMobileHeaders, insertMobileHeaders, headerCache, true)

MobileApplier applies the mobile Chrome request-header pipeline. Wired into chrome.Mobile.

View Source
var Platform = g.Map[profiles.OSKey, g.String]{
	profiles.Windows: `"Windows"`,
	profiles.MacOS:   `"macOS"`,
	profiles.Linux:   `"Linux"`,
	profiles.Android: `"Android"`,
	profiles.IOS:     `"iOS"`,
}

Platform maps every supported impersonated OS to its sec-ch-ua-platform header value.

View Source
var UserAgent = g.Map[profiles.OSKey, g.String]{
	profiles.Windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36",
	profiles.MacOS:   "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36",
	profiles.Linux:   "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36",
	profiles.Android: "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Mobile Safari/537.36",
	profiles.IOS:     "Mozilla/5.0 (iPad; CPU OS 26_3_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/150.0.7871.113 Mobile/15E148 Safari/604.1",
}

UserAgent maps every supported impersonated OS to its Chrome 150 User-Agent string. It is shared between Desktop and Mobile variants — UA strings are an OS property, not a form-factor property (Chrome on Android always identifies as mobile, Chrome on Windows always as desktop, regardless of which fingerprint variant is dispatched).

Functions

Types

This section is empty.

Jump to

Keyboard shortcuts

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