how to pass a username and password through command line for --proxy-server flag

2,004 views
Skip to first unread message

Simran Singh

unread,
Jun 27, 2023, 4:09:35 PM6/27/23
to Chromium-dev
i want to pass a username and password from the command line for --proxy-server flag in chromium i also tried in this way but it can't works:

--proxy-server=protocol=username:password@host:port

But if I use the flag like this:

--proxy-server="host:port"

and open any website, it opens a prompt box to fill a username and password. After filling the username and password, it works properly.

Is there a way or any changes in code  to fill the username and password through the flag so that the proxy flag works properly without requiring manual input?


Jeremy Roman

unread,
Jun 28, 2023, 12:14:10 PM6/28/23
to simrans...@gmail.com, Chromium-dev
As far as I know, this is not supported in the --proxy-server switch, which uses this format; see also this documentation. I think it would likely be possible to pre-populate the password store with the credentials that apply to the proxy authentication realm, but I'm not immediately sure how to do that.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/676f8ea1-968c-437d-a2b4-1d412af70e4cn%40chromium.org.

Matthew Menke

unread,
Jun 29, 2023, 1:52:34 AM6/29/23
to Chromium-dev, Jeremy Roman, Chromium-dev, simrans...@gmail.com
See https://source.chromium.org/chromium/chromium/src/+/main:net/docs/proxy.md for more details on proxy configuration, but yes, Chrome doesn't support providing credentials from the command line, and Chrome also won't grab manually configured system-wide credentials on platforms that support that (It will grab dynamically NTLM/Negotiate credentials from platform APIs, but that's rather different)
Reply all
Reply to author
Forward
0 new messages