Minimal example: send an HTTPS request through the WeProxy HTTP proxy gateway and print your exit IP.
- Node.js 18+
- WeProxy credentials from my.we1.town
npm installCopy env defaults:
cp .env.example .envEdit .env with your panel username and password. Gateway defaults:
Host: gw.weproxy.com.tr
Port: 8989
Export env vars, then:
npm run check-ipExample (PowerShell):
$env:WEPROXY_USER="your-user"
$env:WEPROXY_PASS="your-pass"
npm run check-ipimport https from 'node:https'
import { HttpsProxyAgent } from 'https-proxy-agent'
const agent = new HttpsProxyAgent('http://USER:PASSWORD@gw.weproxy.com.tr:8989')
https.get('https://api.ipify.org', { agent }, (res) => {
let body = ''
res.on('data', (chunk) => (body += chunk))
res.on('end', () => console.log(body))
})Full script: src/check-ip.js.
Use the username/package from the panel for the product you purchased — for example rotating residential or rotating datacenter. The gateway host and port stay the same.
SOCKS5: use it only when your package enables SOCKS in the panel; this example uses HTTP proxy mode.
nodejs · proxy · https-proxy-agent · javascript · residential-proxy · socks5 · http-proxy
MIT — see LICENSE.
