node-proxifyjs
v2.1.0
Published
Handy node.js package to find fresh and working proxies from https://free-proxy-list.net/
Downloads
31
Maintainers
Readme
NODE-PROXIFYJS
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
- node.js
- npm
Install and Use
Install from npm
$ npm i node-proxifyjs
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
proxiespass an object property
count
to the function, only numberimport proxify from "node-proxifyjs"; (async () => { let data = await proxify({ count: 20 }); // this will return first 20 proxies console.log(data); })();
Fetching
google
proxiespass an object property
google
to the function, only booleanimport 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
proxiespass an object property
https
to the function, only booleanimport 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 proxiespass an object property
country
to the function, only{code?: string, name?: Regrex String}
Note: Either
code
orname
will work, both of them at same time will not workimport 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 stringimport 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