Exemple #1
0
 def __init__(self,
              host,
              port,
              path,
              forwarded_port=None,
              forwarded_proto=None):
     # host:port/path => target server
     self._forwarded_port = forwarded_port
     self._forwarded_proto = forwarded_proto
     ReverseProxyResource.__init__(self, host, port, path)
Exemple #2
0
 def __init__(self, server_pool, config=None, reactor=reactor):
     ReverseProxyResource.__init__(self,
                                   host="",
                                   port=80,
                                   path="",
                                   reactor=reactor)
     self.isLeaf = True
     self.server_pool = server_pool
     if config is None:
         config = DEFAULT_CONFIG
     else:
         aux = DEFAULT_CONFIG.copy()
         aux.update(config)
         config = aux
     self.config = config
Exemple #3
0
 def __init__(self, *arg, **kwarg):
    log.debug("WebProxy called")
    try:
       if 'remove' in kwarg.keys():
          self.remove=int(kwarg['remove'])
          del kwarg['remove']
    except:
       log.debug("error in remove")
    return ReverseProxyResource.__init__(self, *arg, **kwarg)
Exemple #4
0
    def __init__(self,
                 host,
                 path,
                 port=80,
                 cache=None,
                 pool_maxsize=4,
                 downloader=None,
                 filter_fun=None,
                 reactor=reactor):
        path = path[:-1] if path.endswith('/') else path
        paths = path.split('/')

        root_path = paths[0]
        ReverseProxyResource.__init__(self, host, port, root_path, reactor)
        self._sub_paths = paths[1:]

        self._downloader = downloader \
            or IllustrationDownloader(host=host, pool_maxsize=pool_maxsize)

        self._cache = cache
        self._filter = filter_fun
 def __init__(self,*args,**kwargs):
     ReverseProxyResource.__init__(self,*args,**kwargs)
Exemple #6
0
 def __init__(self, host, port, path, module_registry, reactor=reactor):
     self.module_registry = module_registry
     ReverseProxyResource.__init__(self, host, port, path, reactor)
Exemple #7
0
 def __init__(self, host, port, path, module_registry, reactor=reactor):
     self.module_registry = module_registry
     ReverseProxyResource.__init__(self, host, port, path, reactor)
 def __init__(self, port):
     ReverseProxyResource.__init__(self, 'localhost', port, b'')