Browserless proxy

kc1
TRIAL

6 months ago

I am in the process of developing a node app which needs the chrome browser. I have the following code using browserless as you have recommended.

async function launchBrowser(headless = true) {
  let browser;
  if (process.env.BROWSER_PLAYWRIGHT_ENDPOINT) {
    browser = await chromium.connect(process.env.BROWSER_PLAYWRIGHT_ENDPOINT);
  } else {
    browser = await chromium.launch({ headless: headless });
  }

  return browser;
}

Can this be modified to use an external proxy, and if so how?
Closed

9 Replies

6 months ago

Hello,

Sorry but I'm not quite sure what you mean, can you please explain what you are trying to accomplish?


Status changed to Awaiting User Response Railway 6 months ago


kc1
TRIAL

6 months ago

Hi Brody - My script is working locally but not on railway. I believe it is unable to login on railway and I'm wondering if it would work with a fixed external proxy. I'd like to see an example in railway of connecting browserless to an external proxy


Status changed to Awaiting Railway Response Railway 6 months ago


6 months ago

Can you please provide the error you are getting.


Status changed to Awaiting User Response Railway 6 months ago


kc1
TRIAL

6 months ago

Of course ! If you look at my last thread, I detailed it in my last post https://help.railway.com/questions/mismatch-between-browserless-chrome-and-0001cd38


Status changed to Awaiting Railway Response Railway 6 months ago


6 months ago

Are you using the correct client version?


Status changed to Awaiting User Response Railway 6 months ago


kc1
TRIAL

6 months ago

yes - I am using playwright version 1.41 as detailed in the error message - you can see this in the package.json file


Status changed to Awaiting Railway Response Railway 6 months ago


6 months ago

Then a Proxy is not going to help with code issues.


Status changed to Awaiting User Response Railway 6 months ago


kc1
TRIAL

6 months ago

Well , as I said, its working locally. and I don't see any other errors on railway. In fact it is working on railway , until the authentication step which fails. If the IP addresses of railway are being blocked by the website I'm trying to login to, an external IP address could solve this.


Status changed to Awaiting Railway Response Railway 6 months ago


6 months ago

Sorry but that's something we cannot assist with.


Status changed to Awaiting User Response Railway 6 months ago


Status changed to Closed brody 6 months ago