快速入门
通过 Shifter 网关路由一个 HTTP(S) 请求,以验证您的套餐是否已生效,并查看住宅 IP 的实际运行效果。
-
登录以获取凭据
在 shifter.io/panel 登录,并打开 Residential Proxies 部分。复制您的用户名和密码,并确认网关地址为
p.shifter.io:443。 -
通过网关路由请求
替换
USERNAME和PASSWORD,然后选择您使用的语言。Terminal window curl -x customer-USERNAME-country-us-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \https://ipinfo.io/jsonimport requestsproxies = {"http": "customer-USERNAME-country-us-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443","https": "customer-USERNAME-country-us-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443",}r = requests.get("https://ipinfo.io/json", proxies=proxies)print(r.text)import fetch from 'node-fetch';import { HttpsProxyAgent } from 'https-proxy-agent';const agent = new HttpsProxyAgent('customer-USERNAME-country-us-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443');const res = await fetch('https://ipinfo.io/json', { agent });console.log(await res.text()); -
验证响应
您应该会看到一个美国住宅 IP 地址。用户名中的
sid-9f3a2b7c会将该 IP 固定为默认的 120 秒 TTL;ttl-600会将其延长至 600 秒。移除sid标志(即仅保留customer-USERNAME-country-us)可让每次请求都轮换到一个全新的 IP。 -
添加会话保持或更精确的定位
在用户名中添加
sid-abc可保持同一个 IP(默认生命周期为 120 秒)。在sid旁添加ttl-600可将其延长至 10 分钟。使用city-los_angeles定位城市,使用region-california定位地区,或使用asn-7922定位网络。详情请参阅 Sessions 和 Geo-targeting。