Closed Zyrix closed 3 years ago
Hi @Zyrix thanks for this contribution! It looks relatively straight forward, which is great, can I ask you to consider two things please. Firstly, is there some tests that can be easily integrated for this? Perhaps a socks proxy on a docker container could be added to our docker compose test environment, and appropriate tests run against that. Secondly, the client is generated from mustache templates, including the rest implementation. It would be good to include these changes in the template so that future clients do not drop them unexpectedly, you can find the template here: https://github.com/Chaffelson/nipyapi/blob/main/resources/client_gen/swagger_templates/rest.mustache
Both of these I am happy to help with if you like, please let me know your thoughts.
Thank you for your comments! I added my changes to the moustache template. As for the docker proxy test I'm not sure how to implement this and would be glad if you could help me with that.
This PR adds support for SOCKS proxies. It uses the "proxy" parameter for SOCKS proxies and distinguishes SOCKS proxies from other proxies by the occurence of "socks" in the proxy url. urllib3 is used for SOCKS proxies which uses pysocks for its implementation. See https://urllib3.readthedocs.io/en/latest/reference/contrib/socks.html