fingerprint

module
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: BSD-3-Clause

README

fingerprint

Go Reference License Version Go Version

高性能浏览器 TLS 指纹库,提供 200+ 浏览器指纹配置和全面的指纹识别能力。

核心特性

  • 200+ 真实浏览器指纹 - Chrome、Firefox、Safari、Edge、Opera、Brave 等
  • TLS 指纹分析 - JA3/JA4 指纹生成与识别
  • HTTP/2 签名 - 完整的帧分析和签名匹配
  • 机器学习分类 - 内置 ML 检测异常流量
  • 安全防护 - 风险评分和异常检测
  • Go Workspace - 模块化架构,按需导入

快速开始

go get github.com/vistone/fingerprint/modules/fingerprint
package main

import (
    "fmt"
    "github.com/vistone/fingerprint/modules/fingerprint"
)

func main() {
    // 获取随机 Chrome 指纹
    profile := fingerprint.GetRandomByBrowser(fingerprint.BrowserChrome)
    fmt.Printf("Selected: %s\n", profile.Name)
}

模块结构

modules/
├── core          # 核心类型与常量 (零依赖)
├── errors        # 规范错误包 (ErrorCode, CoreError)
├── profiles      # 200+ 浏览器指纹
├── tls           # TLS 指纹分析 (JA3/JA4)
├── http          # HTTP/2 签名分析
├── ml            # 机器学习分类器
├── defense       # 安全防护与风险评估
├── gateway       # API 网关
├── generator     # 指纹生成器
├── network       # TCP/IP 指纹 (JA4T)
├── agent         # 自治安全代理
├── config        # 配置管理桥接层
├── plugin        # 插件系统公共 API
├── kit           # 工具集 (UA 解析等)
├── frontend      # 前端静态资源
├── fingerprint   # Facade 统一入口
└── internal      # 内部实现 (扩展/安全/TCP等)

使用方式

方式一: Facade 模块 (推荐)
import "github.com/vistone/fingerprint/modules/fingerprint"

profile := fingerprint.GetRandom()
chrome := fingerprint.GetByBrowser(fingerprint.BrowserChrome)
方式二: 直接导入子模块
import (
    "github.com/vistone/fingerprint/modules/core"
    "github.com/vistone/fingerprint/modules/profiles"
)

profile, _ := profiles.Get("chrome_133")
chromeProfiles := profiles.GetByBrowser(core.BrowserChrome)

指纹覆盖

浏览器 版本范围 数量
Chrome 115-144 64
Firefox 115-140 43
Safari 16-18 48
Edge 115-134 23
Opera 100-110 12
Brave 1.60-1.72 7
移动端 iOS/Android 10
合计 207

文档

示例

examples/ 目录:

  • basic/ - 基础使用示例
  • advanced/ - 高级功能示例
  • random/ - 随机指纹生成

性能

  • 指纹选择: O(1) 哈希表查找
  • 零分配关键路径
  • 并发安全设计

许可证

BSD 3-Clause License

Directories

Path Synopsis
cmd
collector command
Command collector — fetches browser fingerprint data from multiple public sources and generates Go profile definitions.
Command collector — fetches browser fingerprint data from multiple public sources and generates Go profile definitions.
compliance command
export_features command
Command export_features — exports browser profile features as JSON for PyTorch training.
Command export_features — exports browser profile features as JSON for PyTorch training.
gateway command
Fingerprint Gateway Server.
Fingerprint Gateway Server.
profilegen/extract command
extract.go - extract fingerprint configuration from existing Go files and generate YAML
extract.go - extract fingerprint configuration from existing Go files and generate YAML
profilegen/migrate command
generate_specs.go - generate YAML spec templates based on existing profiles
generate_specs.go - generate YAML spec templates based on existing profiles
train command
Command train — trains the ML model library from browser profile data.
Command train — trains the ML model library from browser profile data.
validate command
Command validate — loads PyTorch-trained weights and validates Go inference.
Command validate — loads PyTorch-trained weights and validates Go inference.
verify_weights command
Verify that PyTorch-exported weights load correctly in Go pipeline.
Verify that PyTorch-exported weights load correctly in Go pipeline.
modules
agent module
client module
core module
crawler module
defense module
errors module
fingerprint module
frontend module
gateway module
generator module
http module
internal module
kit module
ml module
network module
plugin module
profiles module
tls module
waf module

Jump to

Keyboard shortcuts

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