통합

Shifter와 함께 사용 Postman

Postman은 최상급 프록시 지원을 제공합니다. Shifter를 전역 수준에서 한 번 설정하면 모든 컬렉션이 레지덴셜 IP를 통해 실행됩니다. 또는 프로덕션/스테이징 분리를 위해 환경별로 범위를 지정할 수 있습니다.

빠른 시작

설치

// Postman desktop > Settings > Proxy. No install required.

기본 사용법

// Postman desktop > Settings > Proxy:
//
//   ☑ Use custom proxy configuration
//   Proxy Type:           HTTP and HTTPS
//   Proxy Server:         p.shifter.io
//   Proxy Port:           443
//   ☑ This proxy requires authentication
//   Proxy Auth Username:  customer-USERNAME-country-us-sid-123ABC
//   Proxy Auth Password:  PASSWORD
//
// Every request you send (and every collection run) now routes
// through Shifter's residential pool.

기능

Postman 데스크톱의 네이티브 프록시 지원, Settings > Proxy, 확장 프로그램 불필요
Newman CLI는 헤드리스 CI 실행을 위해 HTTP_PROXY / HTTPS_PROXY 환경 변수를 인식합니다
Pre-request 스크립트는 실행별로 스티키 세션을 생성하고, 국가를 매개변수화하며, 요청마다 헤더를 지정할 수 있습니다
환경별 국가 변수를 통한 195개국 이상 Geo 타겟팅
Web Scraping API + sendRequest 패턴을 통해 Postman Cloud Agent와 호환
동일한 Shifter 게이트웨이에서 HTTP, HTTPS, SOCKS5 프로토콜을 지원합니다

예시

Pre-Request Script: 실행별 동적 스티키 세션

수집 실행 시작 시 새로운 sid를 생성하여 프록시 사용자명에 삽입하세요. 각 실행은 깨끗한 레지덴셜 IP를 받고, 실행 내의 요청들은 해당 IP를 공유합니다.

// Collection-level Pre-request Script
//
// Runs once at the start of each collection / Newman run.

const sid = pm.variables.replaceIn("{{$randomAlphaNumeric}}").repeat(2).slice(0, 8);

pm.environment.set("shifter_sid", sid);

// Construct the Shifter username with country + sid + ttl
const country = pm.environment.get("country") || "us";
const user    = pm.environment.get("shifter_user");
const pass    = pm.environment.get("shifter_pass");

const proxyUser = `${user}-country-${country}-sid-${sid}-ttl-300`;
pm.environment.set("proxy_auth_basic",
  "Basic " + Buffer.from(`${proxyUser}:${pass}`).toString("base64"));

console.log("Shifter session:", sid, "country:", country);

// Every request in this run can now reference {{proxy_auth_basic}}
// in its Proxy-Authorization header (when using Postman's "Send via
// proxy" override on individual requests).

Newman CLI, 스크립트 컬렉션 실행

Newman은 Postman의 CLI입니다. Shifter를 환경 변수로 주입하면 컬렉션을 변경하지 않고도 CI / cron 기반 테스트 실행에서 레지덴셜 IP를 사용할 수 있습니다.

# Set Shifter as the system proxy for the Newman process
# (Newman picks up HTTP_PROXY / HTTPS_PROXY env vars automatically)

export HTTP_PROXY="customer-USERNAME-country-us-sid-ci-123ABC:PASSWORD@p.shifter.io:443"
export HTTPS_PROXY="$HTTP_PROXY"
export NO_PROXY="localhost,127.0.0.1"

newman run my-collection.postman_collection.json \
  --environment production.postman_environment.json \
  --reporters cli,json \
  --reporter-json-export results.json

# Or scope per-run with a one-liner:
HTTP_PROXY="http://USER:PASS@p.shifter.io:443" \
HTTPS_PROXY="http://USER:PASS@p.shifter.io:443" \
  newman run my-collection.postman_collection.json

# In a GitHub Actions step:
- name: Run Postman tests via Shifter
  env:
    HTTP_PROXY:  http://${{ secrets.SHIFTER_USER }}:${{ secrets.SHIFTER_PASS }}@p.shifter.io:443
    HTTPS_PROXY: http://${{ secrets.SHIFTER_USER }}:${{ secrets.SHIFTER_PASS }}@p.shifter.io:443
  run: newman run collection.json --environment env.json

환경별 프록시 (프로덕션 / 스테이징)

환경별로 다른 국가를 하나의 컬렉션에 모두 담습니다. 환경을 전환하면 Postman이 일치하는 Shifter 레지덴셜 풀을 사용합니다. 다른 설정 변경은 필요 없습니다.

// Environment: "Production-US"
{
  "values": [
    { "key": "shifter_user", "value": "customer-USERNAME", "type": "secret" },
    { "key": "shifter_pass", "value": "PASSWORD",          "type": "secret" },
    { "key": "country",      "value": "us" },
    { "key": "base_url",     "value": "https://example.com" }
  ]
}

