npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

inject-fingerprint

v1.1.3

Published

Create Internal proxy to inject fingerprint

Downloads

7

Readme

Node.js CI - TESTS GitHub package.json version node-current Downloads

inject-fingerprint

Inject fingerprint with proxy.

Fingerprint (device fingerprint) is a set of techniques that allow a website to uniquely identify your computer.

Calculating a device's fingerprint begins when a user visits a website. The device fingerprint tracker collects all relevant information (version / browser type, OS, etc.). The interaction triggers the collection of a range of data (like the one listed above) that forms a special "hash" assigned to that specific device.

This page tells you how identifiable your browser is as a robot: https://bot.sannysoft.com/ and this module makes the tests on this page succeed on your chrome headless. See test

Install

npm install

Usage

const InjectFingerprint = require('inject-fingerprint');
const ProxyServer = new InjectFingerprint();
// To start proxy
ProxyServer.start();
// To close proxy
ProxyServer.close();

API

InjectFingerprint(options?)

Create Internal proxy to inject fingerprint

options

Type: object

internalProxyPort

Type: number
Default: 9333

Internal Proxy Port

internalProxyWebPort

Type: number
Default: 9334

Internal Proxy Web Interface Port

additionalProxyPort

Type: number
Default: 9335

Additional Proxy Port when exist external proxy

additionalProxyWebPort

Type: number
Default: 9336

Additional Proxy Web Interface Port when exist external proxy

externalProxy

Type: string

External proxy. Ex: http://host:port

fingerPrintPath

Type: string
Default: /tmp

Path to save fingerprint file.

Note: The name of file is default, you can change the script if you want. If file exist, it is loaded, else created.

silent

Type: boolean
Default: true

If anyproxy module log is verbose

logLevel

Type: string
Default: null

Level log of module inject-fingerprint. To logging action Ex: [silly, debug, warn, error, info, etc]

Note: Winston levels. To log something enter a level.

start()

Start proxy server

close()

Terminate the proxy server

clearCache(amount, keyTime)

Remove proxy server caches

/**
 *
 * @param {Number} [amount=1] Amount of time to delete
 * @param {String} [keyTime='days'] Key of what time to delete (https://momentjs.com/docs/#/manipulating/add/)
 * @example clearCache(30, 'minutes')
 */

DriverBuilder(options?)

Create and return new web driver

browser

Type: string
Default: chrome

Browser name. Ex: chrome

Note: today only works with chrome

headless

Type: boolean
Default: true

If the init browser in headless mode. Ex: true|false

browserLanguage

Type: string
Default: en-US

Browser Language. https://developer.mozilla.org/pt-BR/docs/Web/API/NavigatorLanguage

browserUserAgent

Type: string
Default: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36]

Browser User Agent. https://developer.mozilla.org/pt-BR/docs/Web/HTTP/Headers/User-Agent

Test

npm test call the test/fingerprint.test.js file and this test open chrome browser mode headless and verify if is robot by test on the site https://bot.sannysoft.com/

Proxy documentation

https://anyproxy.io/