Parses the :proxy launch option into a Chrome --proxy-server flag plus, when the
proxy is authenticated, the credentials CDPEx.Browser arms on each page.
Accepts either a URL string or a keyword list / map:
"http://user:pass@host:8080"
[server: "host:8080", scheme: "http", username: "user", password: "pass"]In the URL form, credentials with reserved characters must be percent-encoded
(e.g. p@ss → p%40ss); they are decoded back on parse. The keyword form takes
credentials verbatim, so prefer it when a password contains reserved characters.
See the :proxy option on CDPEx.launch/1.
Summary
Types
A parsed proxy: the scheme://host:port value for Chrome's --proxy-server
(userinfo stripped), plus optional credentials (nil for an open proxy).
Functions
Credentials (%{username, password}) when the proxy needs auth, else nil.
Parses a :proxy value into {:ok, t} or {:error, {:invalid_proxy, reason}}.
The --proxy-server=… Chrome flag for a parsed proxy.
Types
Functions
Credentials (%{username, password}) when the proxy needs auth, else nil.
Both parts must be present and non-empty; a missing or empty half is treated as no auth (the proxy is used unauthenticated).
Parses a :proxy value into {:ok, t} or {:error, {:invalid_proxy, reason}}.
The --proxy-server=… Chrome flag for a parsed proxy.