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 auth with custom HTTP transport #11433

Closed
wants to merge 3 commits into from
Closed

Commits on Nov 28, 2022

  1. Proxy auth with custom HTTP transport

    Add three settings:
    - http.proxy-auth
    - http.proxy-username
    - http.proxy-password
    
    proxy-auth defaults to "auto" so that most use cases work out of the
    box. I don't know why you would disable authentication support, but I
    added a "disable" option in this case. You can also force the use of a
    mechanism and abort if the proxy doesn't advertise it.
    
    proxy-username and proxy-password: String vs Option<String>?
    curl doesn't negotiate (SPNEGO, here "gss") if handle.proxy_username and
    handle.proxy_password aren't called. This authentication mechanism
    doesn't require a user/pass in cargo config. This shouldn't hurt (?)
    when the proxy doesn't require authentication.
    
    About curl-rust's spnego and ntlm features:
    https://github.com/alexcrichton/curl-rust/blob/b50c5d355aab69483752db51815c5a679b29d6c4/curl-sys/Cargo.toml#L54-L60
    **This is the last blocker I think.** If we require those features, then
    vendored curl builds will require "a suitable GSS-API library or SSPI on
    Windows" [0] for the "gss" setting to work (which is what corporate
    proxies are using most of the time). I think this PR is blocked until we
    can either  vendor those dependencies, or we change the official cargo
    builds to link dynamically to libcurl.
    hhirtz committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    e7a5905 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

  1. remove clone

    this is true! my bad!
    
    <rust-lang#11433 (comment)>
    hhirtz committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    b50ce9b View commit details
    Browse the repository at this point in the history
  2. use options instead of empty strings

    handle.proxy_username and handle.proxy_password still need to be called
    when options are "None", otherwise curl won't negotiate in cases it
    should (eg when using "gss")
    
    <rust-lang#11433 (comment)>
    hhirtz committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    ebaa009 View commit details
    Browse the repository at this point in the history