Tap connections do not work behind a proxy (fails to access astroquery.gaia)
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
We've run into a small problem using astroquery.gaia behind a proxy. In our setup students are running their code inside a hosted environment and as part of their work have to download some data via astroquery.gaia. For security reasons, outgoing network connections from the hosted environment must run via a central proxy. That works fine for most of the astroquery requests that students do, but the astroquery.gaia requests fail. The reason is that the [ConnectionHandler](https://github.com/astropy/astroquery/blob/e2f7bd5f5b72bf859f270ffc1870a2d6c1fbb23f/astroquery/utils/tap/conn/tapconn.py#L728) in the tapconn.py uses httplib, which does not by default honour the HTTP_PROXY/HTTPS_PROXY environment variables.
While we can work around this for some of the work, it would be great if the functionality could be extended so that astroquery.gaia can be used behind a proxy as well.
Contributor guide
Research direction
Start in astroquery/utils/tap/conn/tapconn.py at ConnectionHandler around the linked line, then trace how astroquery.gaia creates TAP connections. Reproduce a Gaia request in an environment using HTTP_PROXY or HTTPS_PROXY and compare it with a direct request. Done means Gaia TAP requests work through the configured proxy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100