mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-08-25 18:32:35 +08:00
feat: add HTTP/HTTPS proxy configuration via CLI args and settings file
- New CLI args: --http-proxy, --https-proxy, --no-proxy - Falls back to comfy.settings.json keys: Comfy.Network.Proxy.HttpUrl, Comfy.Network.Proxy.HttpsUrl, Comfy.Network.Proxy.NoProxy - Priority: CLI args override all; settings file fills gaps only (existing env vars take precedence over settings file) - Credentials are redacted in startup logs via netloc-split approach (safe against malformed ports and empty-username/non-empty-password) - Specific exception handling (OSError, JSONDecodeError) with warning log
This commit is contained in:
@@ -233,6 +233,13 @@ parser.add_argument(
|
||||
help="Set the base URL for the ComfyUI API. (default: https://api.comfy.org)",
|
||||
)
|
||||
|
||||
parser.add_argument("--http-proxy", type=str, default=None, metavar="URL",
|
||||
help="HTTP/HTTPS proxy URL (e.g. http://127.0.0.1:7890). Sets HTTP_PROXY and HTTPS_PROXY environment variables so all outbound traffic is routed through the proxy.")
|
||||
parser.add_argument("--https-proxy", type=str, default=None, metavar="URL",
|
||||
help="HTTPS proxy URL. If not set, --http-proxy is used for both HTTP and HTTPS traffic.")
|
||||
parser.add_argument("--no-proxy", type=str, default=None, metavar="HOSTS",
|
||||
help="Comma-separated list of hosts that should bypass the proxy (e.g. localhost,127.0.0.1,*.local).")
|
||||
|
||||
database_default_path = os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__), "..", "user", "comfyui.db")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user