browser

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfileChromeWinUS   = "chrome-win-us"
	ProfileChromeWinRU   = "chrome-win-ru"
	ProfileChromeMacUS   = "chrome-macos-us"
	ProfileChromeLinuxUS = "chrome-linux-us"
	ProfileChromeLinuxRU = "chrome-linux-ru"
)

Variables

View Source
var PatchJS []byte

Functions

func DefaultRegionForEngine

func DefaultRegionForEngine(engine string) string

func LaneKey

func LaneKey(engine string, region string) string

func LoadProfilesFromJSON

func LoadProfilesFromJSON(path string) error

func NormalizeEngine

func NormalizeEngine(engine string) string

func NormalizeRegion

func NormalizeRegion(region string) string

Types

type BrandVersion

type BrandVersion struct {
	Brand   string `json:"brand"`
	Version string `json:"version"`
}

type Profile

type Profile struct {
	ID              string         `json:"id"`
	UserAgent       string         `json:"user_agent"`
	UACHBrands      []BrandVersion `json:"uach_brands"`
	UACHFullVerList []BrandVersion `json:"uach_full_version_list"`
	Platform        string         `json:"platform"`
	PlatformVersion string         `json:"platform_version"`
	Architecture    string         `json:"architecture"`
	Bitness         string         `json:"bitness"`
	Mobile          bool           `json:"mobile"`
	AcceptLanguage  string         `json:"accept_language"`
	NavigatorLangs  []string       `json:"navigator_langs"`
	Locale          string         `json:"locale"`
	Timezone        string         `json:"timezone"`
	Viewport        Viewport       `json:"viewport"`
}

func Catalog

func Catalog() []Profile

func SelectProfile

func SelectProfile(engine string, region string) Profile

type Viewport

type Viewport struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

Jump to

Keyboard shortcuts

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