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

Using HTTP proxies with Auth #59

Open
kafeijao opened this issue Jun 24, 2017 · 1 comment
Open

Using HTTP proxies with Auth #59

kafeijao opened this issue Jun 24, 2017 · 1 comment

Comments

@kafeijao
Copy link

kafeijao commented Jun 24, 2017

When I try to use proxies with the format (for example): login:[email protected]:3128, the proxy check fails. I've tried http/https/socks5.

Error message:
06-24 17:52:27 [Clemont] HttpConnectionException, proxy [http://login:[email protected]:3128] might be bad, move it out of rotation : Technical error getting CSRF Token : Unexpected status line: <html><head><title>407 Proxy Authentication Required</title></head>

It seems to work with curl thought.

@drallieiv
Copy link
Owner

The exact use case is only related to using http (not https) proxies with basic auth.

Which requires creating a tunnel as the curl test also does.

But when doing the first try (without auth), the server responds back with a 407 error as expected and asks for authentication

In that case, the tunnel can either stay open, and you re-use it but adding auth
Or it may close, and then you open another tunnel this time with auth

OkHttp that is used by KinanCity is expecting a header :

Connection: close

but the proxy server tester returns

Proxy-Authenticate: Basic realm="proxy"
Proxy-Connection: close
Content-type: text/html; charset=utf-8

I submitted the issue square/okhttp#3429

Http proxies without auth should not be affected
Neither should https proxies with auth.

What would help is having debug logs of some other authenticated http proxies which currently work with Kinan thay may respond other headers.

I still dont know if it is an error in OkHttp or if it is that proxy which is not giving the right headers back.

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

No branches or pull requests

2 participants