@fingerprint/agent

中文文档
4.1.6发布于 2026/10/07SEE LICENSE IN LICENSETypeScriptESM + CJS零依赖近 30 天下载 95.9万

指纹 JavaScript 代理

中文使用文档
文档目录4 节
  1. 快开始
  2. 从国家预防机制安装
  3. 或者从 CDN 安装
  4. 另见


Fingerprint logo

制作浏览器指纹的网站访问者标识符 . 与饼干和本地存储不同,指纹在隐形/私人模式中保持不变,甚至在浏览器数据被清洗时也是如此. 提供与开源指纹JS相比的额外信息和更高的准确性.

快开始

获取亲密钥 :

  1. 在 仪表板.指印.com/签名 (有免费的审判)
  2. 注册后去 仪表板 并选择创建的订阅
  3. 访问页面左侧导航侧栏中的“ API 键” 页面
  4. 用“ 公用” 类型复制密钥

从国家预防机制安装

npm i @fingerprint/agent
# or
yarn add @fingerprint/agent
# or
pnpm add @fingerprint/agent
# or
bun add @fingerprint/agent
import Fingerprint from '@fingerprint/agent'

// Initialize an agent at application startup.
const fpPromise = Fingerprint.start({ apiKey: 'your-pro-key' })

;(async () => {
  // Get the visitor identifier when you need it.
  const fp = await fpPromise
  const result = await fp.get()

  // This is the visitor identifier:
  const visitorId = result.visitorId
  console.log(visitorId)
})()

运行此代码

或者从 CDN 安装

<script>
  // Initialize the agent at application startup.
  const fpPromise = import('https://fpjscdn.net/v4/your-pro-key')
    .then(FingerprintJS => FingerprintJS.start())

  // Get the visitor identifier when you need it.
  fpPromise
    .then(fp => fp.get())
    .then(result => {
      // This is the visitor identifier:
      const visitorId = result.visitorId
      console.log(visitorId)
    })
</script>

注意您需要替换 your-pro-key 带有 API 公共密钥 仪表板。 。 。 .

运行此代码

另见

🍿 现场演示

⏱ 30秒内如何从开源升级到Pro

⬆️ 如何从指纹版本 3 迁移

📕 指纹文件

▶️ 视频:使用指纹防止多次签名

版本与发布记录

@fingerprint/agent 共发布 14 个版本,首次发布于 2025/11/06;过去 12 个月发布了 13 个版本。

版本发布日期距今
4.1.6latest2026/10/071 个月前
4.1.52026/09/012 个月前
4.1.42026/08/113 个月前
4.1.32026/07/213 个月前
4.1.22026/07/084 个月前
4.1.12026/06/194 个月前

其他发布通道:beta → 4.0.0-beta.5。

关于 @fingerprint/agent 的常见问题

@fingerprint/agent 是什么?

指纹 JavaScript 代理

如何安装 @fingerprint/agent?

在项目目录运行 npm install @fingerprint/agent,或使用 pnpm add / yarn add / bun add。

@fingerprint/agent 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fingerprint/agent 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@fingerprint/agent 可以商用吗?

@fingerprint/agent 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@fingerprint/agent 的下载量有多少?

根据 npm 官方下载统计,@fingerprint/agent 在 2026/10/15 – 2026/11/13 这 30 天内被下载 958,912 次,日均约 31,964 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fingerprint/agent 还在维护吗?

最新版本 4.1.6 发布于 2026/10/07(1 个月前);至今共发布 14 个版本,其中过去 12 个月发布了 13 个;首次发布于 2025/11/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。