Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ozantunca
Last active March 12, 2020 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozantunca/3adce3c2bf99f0dcce21102a8f6f8d96 to your computer and use it in GitHub Desktop.
Save ozantunca/3adce3c2bf99f0dcce21102a8f6f8d96 to your computer and use it in GitHub Desktop.
const https = require('https');
const { SocksProxyAgent } = require('socks-proxy-agent');
const agent = new SocksProxyAgent('socks5h://127.0.0.1:9050');
https.get('https://ifconfig.me', {
agent
}, res => {
res.pipe(process.stdout);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment