diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index 0367d29256..3193f3bd81 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -518,8 +518,9 @@ export async function parseRequestObject(requestObject: IRequestOptions) { if (typeof requestObject.proxy === 'string') { try { const url = new URL(requestObject.proxy); + const host = url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname; axiosConfig.proxy = { - host: url.hostname, + host, port: parseInt(url.port, 10), protocol: url.protocol, }; @@ -544,8 +545,9 @@ export async function parseRequestObject(requestObject: IRequestOptions) { const [userpass, hostport] = requestObject.proxy.split('@'); const [username, password] = userpass.split(':'); const [hostname, port] = hostport.split(':'); + const host = hostname.startsWith('[') ? hostname.slice(1, -1) : hostname; axiosConfig.proxy = { - host: hostname, + host, port: parseInt(port, 10), protocol: 'http', auth: {