Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--proxy-user flag added #8

Merged
merged 1 commit into from
Sep 23, 2021
Merged

--proxy-user flag added #8

merged 1 commit into from
Sep 23, 2021

Conversation

gozeloglu
Copy link
Contributor

  • tests added for functions
  • flags added for auth options (basic, digest, ntlm, negotiate). But not implemented yet.
  • comment lines added
  • <username:password> encoded to base64 for --proxy-basic.

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

* tests added for functions
* flags added for auth options (basic, digest, ntlm, etc.)
@gozeloglu gozeloglu requested a review from hmert September 23, 2021 19:01
@hmert hmert merged commit 3fc63a6 into main Sep 23, 2021
@hmert hmert deleted the proxy-user branch September 24, 2021 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants