So I'm trying to figure out how to install Tor to my Node.js app. I'm deploying this app to Heroku. I'm trying to use Puppeteer and the --proxy-server flag to create an IP rotation but I need Tor in my project to access the socks5 address. Here's my code:
let portList = [9050, 9052, 9053, 9054, 9055, 9056, 9057, 9058, 9059, 9060];
let spoofPort = portList[Math.floor(Math.random()*portList.length)];
puppeteerExtra.use(pluginStealth());
const browser = await puppeteerExtra.launch({ headless: true, args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--proxy-server=socks5://127.0.0.1:' + spoofPort,
]});
const page = await browser.newPage();
await page.goto(`pageURL`);
I tried to just install a Tor Heroku buildpack (https://elements.heroku.com/buildpacks/todokku/heroku-buildpack-tor-proxy) but the flag still didn't work. How do I install Tor properly?