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

external proxy support #15

Open
vtbalaji opened this issue Feb 27, 2021 · 4 comments
Open

external proxy support #15

vtbalaji opened this issue Feb 27, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@vtbalaji
Copy link

thanks for the worker component, it fits my needs and loving it.

I link to know how to use "worker component" with external proxy.

Any tips or idea will be appreciated.

thanks in advance.

@ziflex ziflex added the enhancement New feature or request label Mar 1, 2021
@ziflex
Copy link
Member

ziflex commented Mar 1, 2021

Could you elaborate on that?
Proxy for CDP or InMemory driver?
How do you run it?

If you are using CDP driver and are running the worker within an official Docker image, then you need to launch the image with this flag -e CHROME_OPTS='--proxy-server=my-proxy.com', where my-proxy.com is your target proxy server address.

If you are using in memory driver, then I will need to add this option to the worker.

@vtbalaji
Copy link
Author

vtbalaji commented Mar 4, 2021

hi Ziflex,
thx for quick response. we are using CDP driver and running official Docker image without any change so far. i tried running worker component as recommended by you with below command
docker run -p 80:8080 -e CHROME_OPTS='http://key:@proxy.crawlera.com:8011/' montferret/worker

it does not seem to be working or even reaching proxy. Am i missing anything here.

regards
Balaji

@ziflex
Copy link
Member

ziflex commented Mar 5, 2021

hi Ziflex,
thx for quick response. we are using CDP driver and running official Docker image without any change so far. i tried running worker component as recommended by you with below command
docker run -p 80:8080 -e CHROME_OPTS='http://key:@proxy.crawlera.com:8011/' montferret/worker

it does not seem to be working or even reaching proxy. Am i missing anything here.

regards
Balaji

Hey, I think you missed something, it should be like this:

docker run -p 80:8080 -e CHROME_OPTS='--proxy-server=http://key:@proxy.crawlera.com:8011/' montferret/worker

@vtbalaji
Copy link
Author

vtbalaji commented Mar 8, 2021

Hi Ziflex,
thx for your support, i am running following command
docker run -p 80:8080 -e CHROME_OPTS='--proxy-server=http://xyzkey:@proxy.crawlera.com:8011/' montferret/worker

Getting following error

run program: net::ERR_NO_SUPPORTED_PROXIES: DOCUMENT(@url,{driver:'cdp'})

if i remove proxy and provide direct access things are working fine.

Thanks and Regards
Balaji

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

No branches or pull requests

2 participants