Exemplo n.º 1
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor       = reactor
     self.urlMonitor    = URLMonitor.getInstance()
     self.cookieCleaner = CookieCleaner.getInstance()
     self.dnsCache      = DnsCache.getInstance()
     self.plugins       = ProxyPlugins.getInstance()
Exemplo n.º 2
0
    def __init__(self, channel, queued, reactor=reactor):
        Request.__init__(self, channel, queued)

        self.reactor = reactor
        #self.urlMonitor    = URLMonitor.getInstance()
        self.cookieCleaner = CookieCleaner.getInstance()
        self.dnsCache = DnsCache.getInstance()
        self.realHost = None
        self.realUrl = None
Exemplo n.º 3
0
    def __init__(self, channel, queued, reactor = reactor):
        Request.__init__(self, channel, queued)

        logging.debug('Client request initiated...')

        self.reactor = reactor
        self.url_monitor = URLMonitor.get_instance()
        self.cookie_cleaner = CookieCleaner.get_instance()
        self.dns_cache = DNSCache.get_instance()
Exemplo n.º 4
0
	def __init__(self, channel, queued, reactor=reactor):
		Request.__init__(self, channel, queued)
		self.reactor = reactor
		self.peers = {}
		self.protocol = None
		self.host = None
		self.port = None
		self.rest = None
		self.configs = reactor.configs
		self.log = Logger()
Exemplo n.º 5
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor       = reactor
     self.urlMonitor    = URLMonitor.getInstance()
     self.hsts          = URLMonitor.getInstance().hsts
     self.cookieCleaner = CookieCleaner.getInstance()
     self.dnsCache      = DnsCache.getInstance()
     #self.uniqueId      = random.randint(0, 10000)
     
     #Use are own DNS server instead of reactor.resolve()
     self.customResolver = dns.resolver.Resolver()    
     self.customResolver.nameservers  = ['127.0.0.1']
Exemplo n.º 6
0
    def __init__(self, channel, queued, reactor=reactor):
        Request.__init__(self, channel, queued)
        self.reactor = reactor
        self.urlMonitor = URLMonitor.getInstance()
        self.hsts = URLMonitor.getInstance().hsts
        self.cookieCleaner = CookieCleaner.getInstance()
        self.dnsCache = DnsCache.getInstance()
        #self.uniqueId      = random.randint(0, 10000)

        #Use are own DNS server instead of reactor.resolve()
        self.customResolver = dns.resolver.Resolver()
        self.customResolver.nameservers = ['127.0.0.1']
Exemplo n.º 7
0
    def __init__(self, channel, path):
        """
        @param channel: the channel we're connected to.
        @param path: URI path
        """
        Request.__init__(self, channel, queued=False)

        # Unlike http.Request, which waits until it's received the whole request to set uri, args,
        # and path, we must do this ASAP
        self.uri = path
        x = self.uri.split('?', 1)

        if len(x) == 1:
            self.path = self.uri
            self.args = {}
        else:
            self.path, argstring = x
            self.args = parse_qs(argstring, 1)
Exemplo n.º 8
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.endpointFactory = channel.createEndpoint
Exemplo n.º 9
0
 def __init__(self, *args, **kwargs):
     self.key = KEYFILE
     self.cert = CERTFILE
     self.opener = urllib2.build_opener(
         HTTPSClientCertHandler(self.key, self.cert))
     Request.__init__(self, *args, **kwargs)
Exemplo n.º 10
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.identityProvider = IdentityProvider.getInstance()
Exemplo n.º 11
0
 def __init__(self, *a, **kw):
     self.yay = kw.pop('yay')
     Request.__init__(self, *a, **kw)
 def __init__(self, *args, **kwargs):
     self.key = KEYFILE
     self.cert = CERTFILE
     self.opener = urllib2.build_opener(HTTPSClientCertHandler(self.key, self.cert))
     Request.__init__(self, *args, **kwargs)
Exemplo n.º 13
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
Exemplo n.º 14
0
 def __init__(self, channel, queued, reactor: IReactorTCP = reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.client_endpoint = None
Exemplo n.º 15
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor       = reactor
     self.channel       = channel
     self.urlMonitor    = URLMonitor.getInstance()
     self.cookieCleaner = CookieCleaner.getInstance()
Exemplo n.º 16
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.endpointFactory = channel.createEndpoint
Exemplo n.º 17
0
 def __init__(self, *args, **kwargs):
     Request.__init__(self, *args, **kwargs)
     self.reply_channel = Channel.new_name("!http.response")
     self.channel.factory.reply_protocols[self.reply_channel] = self
Exemplo n.º 18
0
 def __init__(self, *a, **kw):
     self.task = kw.pop('task')
     Request.__init__(self, *a, **kw)
Exemplo n.º 19
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.channel = channel
     self.urlMonitor = URLMonitor.getInstance()
     self.cookieCleaner = CookieCleaner.getInstance()
Exemplo n.º 20
0
 def __init__(self, channel, queued=_QUEUED_SENTINEL, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
Exemplo n.º 21
0
 def __init__(self, channel, queued=_QUEUED_SENTINEL, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
Exemplo n.º 22
0
 def __init__(self, *args, **kwargs):
     Request.__init__(self, *args, **kwargs)
     self.reply_channel = Channel.new_name("!http.response")
     self.channel.factory.reply_protocols[self.reply_channel] = self
Exemplo n.º 23
0
 def __init__(self, channel, queued):
     Request.__init__(self, channel, queued)
Exemplo n.º 24
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor       	     = reactor
     self.PersistentData      = PersistentData.getInstance()
Exemplo n.º 25
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
Exemplo n.º 26
0
	def __init__(self, channel, queued, reactor=reactor):
		Request.__init__(self, channel, queued)
		self.reactor	   = reactor
		self.urlMonitor	= URLMonitor.getInstance()
		self.dnsCache	  = DnsCache.getInstance()
Exemplo n.º 27
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor          = reactor
     self.identityProvider = IdentityProvider.getInstance()
Exemplo n.º 28
0
 def __init__(self, channel, queued, reactor: IReactorTCP = reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.client_endpoint = None