Please add support for HTTP proxy server configuration in AndroidClientHandler :)
This is the related line of code.
This should probably check whether Proxy was set on the HttpClientHandler and use that, then fallback to empty call to OpenConnection() if no proxy was set.
I know I'm a bit late here, but shouldn't the default behavior (if you just call new AndroidClientHandler() without modifying any properties) be to use the system default proxy? Currently these settings are ignored.
@grendello I think support for using the default proxy could be implemented fairly easily by adding something like this to the GetJavaProxy method:
URI java_uri = new URI(EncodeUrl(destination));
proxy = ProxySelector.Default?.Select(java_uri).FirstOrDefault();
I totally agree with @dominik-weber and this is what we have implemented in our project in order to be able to debug network calls with Charles Proxy.
Any update on this guys ? I find it extremely strange that something as basic and 'core' to any network layer implementation is missing and it has been almost 8 years since Xamarin started !
The proxy should be used only if the Proxy property is not null (and configured for the specified URL) and the UseProxy property is true - which is what we implement.
Most helpful comment
I know I'm a bit late here, but shouldn't the default behavior (if you just call
new AndroidClientHandler()without modifying any properties) be to use the system default proxy? Currently these settings are ignored.@grendello I think support for using the default proxy could be implemented fairly easily by adding something like this to the GetJavaProxy method: