tenable / pyTenable

Python Library for interfacing into Tenable's platform APIs
https://pytenable.readthedocs.io
MIT License
345 stars 172 forks source link

Update the support the proxy for allowing the script to query either tenable.io/tenable.sc #435

Closed williamtwar closed 2 years ago

williamtwar commented 3 years ago

Is your feature request related to a problem? Please describe. The syslog server is in isolated network. Unable to bypass the proxy due to security policy. Hence, this script need the proxy function in order to query the tenable.io/tenable.sc

Describe the solution you'd like It would be good if you can include the proxy support for allowing this script to query.

SteveMcGrath commented 2 years ago

Pretty support is included already. just pass a Requests-compliant proxies dictionary to the proxies parameter at instantiation:

https://2.python-requests.org/en/master/user/advanced/#proxies

https://pytenable.readthedocs.io/en/stable/io.html#tenable.io.TenableIO


from tenable.io import TenableIO
tio = TenableIO(proxies={
    'http': 'http://localhost:3128',
    'https': 'http://localhost:3128'
})