Documentation
¶
Overview ¶
Package profiles holds the built-in browser profiles, one embedded JSON file per browser version and platform, taken from captures of the real browser. Each is checked once, on first use, and every accessor returns that one read-only profile.Profile: calling one costs nothing, and a client built from it copies nothing. Edit a copy with Profile.With. An accessor named for a browser and platform, such as ChromeMacOS or SafariIOS, tracks that browser's newest version on that platform (decision 0047); versioned accessors (Chrome156MacOS) stay fixed. Names carry the browser's version, not the operating system's: where the OS builds the connection (Safari, Chrome and Firefox on iOS), a profile matches the OS version it was captured on, which profiles/EVIDENCE.md records. Linux profiles (ChromeLinux, FirefoxLinux) are Google's and Mozilla's own builds, the same on every distribution, not a distribution's build (decision 0058). The accessors are generated by cmd/profilegen (go generate ./profiles).
Index ¶
- func Brave157Linux() profile.Profile
- func Brave157MacOS() profile.Profile
- func Brave157Windows() profile.Profile
- func BraveLinux() profile.Profile
- func BraveMacOS() profile.Profile
- func BraveWindows() profile.Profile
- func ByName(name string) (profile.Profile, error)
- func Chrome155MacOS() profile.Profile
- func Chrome156MacOS() profile.Profile
- func Chrome156Windows() profile.Profile
- func Chrome157IOS() profile.Profile
- func Chrome157Linux() profile.Profile
- func Chrome157MacOS() profile.Profile
- func ChromeIOS() profile.Profile
- func ChromeLinux() profile.Profile
- func ChromeMacOS() profile.Profile
- func ChromeWindows() profile.Profile
- func Edge157MacOS() profile.Profile
- func Edge157Windows() profile.Profile
- func EdgeMacOS() profile.Profile
- func EdgeWindows() profile.Profile
- func Firefox158MacOS() profile.Profile
- func Firefox158Windows() profile.Profile
- func Firefox159IOS() profile.Profile
- func Firefox159Linux() profile.Profile
- func Firefox159MacOS() profile.Profile
- func Firefox159Windows() profile.Profile
- func FirefoxIOS() profile.Profile
- func FirefoxLinux() profile.Profile
- func FirefoxMacOS() profile.Profile
- func FirefoxWindows() profile.Profile
- func Machines(platform string) []profile.Machine
- func Names() []string
- func RandomMachine(platform string) (m profile.Machine, ok bool)
- func Safari26IOS() profile.Profile
- func Safari26MacOS() profile.Profile
- func Safari27IOS() profile.Profile
- func Safari27MacOS() profile.Profile
- func SafariIOS() profile.Profile
- func SafariMacOS() profile.Profile
- func Supported() []string
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Brave157Linux ¶ added in v0.5.0
Brave157Linux returns the brave-157-linux profile (brave 157 on linux).
func Brave157MacOS ¶ added in v0.5.0
Brave157MacOS returns the brave-157-macos profile (brave 157 on macos).
func Brave157Windows ¶ added in v0.5.0
Brave157Windows returns the brave-157-windows profile (brave 157 on windows).
func BraveLinux ¶ added in v0.5.0
BraveLinux returns the newest brave profile on linux, now brave-157-linux (brave 157 on linux). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func BraveMacOS ¶ added in v0.5.0
BraveMacOS returns the newest brave profile on macos, now brave-157-macos (brave 157 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func BraveWindows ¶ added in v0.5.0
BraveWindows returns the newest brave profile on windows, now brave-157-windows (brave 157 on windows). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func ByName ¶
ByName returns the built-in profile called name, for example "chrome-155-macos".
Example ¶
Pick the profile a task names in its configuration.
package main
import (
"fmt"
"log"
"github.com/roachadam/mimicry"
"github.com/roachadam/mimicry/profiles"
)
func main() {
p, err := profiles.ByName("safari-27-macos")
if err != nil {
log.Fatal(err)
}
fmt.Println(p.Name())
if _, err := mimicry.NewClient(mimicry.Config{
Profile: p,
}); err != nil {
log.Fatal(err)
}
_, err = profiles.ByName("chrome-133")
fmt.Println(err)
}
Output: safari-27-macos profiles: "chrome-133" is not a built-in profile
func Chrome155MacOS ¶
Chrome155MacOS returns the chrome-155-macos profile (chrome 155 on macos).
func Chrome156MacOS ¶
Chrome156MacOS returns the chrome-156-macos profile (chrome 156 on macos).
func Chrome156Windows ¶
Chrome156Windows returns the chrome-156-windows profile (chrome 156 on windows).
func Chrome157IOS ¶ added in v0.3.0
Chrome157IOS returns the chrome-157-ios profile (chrome 157 on ios).
func Chrome157Linux ¶ added in v0.4.0
Chrome157Linux returns the chrome-157-linux profile (chrome 157 on linux).
func Chrome157MacOS ¶ added in v0.5.0
Chrome157MacOS returns the chrome-157-macos profile (chrome 157 on macos).
func ChromeIOS ¶ added in v0.3.0
ChromeIOS returns the newest chrome profile on ios, now chrome-157-ios (chrome 157 on ios). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func ChromeLinux ¶ added in v0.4.0
ChromeLinux returns the newest chrome profile on linux, now chrome-157-linux (chrome 157 on linux). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func ChromeMacOS ¶ added in v0.2.0
ChromeMacOS returns the newest chrome profile on macos, now chrome-157-macos (chrome 157 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func ChromeWindows ¶
ChromeWindows returns the newest chrome profile on windows, now chrome-156-windows (chrome 156 on windows). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func Edge157MacOS ¶ added in v0.4.0
Edge157MacOS returns the edge-157-macos profile (edge 157 on macos).
func Edge157Windows ¶ added in v0.4.0
Edge157Windows returns the edge-157-windows profile (edge 157 on windows).
func EdgeMacOS ¶ added in v0.4.0
EdgeMacOS returns the newest edge profile on macos, now edge-157-macos (edge 157 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func EdgeWindows ¶ added in v0.4.0
EdgeWindows returns the newest edge profile on windows, now edge-157-windows (edge 157 on windows). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func Firefox158MacOS ¶
Firefox158MacOS returns the firefox-158-macos profile (firefox 158 on macos).
func Firefox158Windows ¶ added in v0.2.0
Firefox158Windows returns the firefox-158-windows profile (firefox 158 on windows).
func Firefox159IOS ¶ added in v0.3.0
Firefox159IOS returns the firefox-159-ios profile (firefox 159 on ios).
func Firefox159Linux ¶ added in v0.4.0
Firefox159Linux returns the firefox-159-linux profile (firefox 159 on linux).
func Firefox159MacOS ¶ added in v0.4.0
Firefox159MacOS returns the firefox-159-macos profile (firefox 159 on macos).
func Firefox159Windows ¶ added in v0.4.0
Firefox159Windows returns the firefox-159-windows profile (firefox 159 on windows).
func FirefoxIOS ¶ added in v0.3.0
FirefoxIOS returns the newest firefox profile on ios, now firefox-159-ios (firefox 159 on ios). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func FirefoxLinux ¶ added in v0.4.0
FirefoxLinux returns the newest firefox profile on linux, now firefox-159-linux (firefox 159 on linux). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func FirefoxMacOS ¶ added in v0.2.0
FirefoxMacOS returns the newest firefox profile on macos, now firefox-159-macos (firefox 159 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func FirefoxWindows ¶ added in v0.2.0
FirefoxWindows returns the newest firefox profile on windows, now firefox-159-windows (firefox 159 on windows). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func Machines ¶ added in v0.4.0
Machines returns the machines the built-in profiles were captured on for platform ("macos", "windows"), for Config.ClientHints: the values a browser on each sends once a site opts in to client hints. Each is one real machine's, so its values agree with each other; mixing values from several is a tell. Empty for a platform whose profiles send no opted-in hints. The slice is a copy.
func RandomMachine ¶ added in v0.4.0
RandomMachine returns one of Machines(platform), picked at random, for a client that should not share its profile's captured machine; ok is false when there is none. Pick once per client, as a browser keeps its machine: a machine that changes between requests is a tell.
func Safari26IOS ¶ added in v0.2.0
Safari26IOS returns the safari-26-ios profile (safari 26 on ios).
func Safari26MacOS ¶
Safari26MacOS returns the safari-26-macos profile (safari 26 on macos).
func Safari27IOS ¶ added in v0.2.0
Safari27IOS returns the safari-27-ios profile (safari 27 on ios).
func Safari27MacOS ¶
Safari27MacOS returns the safari-27-macos profile (safari 27 on macos).
func SafariIOS ¶ added in v0.2.0
SafariIOS returns the newest safari profile on ios, now safari-27-ios (safari 27 on ios). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
func SafariMacOS ¶ added in v0.2.0
SafariMacOS returns the newest safari profile on macos, now safari-27-macos (safari 27 on macos). It moves to each new version as that version is added; use a versioned accessor where a version must stay fixed.
Types ¶
This section is empty.