pyvo icon indicating copy to clipboard operation
pyvo copied to clipboard

Support for proxies via requests

Open msbentley opened this issue 2 years ago • 2 comments

This may already be possible, but I finding it in the docs - is there support to pass the "proxies" keyword through pyvo to requests, in order to use e.g. SOCKS proxies to access servers behind firewalls etc.?

(use case - I want to test services running on development TAP servers, which can most easily be access through an SSH tunnel/SOCKS5 proxy - this functionality is built into requests, so I think it's just passing the relevant parameter through pyvo)

msbentley avatar Sep 11 '23 09:09 msbentley

@msbentley - All the services, including TAPService accept a session in the constructor. I suspect you could create a requests.Session, set it up with your proxy info and use it to instance PyVO services. I haven't tried it myself, but please let us know if it does the trick.

andamian avatar Sep 11 '23 22:09 andamian

If it works, please consider opening a PR and adding a section on it in the docs?

bsipocz avatar Sep 11 '23 23:09 bsipocz