Chromium 58.0.3029.110 unable to parse --proxy-server format when running in headless mode
Reported by
nickri...@gmail.com,
Jun 19 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240 Steps to reproduce the problem: 1. Run `chromium-browser --headless --disable-gpu --user-data-dir=$(pwd)/chrome-data --remote-debugging-port=9222 --proxy-server="socks://127.0.0.1:1080" https://www.chromestatus.com` What is the expected behavior? Start without any error and use the proxy I specified. What went wrong? [0619/210210.402682:ERROR:headless_shell.cc(484)] Malformed proxy server url Did this work before? N/A Chrome version: 58.0.3029.110 Channel: stable OS Version: Flash Version:
,
Jun 19 2017
Thank you for responding.
Yes, I saw the code before creating this feedback.
However, the `man chromium-browser` states:
--proxy-server=host:port
Specify the HTTP/SOCKS4/SOCKS5 proxy server to use for requests.
......
--proxy-server="socks://foobar:1080"
Use the SOCKS v5 proxy "foobar:1080" to load all URLs.
......
I think this is a little misleading, as this format is invalid for `--headless` mode. Maybe I should category this issues as a *Incorrect Document*
,
Jun 19 2017
Thank you for providing more feedback. Adding requester "zhongyi@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 20 2017
I don't know anything about the headless mode, but looks like it is implementing a completely different meaning for --proxy-server in headless/app/headless_shell.cc. So yeah, --proxy-server works differently in headless than in regular chromium, which I agree is undesirable and seems broken.
,
Jun 20 2017
,
Jun 20 2017
,
Jun 23 2017
Removing Enterprise label because this doesn't seem to be enterprise / policy specific. Please re-add it if you think I'm wrong. Thanks.
,
Jun 29 2017
,
Jun 30 2017
Able to reproduce the issue on the reported chromium version 58.0.3029.110 on Linux Ubuntu 14.04. Marking this Untriaged and adding proper component for someone from the respective team to have a look at this.
,
Jul 17 2017
More complex proxy server strings for the headless mode should be supported in the latest M61 builds. The behavior was added here: https://chromium-review.googlesource.com/c/567008/. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by zhongyi@chromium.org
, Jun 19 2017Labels: Needs-Feedback
"Malformed proxy server url" sounds like a the proxy server specified in a wrong format. The code was expecting to get a host port pair split by ':'. if (command_line.HasSwitch(switches::kProxyServer)) { std::string proxy_server = command_line.GetSwitchValueASCII(switches::kProxyServer); net::HostPortPair parsed_proxy_server = net::HostPortPair::FromString(proxy_server); <---- expecting a host port pair if (parsed_proxy_server.host().empty() || !parsed_proxy_server.port()) { LOG(ERROR) << "Malformed proxy server url"; return EXIT_FAILURE; } builder.SetProxyServer(parsed_proxy_server); } nickriose@: could you retry by specifying a custom proxy configuration in the following ways: --proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://" In particular, if I read your customized proxy configuration correctly: you probably should use --proxy-server="socks=127.0.0.1:1080" More details and examples are available at https://www.chromium.org/developers/design-documents/network-settings