I don't understand how to read this general syntax. I want to request a URL through our proxy and it requires a specific host, port, username, and password. I don't know how to figure out what the protocol is. I want to do curl through a proxy. Based on the helpfile below, I would guess the line should be:
curl -x [whatever-my-protocol-is://]my-host-which-i-know[:my-port-which-i-know] -U my-username-which-i-know[:my-pass-which-i-know] http://www.google.com
Is this right? How do I figure out the protocol?
Relevant info from man:
-x, --proxy [PROTOCOL://]HOST[:PORT] Use proxy on given port
--proxy-anyauth Pick "any" proxy authentication method (H)
--proxy-basic Use Basic authentication on the proxy (H)
--proxy-digest Use Digest authentication on the proxy (H)
--proxy-negotiate Use Negotiate authentication on the proxy (H)
--proxy-ntlm Use NTLM authentication on the proxy (H)
-U, --proxy-user USER[:PASSWORD] Proxy user and password
--proxy1.0 HOST[:PORT] Use HTTP/1.0 proxy on given port
Ignore "["
when reading general syntax. Also, windows likes double vs single quotes.
So the command is:
curl -x my-host-which-i-know:my-port-which-i-know -U my-username-which-i-know:my-pass-which-i-know http://www.google.com
If you use domain
curl -x proxy:81 -U domain\login:password https://stackoverflow.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With