Skip to content

Conversation

@mcpherrinm
Copy link
Contributor

This uses credentials, if present, from the URL.

This code is manually tested, but unfortunately there's not really a test suite setup for connecting to things. I think that's a much bigger project than just adding this, so I'm punting on tests til later.

Copy link
Contributor

@mbyczkowski mbyczkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits and comments, but overall ✅
Also, I agree that it would be nice to have more tests, but a proper integration test harness is out of scope for this.

gopkg.in/yaml.v2 v2.2.1 // indirect
)

go 1.13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like change is the same as #198, but the commit SHA is different. Maybe it needs another rebase?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, will rebase or drop this commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebased and it went poof

if connectProxy.User != nil {
password, ok := connectProxy.User.Password()
if !ok {
return nil, fmt.Errorf("proxy username without password not currently supported")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is anything special needed for proxying using a username without password? or does anyone even use that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's potentially possible (you could specify http://username@proxy/) but the upstream go-http-dialer package doesn't appear to support it (it always takes a username and password).

This only supports the simplest case: a username and password in the proxy URL,
and http basic auth.
@mcpherrinm mcpherrinm merged commit 131bf1d into master Jan 10, 2020
@mcpherrinm mcpherrinm deleted the proxy-auth branch January 10, 2020 07:00
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.

3 participants