// Environment: "Production-UK"
{
  "values": [
    { "key": "shifter_user", "value": "customer-USERNAME", "type": "secret" },
    { "key": "shifter_pass", "value": "PASSWORD",          "type": "secret" },
    { "key": "country",      "value": "uk" },
    { "key": "base_url",     "value": "https://example.co.uk" }
  ]
}

// Collection-level Pre-request Script (same script in both environments):
const proxy = {
  host:     "p.shifter.io",
  port:     443,
  username: `${pm.environment.get("shifter_user")}-country-${pm.environment.get("country")}-sid-${pm.collectionVariables.get("run_id")}`,
  password: pm.environment.get("shifter_pass"),
};

pm.environment.set("proxy_url", `http://${proxy.username}:${proxy.password}@${proxy.host}:${proxy.port}`);

console.log(`Routing through Shifter ${pm.environment.get("country")}`);

Postman Cloud Agent (로컬 설치 불필요)

Postman Cloud Agent는 Postman의 인프라에서 컬렉션을 실행하므로 데스크톱 프록시 설정을 따르지 않습니다. 해결 방법: Pre-request Script와 pm.sendRequest를 사용해 모든 아웃바운드 요청을 Shifter Web Scraping API로 라우팅하세요.

// Cloud Agent doesn't apply your desktop proxy settings,
// so wrap every outbound request in a call to the Shifter
// Web Scraping API from a Pre-request Script.

const targetUrl = pm.request.url.toString();
const country   = pm.environment.get("country") || "us";
const apiKey    = pm.environment.get("shifter_api_key");

const params = new URLSearchParams({
  api_key: apiKey,
  url:     targetUrl,
  country: country,
  render_js: "1",            // headless browser rendering
});

pm.sendRequest({
  url:    `https://scrape.shifter.io/v1?${params.toString()}`,
  method: "GET",
}, function (err, res) {
  if (err) { console.error(err); return; }
  pm.environment.set("forwarded_body",   res.text());
  pm.environment.set("forwarded_status", res.code);
});

// Tests assert against {{forwarded_body}} instead of the raw
// response — same shape as a real proxy hop, served from
// Shifter's residential pool.
자주 묻는 질문

자주 묻는 질문

Postman와 Shifter 사용에 관한 일반적인 질문.

설정 > 프록시 > '사용자 지정 프록시 구성 사용'. 호스트로 `p.shifter.io`를 입력하고 포트로 `443`을 입력한 다음 '인증 필요'를 체크하고 Shifter 사용자 이름(국가/sid 선택자 포함)과 비밀번호를 입력하세요. 그 순간부터 보내는 모든 요청은 Shifter를 통해 라우팅됩니다.

예. Newman은 표준 HTTP_PROXY 및 HTTPS_PROXY 환경 변수를 따릅니다. `newman run`을 실행하기 전에 이를 설정하면 모든 테스트가 Shifter를 통해 라우팅됩니다. 이는 CI 파이프라인에 프록시를 통합하는 가장 깔끔한 방법입니다.

새 sid를 생성하는(예: `pm.variables.replaceIn("{{$randomAlphaNumeric}}")`) 컬렉션 수준의 Pre-request Script를 사용하고 이를 환경 변수에 저장하세요. 프록시 사용자 이름에 해당 sid를 참조하면, 실행 중 모든 요청이 하나의 레지덴셜 IP를 공유하게 됩니다.

예. 환경별로 `country` 변수(us, uk, jp, de 등)를 설정하고, Shifter 프록시 URL을 생성하는 Pre-request Script에서 이를 참조하세요. 이제 환경을 전환하면 테스트가 실행되는 국가도 함께 전환됩니다. 동일한 컬렉션으로 다른 변경 사항 없이 가능합니다.

Postman Cloud Agent는 Postman의 인프라에서 실행되므로 데스크톱 프록시 설정을 적용하지 않습니다. 해결 방법: Pre-request Script에서 pm.sendRequest를 사용하여 Shifter Web Scraping API(scrape.shifter.io/v1?api_key=...&url=...)를 호출하고 응답을 환경 변수에 저장하세요. 이후 테스트는 이 변수들을 기준으로 검증합니다.

예. Postman Monitors는 Postman Cloud에서 실행되며 동일한 Cloud Agent 제약을 따릅니다. Cloud Agent 예제의 Web Scraping API 패턴을 사용하세요. 자체 호스팅 모니터의 경우, 자체 인프라에서 Newman을 실행하고 HTTP_PROXY를 Shifter로 설정한 다음 결과를 알림 스택으로 파이프하세요.

시작하기

Shifter 사용을 함께 시작하기 Postman

Shifter의 205M+ 레지덴셜 및 ISP 프록시를 통해 API를 테스트, 스크래핑, 모니터링하세요. Postman 데스크톱의 네이티브 프록시 지원, Newman CI 통합, 환경별 국가 전환을 제공합니다.

Shifter 무료로 체험하기몇 분 만에 설정. 언제든지 취소 가능.