Hey Team,
I’ll just quickly do quick product background thing and what we’re trying to achieve.
In our product we’re using puppeteer and we’re operating / working from india. Now In our product let’s say we have to access some websites from Italy or Germany, but they’re blocked in our region. So, we thought - It would be a nice idea to use a proxy server to access those websites in our puppeteer code. (PS: we have full consent of those websites)
Here’s what our puppeteer browser looks like.
const browser = await puppeteer.launch({
headless: true,
args: [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-dev-shm-usage",
"--disable-gpu",
"--disable-software-rasterizer",
`--proxy-server=${env.PROXY_SERVER_URL}`
]
});
Now comes the part -
For deploying proxy server we’re using this Docker image.
This image - I tried locally it works completely fine.
This image I tried hosting on AWS EC2 container and tried accessing it via public ip, it works fine.
Now when I tried hosting this image on fly.io - all of the sudden all the request started throwing 400 error, and I couldn’t access it in my puppeteer code via fly url or ipv4 as well.
What my end goal is - what i want to achieve here is.
We host this image on fly.io and access the proxy server it is hosting via fly’s url or fly’s public ip address.
And if there is any better way to handle this scenario in fly then it would be probably better.
Thank you for your help. Much appreciated.