issues
search
LukeMurphey
/
splunk-syndication-input
A Splunk app for reading syndication feeds (RSS, ATOM, RDF)
GNU General Public License v3.0
7
stars
8
forks
source link
Add proxy support
#6
Closed
mickotronic
closed
3 years ago
mickotronic
commented
3 years ago
bin/syndication.py
import ProxyHandler for urllib.request and urllib2
In class SyndicationModularInput
init method, add URLField in args to allow for a proxy URL.
Add a classmethod get_proxy_handler (made similar to get_auth_handler) to create the proxy_handler object.
get_feed method
changed to include proxy parameter
If the proxy parameter is not None, call get_proxy_handler to create the object proxy_handler
Also ensure that the build_opener call uses the proxy_handler object.
run method
add proxy parameter (cleaned_params["proxy"])
call to self.get_feed includes the new proxy parameter
README/inputs.conf.spec
Added proxy parameter (splunk errors if I don't add this) proxy =
Defines the proxy through which connection will be made via
bin/syndication.py
README/inputs.conf.spec