Giter Site home page Giter Site logo

tbhaxor / node-proxifyjs Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 54 KB

Handy node.js package to find fresh and working proxies from https://free-proxy-list.net/

License: Apache License 2.0

TypeScript 100.00%
typescript nodejs proxy proxify npm module

node-proxifyjs's Introduction

NODE-PROXIFYJS GitHub code size in bytes GitHub package.json version GitHub GitHub last commit npm

node-proxifyjs is a promise based handy module for nodejs developers to find fresh and working free proxies from https://free-proxy-list.net/ by calling only one function

Requirements

  1. node.js
  2. npm

Install and Use

  1. Install from npm

    $ npm i node-proxifyjs
  2. Use

    import proxify from "node-proxifyjs";
    
    (async () => {
      let data = await proxify(); // this will return all 300 proxies
      console.log(data);
    })();

    Importing with require is quite different

    const proxify = require("node-proxifyjs").default;

API

Filtering Parameters

  • Fetching n proxies

    pass an object property count to the function, only number

    import proxify from "node-proxifyjs";
    
    (async () => {
      let data = await proxify({ count: 20 }); // this will return first 20 proxies
      console.log(data);
    })();
  • Fetching google proxies

    pass an object property google to the function, only boolean

    import proxify from "node-proxifyjs";
    
    (async () => {
      let data = await proxify({ google: true }); // pass google: false if you dont want google proxies
      console.log(data);
    })();
  • Fetching https proxies

    pass an object property https to the function, only boolean

    import proxify from "node-proxifyjs";
    
    (async () => {
      let data = await proxify({ https: true }); // pass https: false if you dont want https proxies
      console.log(data);
    })();
  • Fetching country specific proxies

    pass an object property country to the function, only {code?: string, name?: Regrex String}

    Note: Either code or name will work, both of them at same time will not work

    import proxify from "node-proxifyjs";
    
    (async () => {
      let data = await proxify({ country: { code: "US" } }); // pass the name property instead of code if you want to perform regexp search
      console.log(data);
    })();
  • Fetching proxies by type

    pass an object property type to the function, only string

    import proxify from "node-proxifyjs";
    
    (async () => {
      let data = await proxify({ type: "elite proxy" }); // type can be either 'transparent', 'anonymous' or 'elite proxy' only
      console.log(data);
    })();

Note: None, one, some or all filtering predicates can be used at once

proxify({ count: 30, country: { code: "IN" }, type: "elite proxy" });

Returns

interface ICountry {
  code: string; // country code
  name: string; // country name
}

interface IResult {
  host: string; // the ip
  port: number; // port numbeer
  country: ICountry; // country from above interface
  type: string; // type of proxy (elite, anonymous, transparent)
  google: boolean; // is google
  https: boolean; // is https ssl signed
  lastChecked: string; // last checked for working
}

Contribution

Rules

  • Pull requests must be made from another branch, not the master branch
  • Add valid commit message
  • Describe the change in pull request

Scope

  • Documentation
  • Bugs / Suggestions / Feature Requests

License

node-proxifyjs is licensed under Apache-2.0 license

node-proxifyjs's People

Contributors

dependabot[bot] avatar tbhaxor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

node-proxifyjs's Issues

I am getting this error: "TypeError: proxify is not a function"

When I just install the dependency and try to run the demo code

const proxify = require("node-proxifyjs");
 
(async () => {
  let data = await proxify(); // this will return
  console.log(data);
})();

I am getting this error:

"TypeError: proxify is not a function"

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.