Skip to content

A blazing-fast HTTP client with TLS fingerprinting for Node.js

License

Notifications You must be signed in to change notification settings

cijiugechu/persona-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

persona-http

CI

A blazing-fast HTTP client with TLS fingerprinting for Node.js. Native Rust bindings via napi-rs.

Based on rnet - the original Python implementation.

Installation

npm install persona-http

Usage

Simple GET request

import { get } from 'persona-http'

const response = await get('https://example.com')
const body = await response.text()

Client with browser emulation

import { Client } from 'persona-http'

const client = new Client({
  emulation: 'chrome_133',
})

const response = await client.get('https://google.com')
const body = await response.text()

Override emulation per request

const client = new Client({ emulation: 'chrome_105' })

// Override with different preset
const response = await client.get(url, { emulation: 'chrome_101' })

// Skip client hint headers
const response2 = await client.get(url, {
  emulation: { preset: 'chrome_105', skipHeaders: true },
})

Platform Support

Platform Architectures Node.js
macOS x64, arm64 20, 22
Windows x64, x86, arm64 20, 22
Linux (glibc) x64, arm64 20, 22
Linux (musl) x64, arm64 20, 22
FreeBSD x64 20, 22
Android arm64, armv7 -

Development

Requirements:

  • Rust (latest stable)
  • Node.js 20+
  • pnpm

Build and test:

pnpm install
pnpm build
pnpm test

License

MIT