代理集成指南和 REST API
您需要的一切,以便将 ProxyVPN 代理连接到代码、浏览器和工具:主机、端口、用户名选项、可直接复制的示例和 REST API。
网关和端口
住宅、移动和无限制计划各使用一个网关。静态 ISP、数据中心和共享计划以 IP 列表形式提供,带有各自的端口。
住宅代理
gw.proxyvpn.liveHTTP 和 HTTPS 7700,SOCKS5 7701
移动代理
4g.proxyvpn.liveHTTP 和 HTTPS 7800,SOCKS5 7801
无限住宅代理
unl.proxyvpn.liveHTTP 和 HTTPS 7900,SOCKS5 7901
用户名选项
从我的服务中添加选项到用户名中。它们可以按此顺序组合。
-country-xx两位字母国家代码USER-country-us-city-name该国家的城市,小写,无空格USER-country-de-city-frankfurt-session-name保持相同的IP最长60分钟USER-country-gb-session-a1b2代码示例
将 USER 和 PASS 替换为您的登录信息。每个标签都是一个完整的示例。
curl -x http://USER-country-us:PASS@gw.proxyvpn.live:7700 https://api.ipify.org
# SOCKS5, sticky for up to 60 minutes
curl -x socks5h://USER-country-de-session-a1:PASS@gw.proxyvpn.live:7701 https://api.ipify.orgimport requests
proxy = "http://USER-country-gb:PASS@gw.proxyvpn.live:7700"
r = requests.get("https://api.ipify.org?format=json",
proxies={"http": proxy, "https": proxy}, timeout=30)
print(r.json())import { ProxyAgent, fetch } from "undici";
const agent = new ProxyAgent("http://USER-country-jp:PASS@gw.proxyvpn.live:7700");
const res = await fetch("https://api.ipify.org?format=json", { dispatcher: agent });
console.log(await res.json());from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://gw.proxyvpn.live:7700",
"username": "USER-country-fr-city-paris",
"password": "PASS",
})
page = browser.new_page()
page.goto("https://api.ipify.org")
print(page.content())# settings.py
DOWNLOADER_MIDDLEWARES = {
"scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware": 110,
}
# in your spider
yield scrapy.Request(url, meta={
"proxy": "http://USER-country-us:PASS@gw.proxyvpn.live:7700"
})# list plans (no key needed)
curl https://proxyvpn.live/api/v1/plans
# buy a plan from credit
curl -X POST https://proxyvpn.live/api/v1/orders \
-H "Authorization: Bearer pvk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"plan":"isp-25","country":"us"}'
# your services and logins
curl https://proxyvpn.live/api/v1/services -H "Authorization: Bearer pvk_YOUR_KEY"REST API
基础 URL https://proxyvpn.live/api/v1。将密钥作为 Authorization: Bearer pvk_... 发送。在账户区域创建密钥。每个密钥每分钟 300 次请求。
| 方法 | 路径 | 密钥 | 返回 |
|---|---|---|---|
| GET | /api/v1/plans | 否 | 每个计划及其价格、数量和时长 |
| GET | /api/v1/locations | 否 | 国家、城市以及每个城市销售的产品 |
| GET | /api/v1/balance | 是 | 您的余额(美元) |
| POST | /api/v1/orders | 是 | 从余额购买计划:{plan, country} |
| GET | /api/v1/services | 是 | 您的计划及其登录信息、IP列表和结束日期 |
| GET | /api/v1/services/{id} | 是 | 一个计划 |
错误
401
unauthorized缺少或错误的API密钥。未扣款。402
funds余额低于计划价格。未扣款。400
bad_plan / bad_country未知计划,或产品未销售的国家。未扣款。429
rate_limited一个密钥每分钟超过300次请求。503
network当前无法设置计划。未扣款。