feat: add proxy settings UI under Comfy > Network

Add three new settings for configuring HTTP/HTTPS proxy:
- Comfy.Network.Proxy.HttpUrl — main proxy URL for all traffic
- Comfy.Network.Proxy.HttpsUrl — optional separate HTTPS proxy
- Comfy.Network.Proxy.NoProxy — hosts to bypass proxy

Settings appear in the Settings dialog under Comfy > Network.
Values are persisted to comfy.settings.json and read by both
the Python backend and the Electron desktop app on startup.

Ref: Comfy-Org/desktop#1105

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-03-27 08:51:00 +09:00
parent 897cf9cb8f
commit 113f28ba7d
3 changed files with 43 additions and 1 deletions

View File

@@ -504,5 +504,17 @@
"pysssss_SnapToGrid": {
"name": "Always snap to grid",
"tooltip": "When enabled, nodes will automatically align to the grid when moved or resized."
},
"Comfy_Network_Proxy_HttpUrl": {
"name": "HTTP/HTTPS proxy URL",
"tooltip": "Proxy URL for all outbound HTTP/HTTPS traffic (e.g. http://127.0.0.1:7890). Applies to model downloads, API calls, git operations, and custom nodes. Requires restart."
},
"Comfy_Network_Proxy_HttpsUrl": {
"name": "HTTPS proxy URL (optional)",
"tooltip": "Separate proxy URL for HTTPS traffic only. If empty, the HTTP proxy URL above is used for both HTTP and HTTPS. Requires restart."
},
"Comfy_Network_Proxy_NoProxy": {
"name": "No-proxy hosts",
"tooltip": "Comma-separated list of hosts that should bypass the proxy (e.g. localhost,127.0.0.1,*.local). Requires restart."
}
}

View File

@@ -1308,5 +1308,32 @@ export const CORE_SETTINGS: SettingParams[] = [
type: 'boolean',
defaultValue: false,
versionAdded: '1.42.0'
},
{
id: 'Comfy.Network.Proxy.HttpUrl',
category: ['Comfy', 'Network'],
name: 'HTTP/HTTPS proxy URL',
tooltip:
'Proxy URL for all outbound HTTP/HTTPS traffic (e.g. http://127.0.0.1:7890). Applies to model downloads, API calls, git operations, and custom nodes. Requires restart.',
type: 'text',
defaultValue: ''
},
{
id: 'Comfy.Network.Proxy.HttpsUrl',
category: ['Comfy', 'Network'],
name: 'HTTPS proxy URL (optional)',
tooltip:
'Separate proxy URL for HTTPS traffic only. If empty, the HTTP proxy URL above is used for both HTTP and HTTPS. Requires restart.',
type: 'text',
defaultValue: ''
},
{
id: 'Comfy.Network.Proxy.NoProxy',
category: ['Comfy', 'Network'],
name: 'No-proxy hosts',
tooltip:
'Comma-separated list of hosts that should bypass the proxy (e.g. localhost,127.0.0.1,*.local). Requires restart.',
type: 'text',
defaultValue: ''
}
]

View File

@@ -472,7 +472,10 @@ const zSettings = z.object({
'Comfy.RightSidePanel.IsOpen': z.boolean(),
'Comfy.RightSidePanel.ShowErrorsTab': z.boolean(),
'Comfy.Node.AlwaysShowAdvancedWidgets': z.boolean(),
'LiteGraph.Group.SelectChildrenOnClick': z.boolean()
'LiteGraph.Group.SelectChildrenOnClick': z.boolean(),
'Comfy.Network.Proxy.HttpUrl': z.string(),
'Comfy.Network.Proxy.HttpsUrl': z.string(),
'Comfy.Network.Proxy.NoProxy': z.string()
})
export type EmbeddingsResponse = z.infer<typeof zEmbeddingsResponse>