多种代理解决方案
动态住宅代理
依托住宅代理的匿名性。我们提供按流量计费的服务选项,以满足不同用户的需求。
全球上亿IP
HTTP(S) & SOCKS5协议支持
无限并发会话与访问请求
无限住宅代理
真实住宅IP资源,不限制IP和流量,支持随机和黏性轮换。
静态住宅代理
高品质的静态住宅代理服务,源自值得信赖的互联网服务提供商
独享数据中心代理
高性能的数据中心IP,确保了网络的高可用性和低延迟,实现了卓越的连通稳定性。
Socks5代理
按IP数量收费的住宅代理,最具性价比的套餐
全球IP资源池 轻松获取公开数据
利用数据做出更好的决策
详细的API文档
我们的代理兼容各种代理软件和热门编程语言,您可以快捷地开展网络数据采集工作。
// demo.cpp : Define the entrance for the console application.
//
#include "stdafx.h"
#include "curl/curl.h"
#pragma comment(lib, "libcurl.lib")
//Under the CURLOPT_WRITEFUNCTION setting property, use the callback write_buff_data for processing
static size_t write_buff_data(char *buffer, size_t size, size_t nitems, void *outstream)
{
memcpy(outstream, buffer, nitems*size);
return nitems*size;
}
/*
Use http proxy
*/
int GetUrlHTTP(char *url, char *buff)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl)
{
curl_easy_setopt(curl, CURLOPT_PROXY,"http://proxy host:port");//Set proxy
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//void* buff will be passed to the fourth parameter of the callback function write_buff_data void* outstream
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//Under the CURLOPT_WRITEFUNCTION setting property, use the callback write_buff_data for processing
curl_easy_setopt(curl, CURLOPT_URL, url);//Set domain to visit
/* Abort if speed drops below 50 bytes/second for 10 seconds */
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);
curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);/*Highest download speed*/
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if (res == CURLE_OK){
return res;
}else {
printf("Error code:%d\n", res);
MessageBox(NULL, TEXT("Error in getting IP"), TEXT("assistant"), MB_ICONINFORMATION | MB_YESNO);
}
}
return res;
}
/*
Use socks5 proxy
*/
int GetUrlSocks5(char *url, char *buff)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl)
{
curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://Proxy host:port");//Set proxy
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);
curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);/*Highest download speed*/
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if (res == CURLE_OK) {
return res;
}
else {
printf("Error code:%d\n", res);
MessageBox(NULL, TEXT("Error in getting IP"), TEXT("assistant"), MB_ICONINFORMATION | MB_YESNO);
}
}
return res;
}
/*
Not use proxy
*/
int GetUrl(char *url, char *buff)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl)
{
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);
curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);/*Highest download speed*/
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if (res == CURLE_OK)
{
return res;
}
else {
printf("Error code:%d\n", res);
MessageBox(NULL, TEXT("Error in getting IP"), TEXT("assistant"), MB_ICONINFORMATION | MB_YESNO);
}
}
return res;
}
int main()
{
char *buff=(char*)malloc(1024*1024);
memset(buff, 0, 1024 * 1024);
GetUrl("http://baidu.com", buff);
printf("Not use proxy:%s\n", buff);
memset(buff, 0, 1024 * 1024);
GetUrlHTTP("http://baidu.com", buff);
printf("result of http:%s\n", buff);
memset(buff, 0,1024 * 1024);
GetUrlSocks5("http://baidu.com", buff);
printf("result of socks5:%s\n", buff);
free(buff);
Sleep(10 * 1000);//Wait 10 seconds to exit
return 0;
}
事件
博客新闻
© Copyright 2024 | blurpath.com.All rights reserved
由于政策原因,本站代理服务不支持在中国大陆使用
隐私政策
服务条款
Cookie协议
退货政策