지오 타겟팅
지오 타겟팅은 사용자 이름에 플래그를 추가하는 방식으로 요청 단위로 설정됩니다. 대시보드 변경도, 별도의 엔드포인트도 필요 없으며 모든 요청은 동일한 게이트웨이를 통과합니다.
플래그는 대시로 사용자 이름에 추가됩니다:
customer-USERNAME-country-<code>-region-<name>-city-<name>-asn-<number>값은 소문자로 작성합니다. 지역명과 도시명은 공백 대신 언더스코어를 사용합니다. 국가 코드는 ISO 3166-1 alpha-2 형식입니다.
사용 가능한 필터
섹션 제목: “사용 가능한 필터”| 플래그 | 값 | 예시 |
|---|---|---|
country | ISO 국가 코드 | country-us, country-gb, country-de |
region | 소문자 지역/주 슬러그 | region-california, region-new_south_wales |
city | 소문자 도시 슬러그 | city-new_york, city-los_angeles |
asn | ASN 번호 | asn-7922 (Comcast), asn-701 (Verizon) |
strict | true | strict-true (대체 동작 참조) |
플래그는 순서에 상관없이 조합할 수 있습니다:
customer-USERNAME-country-us-region-california-city-los_angelescustomer-USERNAME-country-gb-asn-2856customer-USERNAME-city-berlincurl -x customer-USERNAME-country-de-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/jsoncurl -x customer-USERNAME-country-us-region-california-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/jsoncurl -x customer-USERNAME-country-us-city-new_york-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/jsoncurl -x customer-USERNAME-country-us-asn-7922-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/json대체 동작
섹션 제목: “대체 동작”기본적으로 요청 시점에 전체 필터와 일치하는 IP가 없는 경우(예를 들어 잘 알려지지 않은 도시의 풀이 일시적으로 비어 있는 경우), 게이트웨이는 더 넓은 풀로 대체하여 요청이 정상적으로 완료되도록 합니다.
대체 동작을 사용하지 않고 대신 HTTP 502를 받으려면 strict-true를 추가하십시오. 정확한 지오 매칭이 요청 성공보다 중요한 경우 strict 매칭을 사용하십시오:
curl -x customer-USERNAME-country-us-city-new_york-strict-true-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \ https://ipinfo.io/json필터 없음
섹션 제목: “필터 없음”모든 플래그를 생략하면 전체 글로벌 풀에서 가져옵니다:
USERNAME이 경우에도 모든 요청은 다른 IP로 로테이션되며, 다만 지리적 제약이 없을 뿐입니다.