Documentation ¶
Index ¶
Constants ¶
View Source
const ( ULTRA fingerprintScore = 20 HIGH fingerprintScore = 15 MEDIUM fingerprintScore = 10 LOW fingerprintScore = 5 )
Variables ¶
This section is empty.
Functions ¶
func IsPassingScore ¶
Types ¶
type Fingerprint ¶
type Fingerprint struct { // Screen size + color depth // Doesn't change frequently. // High score Screen string `json:"screen"` // Current user Time Zone // Could periodically change. // Low score. Timezone string `json:"timezone"` // CPU devices. Does not change // frequently. // High score. HardwareConcurrency int `json:"hardwareConcurrency"` // Device memory. Does not change // frequently. // High Score DeviceMemory int `json:"deviceMemory"` // Canvas Fingerprint // Does not change frequently. // High Score Canvas string `json:"canvas"` // User-set language. // Low Score Language string `json:"lang"` // WebGL Fingerprint // High Score WebGL string `json:"webgl"` // Touch info // Low score Touch string `json:"touch"` // Does the device use a battery? // Doesn't change frequently. // Medium score Battery bool `json:"battery"` // Device platform // Medium score Platform string `json:"platform"` // User Agent // Changes frequently with updates. // Low Score UserAgent string `json:"userAgent"` // Window Size // Changes very frequently. // Low score WindowSize string `json:"windowSize"` // Do Not Track status // Can change frequently. // Low score DoNotTrack bool `json:"dnt"` // Connected Devices. // Does not change much. // Medium Score Devices string `json:"devices"` // Audio Fingerprint // Low Score Audio string `json:"audio"` // Non-User Defined; defined at Login // by the Server IPAddress string `json:"-"` // Quick Hash of Everything Together // If this matches 100%, its faster // sometimes than doing each one individually. QuickHash string `json:"-"` }
func (Fingerprint) ScoreAgainst ¶
func (f Fingerprint) ScoreAgainst(against Fingerprint) int
This returns a "trust value" of 0-1 (low-high)
func (Fingerprint) ValidateRequest ¶
func (f Fingerprint) ValidateRequest() bool
type SafetyScore ¶
type SafetyScore int
const ( HIGH_SAFETY SafetyScore = 90 REGULAR_SAFETY SafetyScore = 80 LOW_SAFETY SafetyScore = 65 )
var UseSafetyScore SafetyScore = REGULAR_SAFETY
Click to show internal directories.
Click to hide internal directories.