From 22f7c5e8809e2eed754ff43351d4305c5b94142c Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Tue, 27 Feb 2024 20:15:25 +0800 Subject: [PATCH] Fix wrong hy2 URI scheme #68 Signed-off-by: Loren Eteval --- Furious/Library/Configuration.py | 44 +------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/Furious/Library/Configuration.py b/Furious/Library/Configuration.py index 574a506e..efbc56f8 100644 --- a/Furious/Library/Configuration.py +++ b/Furious/Library/Configuration.py @@ -1225,48 +1225,6 @@ class ConfigurationXray(ConfigurationFactory): return False - def logAccessPath(self) -> str: - try: - return self['log']['access'] - except Exception: - # Any non-exit exceptions - - return '' - - def logErrorPath(self) -> str: - try: - return self['log']['error'] - except Exception: - # Any non-exit exceptions - - return '' - - def setLogAccessPath(self, path) -> bool: - try: - if self.get('log') is None: - self['log'] = {} - - self['log']['access'] = path - - return True - except Exception: - # Any non-exit exceptions - - return False - - def setLogErrorPath(self, path) -> bool: - try: - if self.get('log') is None: - self['log'] = {} - - self['log']['error'] = path - - return True - except Exception: - # Any non-exit exceptions - - return False - class ConfigurationHysteria1(ConfigurationFactory): def __init__(self, config: Union[str, dict] = '', **kwargs): @@ -1637,7 +1595,7 @@ def constructFromAny(config: Union[str, dict], **kwargs) -> ConfigurationFactory or config.startswith('trojan://') ): return ConfigurationXray(config, **kwargs) - if config.startswith('h2://') or config.startswith('hysteria2://'): + if config.startswith('hy2://') or config.startswith('hysteria2://'): return ConfigurationHysteria2(config, **kwargs) try: