Handling of private proxies
zackteo opened this issue · 2 comments
I have a private proxy like the following example from https://superuser.com/questions/1262861/what-is-a-proxy-username-and-password
http://dshowerhandle:SuperSecretPassword@us.paidproxy.com
Am I right to say that private proxies are currently unsupported in clj-http?
Currently, when I try to do a request with
{:proxy-host "dshowerhandle:SuperSecretPassword@us.paidproxy.com"
:proxy-port 8080}
I will get the following error
Unhandled java.net.UnknownHostException
http://dshowerhandle:SuperSecretPassword@us.paidproxy.com: invalid IPv6 address
I know that this the proxy works as I can make a successful request with curl
Something to try, have you tried specifying the proxy host using the java system property http.proxyHost
and see if that one supports the authenticated proxy?
Hi @dakrone thanks for your quick response. I discovered that proxies with passwords are actually supported:
clj-http/src/clj_http/core.clj
Line 557 in 5a52883
Was just previously confused since it wasn't mentioned in the README: https://github.com/dakrone/clj-http#proxies