0

The Chrome proxy server cli documentation is a bit unclear:

--proxy-server=<scheme>=<uri>[:<port>];.. | <uri>[:<port>] | "direct://".

What i need is to only activate proxy if i use a specifik URL, like myproxyurl.com. Other URL run as usual. But I cant find any deep explanation for how the "scheme" is defined. I'm using a putty tunnel on port 9999.

This works: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="%USERPROFILE%\proxy-profile" --proxy-server="socks5://localhost:9999"

But when i try to set the to a URL it will not work:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="%USERPROFILE%\proxy-profile" --proxy-server="myproxyurl.com=socks5://localhost:9999"

An explanation or page where i can read about "scheme" is also most welcome, as is the solution.

1 Answer 1

0

You cannot do this by only setting the proxy parameter. You need to use the proxy autoconfig file (PAC) - I don't know if it's settable from command line or only from GUI. PAC files are written in Javascript, you can find more about the file format here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file . There are also several examples there. You probably need to use dnsDomainIs() or shExpMatch() function in your PAC file to return the correct proxy address/port for the specific URL and "DIRECT" for all others.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .