academic / gURL

gURL is a cURL implementation with Go
MIT License
15 stars 3 forks source link

--proxy-user flag added #8

Closed gozeloglu closed 3 years ago

gozeloglu commented 3 years ago

Changes

--proxy-user <user:pass> flag added. In default, this flag uses Basic auth. But, there are other auth methods like digest, ntlm, etc. That's why I added proxy-basic, --proxy-digest, --proxy-ntlm, --proxy-negotiate flags. But, these are except --proxy-basic have not implemented yet.

Reference

Usage

Flags:
  -h, --help                help for gURL
  -x, --proxy string        [protocol://]host[:port] Use this proxy
      --proxy-basic         Use Basic authentication on the proxy (default true)
      --proxy-digest        Use Digest authentication on the proxy
      --proxy-negotiate     Use HTTP Negotiate (SPNEGO) authentication on the proxy
      --proxy-ntlm          Use NTLM authentication on the proxy
  -U, --proxy-user string   <user:password> Proxy user and password

Example Usage

$ gurl --proxy-user user:pass --proxy http://proxy.com:2343 www.google.com 
$ gurl --proxy-user user:pass  --proxy-basic --proxy http://proxy.com:2343 www.google.com 
$ gurl --proxy-user user:pass --proxy http://proxy.com:2343 www.google.com --proxy-digest