From cc6817a891c704e37881112a219db8f75a6ca229 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Thu, 24 Jul 2025 02:15:31 +0900 Subject: [PATCH] =?UTF-8?q?fixed:=20cnr=5Futils=20=E2=80=93=20fixed=20impr?= =?UTF-8?q?oper=20behavior=20of=20bypass=5Fssl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/Comfy-Org/ComfyUI-Manager/issues/2017 --- glob/cnr_utils.py | 4 ++-- glob/manager_core.py | 11 +++++++---- glob/manager_util.py | 4 ++-- pyproject.toml | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/glob/cnr_utils.py b/glob/cnr_utils.py index 6a61aaa3..95d260db 100644 --- a/glob/cnr_utils.py +++ b/glob/cnr_utils.py @@ -179,7 +179,7 @@ def install_node(node_id, version=None): else: url = f"{base_url}/nodes/{node_id}/install?version={version}" - response = requests.get(url) + response = requests.get(url, verify=not manager_util.bypass_ssl) if response.status_code == 200: # Convert the API response to a NodeVersion object return map_node_version(response.json()) @@ -190,7 +190,7 @@ def install_node(node_id, version=None): def all_versions_of_node(node_id): url = f"{base_url}/nodes/{node_id}/versions?statuses=NodeVersionStatusActive&statuses=NodeVersionStatusPending" - response = requests.get(url) + response = requests.get(url, verify=not manager_util.bypass_ssl) if response.status_code == 200: return response.json() else: diff --git a/glob/manager_core.py b/glob/manager_core.py index 777a3f33..fb3b8037 100644 --- a/glob/manager_core.py +++ b/glob/manager_core.py @@ -43,7 +43,7 @@ import manager_downloader from node_package import InstalledNodePackage -version_code = [3, 34, 1] +version_code = [3, 34, 2] version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '') @@ -1711,11 +1711,13 @@ def read_config(): config = configparser.ConfigParser(strict=False) config.read(manager_config_path) default_conf = config['default'] - manager_util.use_uv = default_conf['use_uv'].lower() == 'true' if 'use_uv' in default_conf else False def get_bool(key, default_value): return default_conf[key].lower() == 'true' if key in default_conf else False + manager_util.use_uv = default_conf['use_uv'].lower() == 'true' if 'use_uv' in default_conf else False + manager_util.bypass_ssl = get_bool('bypass_ssl', False) + return { 'http_channel_enabled': get_bool('http_channel_enabled', False), 'preview_method': default_conf.get('preview_method', manager_funcs.get_current_preview_method()).lower(), @@ -1741,7 +1743,8 @@ def read_config(): import importlib.util # temporary disable `uv` on Windows by default (https://github.com/Comfy-Org/ComfyUI-Manager/issues/1969) manager_util.use_uv = importlib.util.find_spec("uv") is not None and platform.system() != "Windows" - + manager_util.bypass_ssl = False + return { 'http_channel_enabled': False, 'preview_method': manager_funcs.get_current_preview_method(), @@ -1750,7 +1753,7 @@ def read_config(): 'channel_url': DEFAULT_CHANNEL, 'default_cache_as_channel_url': False, 'share_option': 'all', - 'bypass_ssl': False, + 'bypass_ssl': manager_util.bypass_ssl, 'file_logging': True, 'component_policy': 'workflow', 'update_policy': 'stable-comfyui', diff --git a/glob/manager_util.py b/glob/manager_util.py index 665842ae..b3db7b97 100644 --- a/glob/manager_util.py +++ b/glob/manager_util.py @@ -23,7 +23,7 @@ comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), ' cache_dir = os.path.join(comfyui_manager_path, '.cache') # This path is also updated together in **manager_core.update_user_directory**. use_uv = False - +bypass_ssl = False def add_python_path_to_env(): if platform.system() != "Windows": @@ -136,7 +136,7 @@ async def get_data(uri, silent=False): print(f"FETCH DATA from: {uri}", end="") if uri.startswith("http"): - async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session: + async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=not bypass_ssl)) as session: headers = { 'Cache-Control': 'no-cache', 'Pragma': 'no-cache', diff --git a/pyproject.toml b/pyproject.toml index 63fca270..b0133bfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-manager" description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI." -version = "3.34.1" +version = "3.34.2" license = { file = "LICENSE.txt" } dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions", "toml", "uv", "chardet"]