代理整合指南及 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目前無法設置計劃。未收取任何費用。