Open zll123dxd opened 1 year ago
I tried to do some debugging, the header is correctly saved in the request, but when it is actually sent, there is only the host field, is this a bug?
To add, I found this code to force the use of the Host field, and did not use other fields in the Request
AsyncSSLSocketMiddleware.java ... String connect = String.format(Locale.ENGLISH, "CONNECT %s:%s HTTP/1.1\r\nHost: %s\r\n\r\n", uri.getHost(), port, uri.getHost()); data.request.logv("Proxying: " + connect); Util.writeAll(socket, connect.getBytes(), new CompletedCallback() { ...
In other words, the header I added will be used after the proxy is forwarded, not when the proxy is connected. I think it does not support the proxy with authentication, right?
I'm not sure if this project is still maintained, try asking.
I have configured a proxy with authentication in my android project. There are two options to achieve
I don't know if I used it wrong, attach a piece of code:
If I configure this parameter in the okhttp framework, I can successfully connect. So I think there is nothing wrong with the parameters of the header.
I checked the code of the AsyncHttp framework, I think the default does not support Proxy-Auth, so I want to manually add the http header, but it is invalid, if anyone has a suitable solution, please help me.