Quota call doesn't use proxy settings
See original GitHub issueDescribe the bug
When we call CensysHost.quota()
in censys.search, ignores proxy settings which was specified in CensysHosts constructor.
To Reproduce Steps to reproduce the behavior:
- Install 2.0.6 and run following code. (Which have valid api_id, api_secret and proxy settings)
from censys.search import CensysHosts
client = CensysHosts(api_id="XXXXXXX", api_secret="XXXXXXXX", proxies={"https":"http://<proxy_ip>:<proxy_port>"})
print(client.quota())
- Then confirm actual TCP access destination.
$ netstat -p | grep 65247
tcp 0 1 <running server>:48232 104.26.10.245:https SYN_SENT 65247/python
Expected behavior https access should head to our proxy, not 104.26.10.245.
This ip is search.censys.io.
$ nslookup search.censys.io
Name: search.censys.io
Address: 104.26.11.245
Device (please complete the following information):
- OS [e.g. Cent OS]: Cent OS
- Censys Python Version [e.g. 1.1.0]: 2.0.6
- Shell [e.g. bash, zsh]: bash
Additional context Add any other context about the problem here.
To compare, following code which calls “view” function works as expected. $ python test2.py
from censys.search import CensysHosts
client = CensysHosts(api_id="XXXXXXX", api_secret="XXXXXXXX", proxies={"https":"http://<proxy_ip>:<proxy_port>"})
print(client.view("104.26.11.245"))
{'ip': '104.26.11.245', 'services': [{'_decoded': 'http', '_encoding': {'banner': 'DISPLAY_UTF8', 'banner_hex': 'DISPLAY_HEX'}, 'banner': 'HTTP/1.1 403 Forbidden\nVary: Accept-Encoding\nCf-Ray: 6868f5302a3e2986-ORD\nServer: cloudflare\nX-Frame-Options: SAMEORIGIN\nExpires: Thu, 01 Jan 1970 00:00:01 GMT\nConnection:....
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Solved: How do the quota settings on an API product intera...
The configuration of the API Product Quota fields will populate variables that are accessible in your proxy, and these variables can be fed...
Read more >URLConnection doesn't use proxy settings - Stack Overflow
openConnection() and setting proxy login/password to default Authenticator . The connection used proxy in that case, but I got 407, so it seems ......
Read more >Configuring the gcloud CLI for use behind a proxy/firewall
Configure your gcloud proxy settings only if you would like to use a different proxy. If gcloud proxy settings are set, they override...
Read more >Running GitLab Runner behind a proxy
Open the configuration file for CNTLM ( /etc/cntlm.conf ). Enter your username, password, domain and proxy hosts, and configure the Listen IP ...
Read more >Java Networking and Proxies
In some cases the application should use the system default settings, ... Up until Java SE 1.4 system properties were the only way...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @mitsuo0114, I have just released a new beta release. Please install using
pip install censys==2.0.7b1
.This is exactly the issue, I can get a fix up today.