Shifter verwenden mit n8n
Binden Sie Shifters Residential- und ISP-Proxys auf zwei Arten in n8n-Workflows ein -- auf Umgebungsebene für jeden HTTP-Knoten gleichzeitig oder direkt am HTTP-Request-Knoten, wenn Sie Kontrolle pro Workflow benötigen.
Schnellstart
Installieren
docker run -p 5678:5678 -e HTTP_PROXY=... n8nio/n8n Grundlegende Nutzung
# Easiest path: set HTTP_PROXY / HTTPS_PROXY when launching n8n
docker run -d --name n8n -p 5678:5678 \
-e HTTP_PROXY="customer-USERNAME-country-us-sid-123ABC:PASSWORD@p.shifter.io:443" \
-e HTTPS_PROXY="customer-USERNAME-country-us-sid-123ABC:PASSWORD@p.shifter.io:443" \
-e NO_PROXY="localhost,127.0.0.1" \
n8nio/n8n
# Every HTTP Request node will now route through Shifter automatically. Funktionen
Beispiele
Proxy pro Knoten über HTTP Request (UI)
Wenn Sie Kontrolle pro Workflow benötigen (verschiedene Länder pro Knoten, Sticky Sessions pro Spider), konfigurieren Sie den Proxy direkt am HTTP-Request-Knoten -- keine Umgebungsvariablen erforderlich.
# In the HTTP Request node:
# 1. Switch to "Generic Authentication"
# 2. Authentication: "Generic Credential Type"
# 3. Credential type: "HTTP Header Auth"
# 4. Then in the node body, add:
#
# Send Headers: ON
# Header Parameters:
# Proxy-Authorization: Basic <base64(USER:PASS)>
#
# 5. Set Request Options > Proxy:
# http://p.shifter.io:443
# Or, simpler — set "Send Body / Send Headers / Use Proxy" toggles
# and configure Proxy directly:
{
"parameters": {
"url": "https://example.com",
"options": {
"proxy": "customer-USERNAME-country-uk-sid-456DEF:PASSWORD@p.shifter.io:443",
"timeout": 30000,
"redirect": { "followRedirects": true }
}
},
"name": "Scrape UK products",
"type": "n8n-nodes-base.httpRequest"
} Sticky Session pro Workflow mit Function Node
Generieren Sie zu Beginn eines Workflows eine eindeutige sid und übergeben Sie diese an jeden nachgelagerten HTTP-Knoten -- jeder Abruf in diesem Durchlauf teilt sich eine Residential-IP, ideal für mehrstufige Scrapes.
// Function node — outputs a Shifter URL with a fresh sid + ttl
const sid = Math.random().toString(36).slice(2, 10);
const country = $json.country || "us";
return [
{
json: {
shifterProxy:
`customer-USERNAME-country-${country}-sid-${sid}-ttl-300:` +
`PASSWORD@p.shifter.io:443`,
country,
sid,
},
},
];
// Then in each downstream HTTP Request node, set:
// Proxy: ={{ $json.shifterProxy }}
//
// Every node in the run reuses the same residential IP. Geo-spezifische Verzweigungen (Switch + mehrere Länder)
Verwenden Sie einen Switch-Knoten, um verschiedene Elemente auf unterschiedliche Zweige zu verteilen, wobei der HTTP-Request-Knoten jedes Zweigs für ein anderes Land konfiguriert ist. Ideal für lokalisiertes Preismonitoring oder SERP-Prüfungen.
// Workflow shape:
//
// Schedule Trigger
// |
// Set: list of regions
// |
// Split In Batches (per region)
// |
// Switch (item.region == "us" / "uk" / "jp" / ...)
// |--- HTTP Request (proxy: country-us sid-us-001)
// |--- HTTP Request (proxy: country-uk sid-uk-001)
// |--- HTTP Request (proxy: country-jp sid-jp-001)
// |--- HTTP Request (proxy: country-de sid-de-001)
// |
// Merge -> HTML Extract -> Postgres Insert
// Or, parameterize the proxy on a single HTTP Request node:
{
"url": "https://example.com/{{$json.path}}",
"options": {
"proxy": "=customer-USERNAME-country-{{$json.region}}-sid-{{$json.region}}-{{$workflow.id}}:PASSWORD@p.shifter.io:443"
}
} Selbst gehostet mit Docker Compose
Produktionsbereites Setup. Injizieren Sie Shifter-Umgebungsvariablen in den n8n-Container, speichern Sie Workflows in Postgres und lassen Sie jeden HTTP-Request-Knoten Shifter ohne knotenspezifische Konfiguration verwenden.
# docker-compose.yml
version: "3.8"
services:
n8n:
image: n8nio/n8n:latest
restart: unless-stopped
ports:
- "5678:5678"
environment:
# Shifter proxy for every outbound HTTP Request node
HTTP_PROXY: "customer-USERNAME-country-us-sid-prod:PASSWORD@p.shifter.io:443"
HTTPS_PROXY: "customer-USERNAME-country-us-sid-prod:PASSWORD@p.shifter.io:443"
NO_PROXY: "localhost,127.0.0.1,postgres"
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_DATABASE: n8n
DB_POSTGRESDB_USER: n8n
DB_POSTGRESDB_PASSWORD: n8n_password
N8N_BASIC_AUTH_ACTIVE: "true"
N8N_BASIC_AUTH_USER: admin
N8N_BASIC_AUTH_PASSWORD: changeme
volumes:
- n8n_data:/home/node/.n8n
depends_on:
- postgres
postgres:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_DB: n8n
POSTGRES_USER: n8n
POSTGRES_PASSWORD: n8n_password
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
n8n_data:
postgres_data: Häufig gefragt FAQ-Fragen
Häufige Fragen zur Verwendung von Shifter mit n8n.
Der einfachste Weg ist, die Umgebungsvariablen HTTP_PROXY und HTTPS_PROXY im n8n-Prozess (oder Container) zu setzen. Jeder HTTP-Request-Knoten -- und die meisten anderen Knoten, die externe Aufrufe tätigen -- übernimmt diese Umgebungsvariablen automatisch. Für die Kontrolle pro Workflow setzen Sie den Proxy direkt in den Optionen des HTTP-Request-Knotens.
Shifter verwenden mit n8n
Binden Sie Shifters 205M+ Residential- und ISP-Proxys in Ihre n8n-Workflows ein. Konfiguration per Umgebungsvariable oder pro Node, Sticky Sessions und geo-gezieltes Targeting pro Element - funktioniert in der Cloud und selbst gehostet.