profile

package
v0.0.0-...-695b9c6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

./internal/profile/resolver.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClientProfile

func BuildClientProfile(cap *types.CapturedProfile, browserType types.BrowserType, fallbackVer types.BrowserVersion) (profiles.ClientProfile, types.BrowserVersion, error)

BuildClientProfile преобразует сырой CapturedProfile в рабочий profiles.ClientProfile для tls-client. Если в CapturedProfile версия не определена, используется fallbackVer из VersionResolver.

func GetLatestChromeProfile

func GetLatestChromeProfile() (profiles.ClientProfile, int)

GetLatestChromeProfile находит максимально свежий вкомпилированный профиль Chrome в реестре bogdanfinn/tls-client и возвращает его вместе с номером мажорной версии.

func LoadCapturedProfile

func LoadCapturedProfile(path string, maxAge time.Duration) (*types.CapturedProfile, bool)

LoadCapturedProfile читает слепок из файла кэша.

func ResolveProfile

ResolveProfile выполняет 5-уровневый каскадный поиск эталонного профиля.

func SaveCapturedProfile

func SaveCapturedProfile(path string, cap *types.CapturedProfile) error

SaveCapturedProfile сохраняет слепок в файл кэша.

Types

type ResolveConfig

type ResolveConfig struct {
	CachePath            string
	CacheTTL             time.Duration
	BrowserType          types.BrowserType
	FallbackVersion      types.BrowserVersion
	GitHubRepo           string // Репозиторий проекта, например "imbecility/httpclient"
	RemoteManifestURLs   []string
	DisableLocalProbe    bool
	DisableExternalProbe bool
}

ResolveConfig содержит настройки для каскадного получения отпечатка.

Jump to

Keyboard shortcuts

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