Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 cannot use proxy #3959

Open
muamua33 opened this issue Mar 29, 2024 · 5 comments
Open

V2 cannot use proxy #3959

muamua33 opened this issue Mar 29, 2024 · 5 comments

Comments

@muamua33
Copy link

url

http://localhost:3000/function?token=6R0W53R135510&--proxy-server=http://x.x.x.x:x

error

browserless.io:http:function.post error: Failed to load resource: the server responded with a status of 502 (Bad Gateway) +0ms

browserless.io:http:function.post error: WebSocket connection to 'ws://0.0.0.0:3000/devtools/browser/6dfd9ff7-d212-4d13-9b5a-b4152af02e61?token=6R0W53R135510' failed: Establishing a tunnel via proxy server failed. +187ms

browserless.io:http:function.post Error running code: Event: Event +1ms
@joelgriffith
Copy link
Collaborator

Sadly this isn't quite enough to diagnose this issue. Does your code work without the proxy argument?

@muamua33
Copy link
Author

muamua33 commented Apr 10, 2024

Sadly this isn't quite enough to diagnose this issue. Does your code work without the proxy argument?

if v2 url "http://localhost:3000/function?token=6R0W53R135510" then work
so function code fine
if add "&--proxy-server=http://x.x.x.x:x" then not work
if curl -x "http://x.x.x.x:x" "http://explam.com" then work
so proxy fine
if v1 url "http://localhost:3000/function?--proxy-server=http://x.x.x.x:x" then work
so this is browserless v2 issue

@joelgriffith
Copy link
Collaborator

OK, how are you authorizing with the proxy? By IP address?

@muamua33
Copy link
Author

OK, how are you authorizing with the proxy? By IP address?

no need auth,local forward proxy,proxy url "http://127.0.0.1:1080"

@joelgriffith
Copy link
Collaborator

Nice, what's the docker env variables you're using? Could you set DEBUG=* and post the output here (as well as your enviroment variables)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants