Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add proxies setting #128

Open
collaer opened this issue Oct 28, 2024 · 1 comment
Open

Ability to add proxies setting #128

collaer opened this issue Oct 28, 2024 · 1 comment

Comments

@collaer
Copy link

collaer commented Oct 28, 2024

Issue type
  • Feature Idea
    I looked and wasn't able to find an answer to my question, I beleive it could be a new feature?
OverPy version
0.7

Python version

  • Python 3.5
Summary

I have an http proxy that can't be automatically resolved by urllib, I can export proxy_http variables etc. so I can't use overpy in that environment since it will throw and error (URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>)

Steps to reproduce

normal use of overpy

Expected results

Being able to configure a proxy or list of proxies to use, like this:

proxies = {'http':'http://username:password@proxy-source-ip:proxy-port',
           'https':'https://username:password@proxy-source-ip:proxy-port'}

Then being able to use them for a query or initiating the API:

self.api = overpy.Overpass(
  max_retry_count=10,
  retry_timeout=60*5,
  proxies=proxies,
)

or

api.query(qry, proxies=proxies,)
Actual results

New config will be used.

Copy link

welcome bot commented Oct 28, 2024

Thanks for opening your first issue here! Be sure to follow the issue template!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant