LucianoGanga / simple-headless-chrome

Simple abstraction to use Chrome as a Headless Browser with Node JS
MIT License
217 stars 50 forks source link

We need to run browser with proxy,How i set proxy? #66

Closed iyyappan13391 closed 7 years ago

iyyappan13391 commented 7 years ago

we are using NPM of simple-headless-chorme. I have tried to set proxy of it.Even this cannot having the correct document to the proxy.Can you help me to get this things done?

LucianoGanga commented 7 years ago

Hello @iyyappan13391 !

I don't understand what you need to do. You need to add a proxy to the navigation?

I think that's something you can do at a network level, and not from the Headless Chrome.

Thanks! Lucho

timo-klarshift commented 7 years ago

Just start your chrome with: chromium --headless --proxy-server=host:port [...]

LucianoGanga commented 7 years ago

In that case, if it's with a flag, you can pass flags when initializing the instance. Check the example here:

https://github.com/LucianoGanga/simple-headless-chrome#support-more-chrome-flags

Cheers! Luciano