google / volley

https://google.github.io/volley
Apache License 2.0
3.37k stars 751 forks source link

Support Proxy functionality #442

Open JHarzenetter opened 2 years ago

JHarzenetter commented 2 years ago

Please add support for proxies. This should be a basic functionality in a Networklibrary. The Proxy should be useable with and without Credentials

jpd236 commented 2 years ago

I don't think it's that common for applications to need proxy support for typical Volley use cases of communicating with an API. But we already provide the hooks needed to do this - you can extend HurlStack and override createConnection to inject your own proxy connection logic. You can see for example this question on StackOverflow, which has some relatively simple examples of doing so:

https://stackoverflow.com/questions/23914407/volley-behind-a-proxy-server

We could try to be fancier here, e.g. having clients provide proxy parameters or a Proxy object itself, but given all the potential use cases and ways to configure a Proxy, I'd rather not introduce that complexity to Volley's APIs without more interested clients.

I'll leave this open in case there is other interest, but otherwise I'd say there's no plan to make changes here. If for some reason the above is not sufficient to be able to use proxies with Volley, please let us know.