package
2.4.88+incompatible
Repository: https://github.com/getlantern/flashlight.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

APIHandler returns an HTTP handler that specifically looks for and properly handles pro server requests.
FetchUserData fetches user data from Pro API, and updates local cache.
GetHTTPClient creates a new http.Client that uses domain fronting and direct proxies.
GetUserDataFast gets the user data for the given userID if found.
IsProUser indicates whether or not the user is pro, calling the Pro API if necessary to determine the status.
IsProUserFast indicates whether or not the user is pro and whether or not the user's status is know, never calling the Pro API to determine the status.
MigrateDeviceID migrates the user's device ID from the old to the new scheme (only relevant to desktop builds).
NewUser creates a new user via Pro API, and updates local cache.
OnProStatusChange allows registering an event handler to learn when the user's pro status or "yinbi enabled" status has changed.
OnUserData allows registering an event handler to learn when the user data has been fetched.
PrepareProRequest normalizes requests to the pro server without overwriting device ID, user ID, etc.
PrepareProRequestWithOptions normalizes requests to the pro server with device ID, user ID, etc set.