账密认证
获取代理配置
配置参数说明
参数
说明
示例
会话类型
轮换IP
固定IP(黏性会话)
代理主机选择
主机
位置
建议使用场景
代理参数
参数名
是否必须
说明
示例
curl -x user:[email protected]:10000 "https://ipinfo.io"import requests
proxies = {
"http": "http://user:[email protected]:10000",
"https": "http://user:[email protected]:10000"
}
response = requests.get("https://ipinfo.io", proxies=proxies)
print(response.text)import java.net.InetSocketAddress;
import java.net.Proxy;
import okhttp3.*;
OkHttpClient client = new OkHttpClient.Builder()
.proxy(new Proxy(Proxy.Type.HTTP,
new InetSocketAddress("us.aproxy.cc", 10000)))
.proxyAuthenticator((route, response) -> {
String credential = Credentials.basic("user", "pass");
return response.request().newBuilder()
.header("Proxy-Authorization", credential)
.build();
})
.build();
Request request = new Request.Builder()
.url("https://ipinfo.io")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());$username = "user";
$password = "pass";
$proxy_address = "us.aproxy.cc";
$proxy_port = "10000";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://ipinfo.io/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_PROXY, $proxy_address);
curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $username . ":" . $password);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = curl_exec($ch);
echo $output;
curl_close($ch);using System;
using System.Net;
using System.Net.Http;
var proxy = new WebProxy {
Address = new Uri("http://us.aproxy.cc:10000"),
Credentials = new NetworkCredential("user", "pass"),
};
var httpClientHandler = new HttpClientHandler { Proxy = proxy };
var client = new HttpClient(handler: httpClientHandler);
var response = await client.GetAsync("https://ipinfo.io");
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);