diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-10-18 17:18:32 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-10-18 20:13:45 +0200 |
commit | 14eeee3fbc0a839d918149765d2134d05cd14601 (patch) | |
tree | dec1ca7dbc8668120e53e8ea45328246313199d1 /src/hydrilla/proxy/state.py | |
parent | 76f4b6769d0acaeffbd8e8a003fcbb3e2fbea107 (diff) | |
download | haketilo-hydrilla-14eeee3fbc0a839d918149765d2134d05cd14601.tar.gz haketilo-hydrilla-14eeee3fbc0a839d918149765d2134d05cd14601.zip |
[proxy] upon Haketilo launch automatically open Haketilo landing page in user's default web browser
* The landing page instructs user to configure browser's proxy settings.
* It is now possible to choose the IP address to listen on via command line parameter.
* The browser launching behavior can be switched off via command line parameter.
Diffstat (limited to 'src/hydrilla/proxy/state.py')
-rw-r--r-- | src/hydrilla/proxy/state.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/hydrilla/proxy/state.py b/src/hydrilla/proxy/state.py index 5e09367..7fb7bac 100644 --- a/src/hydrilla/proxy/state.py +++ b/src/hydrilla/proxy/state.py @@ -520,6 +520,12 @@ class HaketiloGlobalSettings: repo_refresh_seconds: int +class Logger(ABC): + @abstractmethod + def warn(self, msg: str) -> None: + ... + + class MissingItemError(ValueError): """....""" pass @@ -594,3 +600,22 @@ class HaketiloState(ABC): ) -> None: """....""" ... + + @property + @abstractmethod + def listen_host(self) -> str: + ... + + @property + @abstractmethod + def listen_port(self) -> int: + ... + + @abstractmethod + def launch_browser(self) -> bool: + ... + + @property + @abstractmethod + def logger(self) -> Logger: + ... |