WOProxy
文档中心 / 开发者集成文档
← 返回用户中心

开发者集成文档

WOPROXY · 更新于 2026-08-04 · 阅读约 4 分钟

WOProxy 提供 HTTP(S) 与 SOCKS5 两类代理协议。在您的业务代码中,只需将请求的出口地址替换为代理主机与端口,并携带认证信息即可。以下为各语言最简单接入方式。

curl

curl -x http://us.woproxy.cc:7878 \
  -U yourusername-session-token1-country-us:yourpassword \
  http://ipinfo.io

Java

import java.net.*;

Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("us.woproxy.cc", 7878));
HttpURLConnection conn = (HttpURLConnection) new URL("http://ipinfo.io").openConnection(proxy);
conn.setRequestProperty("Proxy-Authorization", "Basic "
    + Base64.getEncoder().encodeToString(
        ("yourusername-session-token1-country-us:yourpassword").getBytes()));
System.out.println(new String(conn.getInputStream().readAllBytes()));

Python (requests)

import requests

proxies = {
    "http": "http://yourusername-session-token1-country-us:yourpassword@us.woproxy.cc:7878",
    "https":"http://yourusername-session-token1-country-us:yourpassword@us.woproxy.cc:7878",
}
resp = requests.get("http://ipinfo.io", proxies=proxies, timeout=20)
print(resp.text)

Node.js

const { HttpsProxyAgent } = require('https-proxy-agent');
const agent = new HttpsProxyAgent(
  'http://yourusername-session-token1-country-us:yourpassword@us.woproxy.cc:7878'
);
fetch('http://ipinfo.io', { agent }).then(r => r.text()).then(console.log);

认证与轮换参数

在用户名部分追加以下参数可灵活控制出口:

yourusername-session-abc123-sticky-600-country-us:yourpassword

API 令牌(批量获取)

在用户中心的「API 设置」中获取 API 令牌,用于调用批量代理接口(自动生成、列表、地区过滤等),适合程序化在大规模采集前一次性拉取代理列表,减少逐个请求解析开销。

💡 403 / 401 时请检查认证格式:确认用户名中的 Session 与地区参数拼写、尾部密码是否正确,以及协议是否选择 HTTP(S)。