예제 #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)
예제 #2
0
파일: proxy.py 프로젝트: spiccinini/luisito
 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
예제 #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)
예제 #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
예제 #5
0
 def __init__(self,*args,**kwargs):
     ReverseProxyResource.__init__(self,*args,**kwargs)
예제 #6
0
 def __init__(self, host, port, path, module_registry, reactor=reactor):
     self.module_registry = module_registry
     ReverseProxyResource.__init__(self, host, port, path, reactor)
예제 #7
0
 def __init__(self, host, port, path, module_registry, reactor=reactor):
     self.module_registry = module_registry
     ReverseProxyResource.__init__(self, host, port, path, reactor)
예제 #8
0
 def __init__(self, port):
     ReverseProxyResource.__init__(self, 'localhost', port, b'')