Esempio n. 1
0
 def __init__(self, config):
     """
         Raises ServerException if there's a startup problem.
     """
     self.config = config
     try:
         super().__init__(
             (config.options.listen_host, config.options.listen_port))
     except socket.error as e:
         raise exceptions.ServerException('Error starting proxy server: ' +
                                          repr(e))
     self.channel = None
Esempio n. 2
0
 def __init__(self, config: config.ProxyConfig) -> None:
     """
         Raises ServerException if there's a startup problem.
     """
     self.config = config
     try:
         super().__init__(
             (config.options.listen_host, config.options.listen_port))
         if config.options.mode == "transparent":
             platform.init_transparent_mode()
     except Exception as e:
         raise exceptions.ServerException('Error starting proxy server: ' +
                                          repr(e)) from e
     self.channel = None  # type: controller.Channel
Esempio n. 3
0
 def __init__(self, config: ProxyConfig):
     """
         Raises ServerException if there's a startup problem.
     """
     self.config = config
     try:
         super().__init__(
             (config.options.listen_host, config.options.listen_port))
         if config.options.mode == "transparent":
             platform.init_transparent_mode()
     except socket.error as e:
         raise exceptions.ServerException('Error starting proxy server: ' +
                                          repr(e))
     self.channel = None