-
管理

代理生成

证书

实例:

 

参数注释

参数 描述 必选
zone 代理池标识
region/st/c 地区标识:region-国家/st-州/c-城市 获取全部代码
sessid 需要固定一个ip时配置,用户自定义
sessiontime 搭配sessid使用,用于配置ip时效时间,最长不超过30分钟
keep-true 时效内IP不可用不自动更换IP

选择城市/州

要缩小到城市/州级别的定位范围, 城市/州需要添加参数。
例如,城市c-losangeles 意味着来自美国洛杉矶的代理;
   : st-california意味着来自美国加利福尼亚的代理;
Roxlabs支持很多城市/州,但无法保证100%覆盖您需要的城市。大多数受欢迎的城市都有很好的覆盖范围,并且有许多代理可供选择。
在此示例中,从美国洛杉矶的随机 IP 地址执行对 myip.roxlabs.io 的查询:

城市:curl -x pr.roxlabs.cn:4600 -U "user-Uername-c-losangeles-sessid-us1-sesstime-1:password"myip.roxlabs.io

州: curl -x pr.roxlabs.cn:4600 -U "user-Uername-st-california-sessid-us1-sesstime-1:password"myip.roxlabs.io

 

代理列表

编程访问

自动化示例

Golang 示例

proxy := "https://:@:4600"
url := "myip.roxlabs.io"
os.Setenv("HTTP_PROXY", proxy)
resp, err := http.Get(url)
...

Node.Js 示例 (got包)

const got = require('got');
const {
  HttpsProxyAgent
} = require('hpagent');
got('myip.roxlabs.io', {
  agent: {
    https: new HttpsProxyAgent({
      proxy: 'https://:@:4600'
    })
  }
}).then(respone => {
  console.log(respone.body);
}).catch(err => {
  console.log(err.response.body);
});

Node.Js 示例(request包)

const request = require('request');
const proxy = "https://:@:4600"
const url = "myip.roxlabs.io";
const proxiedRequest = request.defaults({
  'proxy': proxy
});

proxiedRequest.get(url, function(err, resp, body) {
  ...
});

Python 示例

import requests

http_proxy = ":@:4600"
https_proxy = ":@:4600"
url = "myip.roxlabs.io"

proxyDict = {
    "http": http_proxy,
    "https": https_proxy,
}

r = requests.get(url, proxies=proxyDict)
...

PHP 示例

$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "myip.roxlabs.io",
CURLOPT_PROXY => "https://:@:4600"
CURLOPT_FOLLOWLOCATION => 1,
CURLOPT_RETURNTRANSFER => 1,
));
$response = curl_exec($curl);
...

C# 示例

using System;
using System.IO;
using System.Net;
namespace packetstreamExample {
  class ProxyConnect {
    static void Main(string[] args) {
      string proxyUser = "";

      string proxyPass = "";

      WebProxy proxyObject = new WebProxy(":4600", true);
      proxyObject.Credentials = new NetworkCredential(proxyUser, proxyPass);
      WebRequest request = WebRequest.Create("myip.roxlabs.io");
      request.Proxy = proxyObject;
      HttpWebResponse response = (HttpWebResponse) request.GetResponse();
      Console.WriteLine(response.StatusDescription);
      Stream dataStream = response.GetResponseStream();
      StreamReader reader = new StreamReader(dataStream);
      string responseFromServer = reader.ReadToEnd();
      Console.WriteLine(responseFromServer);
      reader.Close();
      dataStream.Close();
      response.Close();
      ...
    }
  }
}

Java 示例

import java.net. * ;
import java.io. * ;
public class ProxyConnect {
  public static void main(String[] args) throws MalformedURLException,
  ProtocolException,
  IOException {
    final String authUser = "";

    final String authPassword = "";

    final String proxyHost = "";
    final int proxyPort = 4600;
    final String destURL = "myip.roxlabs.io";

    System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
    System.setProperty("jdk.http.auth.proxying.disabledSchemes", "");

    Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort));

    URL url = new URL(destURL);
    HttpURLConnection connection = (HttpURLConnection) url.openConnection(proxy);

    Authenticator.setDefault(new Authenticator() {@Override
      protected PasswordAuthentication getPasswordAuthentication() {
        if (getRequestorType().equals(RequestorType.PROXY)) {
          return new PasswordAuthentication(authUser, authPassword.toCharArray());
        }
        return super.getPasswordAuthentication();
      }
    });

    StringBuilder content;

    try (BufferedReader in =new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
      String line;
      content = new StringBuilder();

      while ((line = in.readLine()) != null) {
        content.append(line);
        content.append(System.lineSeparator());
      }

      System.out.println(content.toString());

    } catch(Throwable e) {
      System.err.println(e);
    } finally {
      connection.disconnect();
    }
  }
}