It looks like it's not that hard to accomplish Tim but I don't have any 
proxies setup to test it out on.  Basically, you would copy the code at 
the code (at the link that Daniel provided) with the exception of the last 
4 lines to the top of sync.py.


Then, in the xmlrpc_connect method:

     def xmlrpc_connect(self):
         try:
             #
             # changes start here
             #
             p = ProxiedTransport()
             p.set_proxy('proxy-server:8080') # replace w/ your squid server
             self.__server = ServerProxy(self.__prefs.get('SYNC_SERVER'), 
transport=p)
             #
             # end of changes
             #
             self.__connected = True
         except Exception, e:
             error(str(e))
             self.__connected = False
         return self.__connected


This might not be optimal but it should work (since I don't know if the 
squid connection needs to be made each time or if it can be reused).


Regards,

Phil Schwartz
http://www.phil-schwartz.com

Open Source Projects:

DenyHosts: http://www.denyhosts.net
Kodos: http://kodos.sourceforge.net
ReleaseForge: http://releaseforge.sourceforge.net
Scratchy: http://scratchy.sourceforge.net
FAQtor: http://faqtor.sourceforge.net

Become a fan of DenyHosts:

http://www.facebook.com/pages/DenyHosts/58269629216



On Tue, 21 Sep 2010, Daniel Norton wrote:

> On Tue, Sep 21, 2010 at 10:18 AM, Tim Evans <tkev...@tkevans.com> wrote:
>
>> This may be a FAQ and, if so, I apologize, but does anyone know how to
>> get DenyHosts to use an http proxy server (in our case, squid +
>> squidguard) for its auto-updates?
>>
>
> Looking at the code, I'm not seeing support for connecting through a proxy.
> Ironically, the library it uses is called ?ServerProxy,? but from what I'm
> seeing, you?ll need to muck with the *sync.py* source to configure a proxy
> connection:
>
> http://docs.python.org/library/xmlrpclib.html#example-of-client-usage
>
> --
> Daniel
>


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Denyhosts-user mailing list
Denyhosts-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/denyhosts-user

Reply via email to