-
Notifications
You must be signed in to change notification settings - Fork 33.7k
fix(core): Fix HTTP proxy support in all nodes and other axios requests #16092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic reviewed 5 files and found no issues. Review PR in cubic.dev.
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
✅ All Cypress E2E specs passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm-lock.yaml
Outdated
debug: 3.2.7(supports-color@5.5.0) | ||
debug: 3.2.7(supports-color@8.1.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there are dependencies here which shouldn't be updated 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything I can do about this? I just did pnpm add proxy-from-env
on node.js v22.16.0, pnpm v10.11.1.
In any case, don't think supports-color would cause trouble 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beyond going through the file manually, honestly not really 😞 I'm just not a big fan of updating dependencies that aren't meant to be updated
This PR proxies HTTPS great using the CONNECT protocol 🎉 Running squid: Expand workflow JSON{
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
0,
-120
],
"id": "5a1498dc-394a-4864-838f-ce800f13f8cc",
"name": "When clicking ‘Test workflow’"
},
{
"parameters": {
"url": "http://httpbingo.org/anything/HTTP",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
280,
-380
],
"id": "3df71009-bccb-4ecb-aeaf-7e5b821cfd04",
"name": "HTTP"
},
{
"parameters": {
"url": "https://httpbingo.org/anything/HTTPS",
"options": {
"response": {
"response": {
"neverError": true
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
280,
-220
],
"id": "6b3984c0-fb5b-4b83-82a9-5eee0551e609",
"name": "HTTPS"
},
{
"parameters": {
"url": "http://httpbingo.org/anything/HTTP-with-proxy",
"options": {
"proxy": "http://localhost:3128"
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
280,
-60
],
"id": "fdb3837c-6dd1-44fe-9221-567b2cf83037",
"name": "HTTP Proxy"
},
{
"parameters": {
"url": "https://httpbingo.org/anything/HTTPS-with-proxy",
"options": {
"response": {
"response": {
"neverError": true
}
},
"proxy": "http://localhost:3128"
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
280,
100
],
"id": "6a58ed73-da71-455d-bc92-9f74802610b1",
"name": "HTTPS Proxy"
},
{
"parameters": {
"method": "POST",
"url": "http://httpbingo.org/anything/HTTP",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
500,
-380
],
"id": "3e7f9b23-ce0d-48ff-9c90-4b2c96f1748a",
"name": "HTTP1"
},
{
"parameters": {
"method": "POST",
"url": "https://httpbingo.org/anything/HTTPS",
"options": {
"response": {
"response": {
"neverError": true
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
500,
-220
],
"id": "4e066d49-83f9-414f-9bd6-1176964ef550",
"name": "HTTPS1"
},
{
"parameters": {
"method": "PATCH",
"url": "http://httpbingo.org/anything/HTTP-with-proxy",
"options": {
"proxy": "http://localhost:3128"
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
500,
-60
],
"id": "d1062d75-4d92-4bce-ba48-7c7bdc39342f",
"name": "HTTP Proxy1"
},
{
"parameters": {
"method": "POST",
"url": "https://httpbingo.org/anything/HTTPS-with-proxy",
"options": {
"response": {
"response": {
"neverError": true
}
},
"proxy": "http://localhost:3128"
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
500,
100
],
"id": "efe9f0f2-bdd1-4929-913a-5644e5e34263",
"name": "HTTPS Proxy1"
}
],
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "HTTP",
"type": "main",
"index": 0
},
{
"node": "HTTPS",
"type": "main",
"index": 0
},
{
"node": "HTTP Proxy",
"type": "main",
"index": 0
},
{
"node": "HTTPS Proxy",
"type": "main",
"index": 0
}
]
]
},
"HTTP": {
"main": [
[
{
"node": "HTTP1",
"type": "main",
"index": 0
}
]
]
},
"HTTPS": {
"main": [
[
{
"node": "HTTPS1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Proxy": {
"main": [
[
{
"node": "HTTP Proxy1",
"type": "main",
"index": 0
}
]
]
},
"HTTPS Proxy": {
"main": [
[
{
"node": "HTTPS Proxy1",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {}
} |
Hey @pemontto thanks for testing! Plain HTTP proxying should be fixed in my last commit 🎉 |
@elsmr working nicely now!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently having issues on my instance testing this for https
but since this is working for @elsmr and for other users, I'm approving.
|
|
✅ All Cypress E2E specs passed |
Got released with |
Summary
Fix support for HTTP(s) proxies
HTTP_PROXY
/HTTPS_PROXY
/ALL_PROXY
/NO_PROXY
env varsproxy-from-env
(same package as axios)Tested with tinyproxy
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-2942/http-request-node-proxy-issue
Fixes: #7037
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)