Browserless proxy
kc1
TRIALOP

a year 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

brody
EMPLOYEE

a year 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 12 months ago


kc1
TRIALOP

a year 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 12 months ago


brody
EMPLOYEE

a year ago

Can you please provide the error you are getting.


Status changed to Awaiting User Response Railway 12 months ago


kc1
TRIALOP

a year 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 12 months ago


brody
EMPLOYEE

a year ago

Are you using the correct client version?


Status changed to Awaiting User Response Railway 12 months ago


kc1
TRIALOP

a year 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 12 months ago


brody
EMPLOYEE

a year ago

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


Status changed to Awaiting User Response Railway 12 months ago


kc1
TRIALOP

a year 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 12 months ago


brody
EMPLOYEE

a year ago

Sorry but that's something we cannot assist with.


Status changed to Awaiting User Response Railway 12 months ago


Status changed to Closed brody 12 months ago


Loading...