Phil Schwartz wrote:
>
> 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.
Must've done this wrong, as I now get a syntax error referencing line 17,
which is the old second line of the script. (Sorry, I'm pretty
python-illiterate.)
import xmlrpclib, httplib
class ProxiedTransport(xmlrpclib.Transport):
def set_proxy(self, proxy):
self.proxy = proxy
def make_connection(self, host):
self.realhost = host
h = httplib.HTTP(self.proxy)
return h
def send_request(self, connection, handler, request_body):
connection.putrequest("POST", 'http://%s%s' % (self.realhost,
handler))
def send_host(self, connection, host):
connection.putheader('Host', self.realhost)
from xmlrpclib import ServerProxy
import logging
--
Tim Evans, TKEvans.com, Inc. | 5 Chestnut Court
UNIX System Admin Consulting | Owings Mills, MD 21117
http://www.tkevans.com/ | 443-394-3864
http://www.come-here.com/News/ | [email protected]
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/denyhosts-user