Coder Social home page Coder Social logo

ossianaa / node-libcurl Goto Github PK

View Code? Open in Web Editor NEW
31.0 3.0 6.0 45.44 MB

node-libcurl is a request library that mimics chrome ja3 fingerprints

Home Page: https://www.npmjs.com/package/@ossiana/node-libcurl

License: MIT License

Python 1.76% JavaScript 4.72% TypeScript 13.61% C++ 14.60% C 65.32%
curl ja3 chrome-ja3 node-libcurl

node-libcurl's Introduction

node-libcurl

Different with Nodejs fetch api

  • The fingerprint can be customized to look like chrome or firefox ,it modified the BoringSSL extension, set the custom cipher suite with Libcurl

Attention by custom ja3 fingerprint!!!

  • ssl support for node-libcurl is provided by boringssl
  • boringssl does not provided the following support
    1. extension support group only support [P-256, P-384, P-521, X25519], but the library was modified to provide dummy support groups, like [ffdhe2048, ffdhe3072] (ja3 is 256,257). if you use them, it may cause an SSL connection error. This depends on whether the server selects these two support groups
    1. ec_point_format (ja3 is ...,0-1-2) only support 0 (uncompressed)
    1. extensions only support (ja3)[0, 65037, 23, 65281, 10, 11, 35, 16, 5, 13, 13172, 18, 30032, 14, 51, 45, 42, 43, 44, 57, 65445, 27, 34, 17513, 28, 41]

support

Build Status

Platform Support
Windows (x64) Yes
Windows (x86) No
Windows (arm) No
Ubuntu (x86_64) Yes
MacOS (x86_64) Yes
MacOS (arm64) Yes

How to Install

npm i -g @ossiana/node-libcurl


Use Sample

import as ES Module

import { LibCurl, fetch, requests } from '@ossiana/node-libcurl'

import as CommonJS Module

const { LibCurl, fetch, requests } = require('@ossiana/node-libcurl')

browser fetch style

fetch("https://xxx.io/api/graphql/").then(e => e.json())

requests style

const session = requests.session();

session.setCookie('ua', '123=/1a', '.baidu.com', '/');

const res = await session.get('https://www.baidu.com', {
    headers: {
        "user-Agent": "1"
    }
});
console.log(res.headersMap);
console.log(session.getCookiesMap().get('ua'));
console.log(res.text);

node-libcurl's People

Contributors

ossianaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-libcurl's Issues

Bindings for ARM MacOS

Hello! Thanks for the library! Seems like there are no bindings for ARM processors for Mac.

Build sources

Hello. Thanks for the great library.

Can you show how you build curl (.lib/.dll) ?

how to randomize ciphers?

Hello,

I love this library however, it seems it does not randomize tls extension order is there a way to do this?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.