@proxmint/node-red 0.1.0
Node-RED node that fetches web pages through Proxmint residential, datacenter and mobile proxies, with country, city and ASN targeting and sticky sessions.
@proxmint/node-red
Node-RED node for Proxmint proxies: fetch web pages from residential, datacenter or 4G/5G mobile IPs in the country, state, city, ZIP or ASN you choose, and keep one IP for up to two hours when a site needs it.
The proxmint fetch node takes a URL, set on the node or passed in msg.url, and sends out the page as readable
text or raw HTML, with the status code, headers, final URL and title. Requests go straight from Node-RED to the
Proxmint gateway (gw.proxmint.com), and the bandwidth comes out of your own Proxmint account.
Install
In Node-RED, open Menu > Manage palette > Install and search for @proxmint/node-red. Or run this in your
Node-RED user directory (usually ~/.node-red) and restart Node-RED:
npm install @proxmint/node-red
Needs Node-RED 4 or later and Node.js 20 or later.
Setup
- Create a Proxmint account and buy bandwidth for at least one product on the pricing page. Bandwidth is sold per GB with no subscription, and can be paid in crypto.
- Create an API key under Settings in the dashboard.
- Add a proxmint fetch node, open it and add a Proxmint account: pick the product and paste the key. The key reads the product's proxy login. You can enter the proxy username and password from your product page instead.
For a ready flow, import Menu > Import > Examples > @proxmint/node-red > Fetch a page from another country.
The proxmint fetch node
Input:
| Property | What it does |
|---|---|
msg.url |
The page to fetch, when the node has no URL set |
msg.country |
Exit country for this message, as a two-letter code. A country other than the node's drops its state, city, ZIP and ASN |
Output:
| Property | What it is |
|---|---|
msg.payload |
The page as readable text, or the raw HTML. A file that isn't text comes back as a buffer |
msg.statusCode |
The site's HTTP status |
msg.headers |
The site's response headers |
msg.responseUrl |
The final URL, after up to 5 redirects |
msg.title |
The page title, for HTML pages |
msg.truncated |
true when the page was cut at Max characters |
Settings:
| Setting | Default | What it does |
|---|---|---|
| Country | any | Exit country as a two-letter code |
| State, City, ZIP, ASN | none | Finer targeting inside the country. Needs a country |
| Sticky IP | 0 | Keep one exit IP for 1 to 120 minutes. 0 gives every message a new IP |
| Output | Readable text | Readable text or raw HTML |
| Max characters | 50000 | Longer pages are cut |
| Timeout | 60 | Seconds per request |
When the gateway refuses a request (no bandwidth left, no IP matching the targeting, a blocked site), the node reports an error with the reason and what to change, and a catch node can pick it up. The error codes page lists them all. The site's own answers, a 404 included, come out as normal messages.
Good to know
- Web traffic works on destination ports 80, 443, 8080, 8443, 8888 and 8090 (port access).
- A short list of sites, mostly banking and government, is refused by the network (blocked websites).
- City, state, ZIP and ASN targeting meter at 2x on residential, datacenter and mobile (targeting).
- The node does not run JavaScript. It returns what the server sends.
- The API key lookup is cached for 10 minutes and uses no bandwidth.
Full guide: proxmint.com/docs/node-red.
Development
npm install
npm test
The tests run the nodes in a Node-RED runtime against a stand-in for the gateway, offline.
License
MIT