Describe the problem/error/question
Fetching an https resource via a TOR proxy fails.
What is the error message (if any)?
In fact after a lot of time waiting for the response the execution is green, not red, but the final data is not there.
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- 1.14.2
- Running n8n via docker
More info:
So here’s the setup and info:
- In a docker engine I run a network
tor
and 2 containers:tor
andn8n
. - The tor is the
dperson/torproxy
with no special fancies:
Run with:
docker run \
-d \
--restart always \
--network tor \
--name tor \
-p 15000:9050 \
-p 15001:8118 \
dperson/torproxy
The n8n
container MAY access the tor proxy, AND MAY do the request, AND it works.
To test the raw container, I entered in the n8n container as root and did this:
host$ docker exec -it -u root n8n sh
n8n# apk update
n8n# apk search curl
n8n# apk add curl
Then I exitted and re-entered without privileges and performed the curl:
host$ docker exec -it n8n sh
n8n$ curl --proxy http://tor:8118 https://checkip.amazonaws.com
[I see exit node's IP]
n8n$ curl --proxy http://tor:8118 https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending
[I see HTML result here]
n8n$ curl --proxy http://tor:8118 https://example.com
[I see HTML result here]
All 3 URLs via https, and via the TOR proxy work perfectly, so there’s no problem at the docker or operating system level. Therefore it must be a problem with the n8n thing and its underlying (unmature?) libraries.
Then inside the n8n interface I test 12 scenarios
{ 3 URL } x { resurce via http or https } x { direct, proxied }
The 3 URLs without proto are:
- checkip.amazonaws.com
- example.com
- www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending
Then I get:
- http, direct (no proxy) => all 3 work
- https, direct (no proxy) => all 3 work
- http, via TOR proxy => depends on the resource (*)
- https, via TOR proxy => all 3 fail
(*)
good => http://checkip.amazonaws.com
good => http://example.com
fail => http://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending
Question:
I need to get some HTTPS resources via TOR.
How can I automate this within n8n?