Shifter와 함께 사용 n8n
Shifter의 레지덴셜 및 ISP 프록시를 두 가지 방식으로 n8n 워크플로에 연결하세요. 모든 HTTP 노드에 한 번에 적용되는 환경 수준 방식이나, 워크플로별 제어가 필요할 때 HTTP Request 노드에 인라인으로 적용하는 방식입니다.
빠른 시작
설치
docker run -p 5678:5678 -e HTTP_PROXY=... n8nio/n8n 기본 사용법
# 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. 기능
예시
HTTP 요청(UI)을 통한 노드별 프록시
워크플로우별 제어가 필요할 때(노드마다 다른 국가, 스파이더마다 고정 세션), 환경 변수 없이 HTTP Request 노드에서 직접 프록시를 구성하세요.
# 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"
} Function 노드를 사용한 워크플로별 스티키 세션
워크플로우 시작 시 고유한 sid를 생성하여 하위의 모든 HTTP 노드에 전달하세요. 해당 실행 내의 모든 fetch가 하나의 레지덴셜 IP를 공유하게 되어, 다단계 스크래핑에 완벽합니다.
// 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별 분기(Switch + 다중 국가)
Switch 노드를 사용하여 서로 다른 항목을 서로 다른 분기로 라우팅하고, 각 분기의 HTTP Request 노드를 다른 국가로 구성하세요. 현지화된 가격 모니터링이나 SERP 확인에 적합합니다.
// 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"
}
} Docker Compose를 이용한 자체 호스팅
프로덕션 준비 완료 설정. n8n 컨테이너에 Shifter 환경 변수를 주입하고, 워크플로를 Postgres에 저장하면 모든 HTTP Request 노드가 노드별 설정 없이 Shifter를 사용할 수 있습니다.
# 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: 자주 묻는 질문
n8n와 Shifter 사용에 관한 일반적인 질문.
가장 간단한 방법은 n8n 프로세스(또는 컨테이너)에 HTTP_PROXY 및 HTTPS_PROXY 환경 변수를 설정하는 것입니다. 모든 HTTP Request 노드와 외부로 호출하는 대부분의 다른 노드가 이 환경 변수를 자동으로 인식합니다. 워크플로우별로 제어하려면 HTTP Request 노드의 Options에서 프록시를 직접 설정하세요.
예. 각 HTTP Request 노드에는 Options > Proxy 필드가 있습니다. 여기에 Shifter URL을 붙여넣으면 전역 env var와 관계없이 해당 노드가 Shifter를 통해 라우팅됩니다. 표현식 문법(`={{$json.proxy}}`)을 결합하여 항목별로 매개변수화할 수 있습니다.
예. n8n Cloud에서는 HTTP_PROXY 환경 변수를 설정할 수 없지만, HTTP Request 노드의 노드별 프록시 설정은 자체 호스팅 환경과 정확히 동일하게 작동합니다. Shifter가 필요한 각 노드에서 프록시 필드를 설정하십시오.
워크플로우 시작 부분에 고유한 sid를 생성하는 Function 노드를 추가하세요(예: `Math.random().toString(36).slice(2, 10)`). 이 sid가 포함된 Shifter URL을 생성합니다. 이후의 모든 HTTP Request 노드에서 표현식을 통해 이 URL을 참조하면, 모두 동일한 레지덴셜 IP를 공유하게 됩니다.
예. Switch 노드를 사용하여 지역 필드로 분기하거나, HTTP Request 노드의 프록시 URL 내에서 `={{$json.country}}` 같은 표현식을 사용하세요. 각 항목은 서로 다른 Shifter 국가/도시/ASN을 통해 라우팅될 수 있습니다.
커스텀 노드가 필요하지 않습니다. Shifter는 표준 HTTP / SOCKS5 프록시이며, n8n에 내장된 HTTP Request 노드와 프록시 환경 변수로 별도 설정 없이 바로 처리할 수 있습니다. 이렇게 하면 워크플로우가 n8n Cloud, 자체 호스팅, 임베디드 배포 전반에서 이동성을 유지합니다.
Shifter 사용을 함께 시작하기 n8n
Shifter의 2억 5백만 개 이상의 레지덴셜 및 ISP 프록시를 n8n 워크플로에 연결하세요. 환경 변수 또는 노드별 설정, 스티키 세션, 항목별 지역 타겟팅을 지원하며 Cloud와 자체 호스팅 모두에서 작동합니다.