亚洲日韩va无码中文字幕,亚洲国产美女精品久久久久,亚洲男同gay在线观看,亚洲乱亚洲乱妇,亚洲精品综合一区二区

new
IPv6代理
微信客服
返回頂部

全球IP代理服務商
千萬優(yōu)質(zhì)動態(tài)住宅

匯集全球200+國家地區(qū)的真實住宅IP,支持HTTP/HTTPS/SOCKS5代理協(xié)議,讓數(shù)據(jù)采集更簡單。

注:本產(chǎn)品需在境外網(wǎng)絡環(huán)境下使用
roxlabs代理http
  • 1000萬+IP

    純凈住宅代理

  • 200+國家地區(qū)

    全球覆蓋

  • 99.9%

    高可用率

  • 24/7

    實時技術支持

Roxlabs代理的核心優(yōu)勢

roxlabs代理http

不限并發(fā)會話

Roxlabs支持無限并發(fā)會話,高帶寬,無需額外費用,滿足您的業(yè)務拓展需求。
roxlabs代理http

城市級定位

Roxlabs提供國家地區(qū)、城市和州級精準定位IP,支持HTTP(S)/Socks5代理協(xié)議。
roxlabs代理http

流量不過期

Roxlabs動態(tài)住宅代理的流量套餐不限使用時間,無需擔心剩余流量過期。
住宅IP代理

代理快速響應

Roxlabs代理高帶寬,IP資源池24小時去重,保障動態(tài)住宅代理快速運行,平均響應時間為0.6秒。技術團隊全程監(jiān)測系統(tǒng),客服團隊隨時解答用戶問題。

自定義IP時效

Roxlabs動態(tài)住宅支持1-1440分鐘自定義IP時效,可以根據(jù)業(yè)務需求自主設定會話時長。支持HTTP/HTTPS/SOCKS5代理協(xié)議,自由設置API提取導出格式。

數(shù)據(jù)中心代理IP
數(shù)據(jù)采集IP代理

數(shù)據(jù)統(tǒng)計中心

Roxlabs個人中心實時統(tǒng)計代理使用數(shù)據(jù),您可以隨時查看賬戶余額信息和流量使用情況,支持添加多個IP白名單和認證賬戶,更有IP管理、認證賬戶管理等功能。

全球熱門代理地區(qū)

1000萬+純凈住宅IP
覆蓋200+國家地區(qū)
HTTP/HTTPS/SOCKS5
美國靜態(tài)代理IP
美國
2,106,985 IPs
印度靜態(tài)代理IP
印度
1,654,358 IPs
英國靜態(tài)代理IP
英國
476,412 IPs
土耳其靜態(tài)代理IP
土耳其
89,398 IPs
加拿大靜態(tài)代理IP
加拿大
384,218 IPs
巴西靜態(tài)代理IP
巴西
421,498 IPs
意大利靜態(tài)代理IP
意大利
921,546 IPs
馬來西亞靜態(tài)代理IP
馬來西亞
152,784 IPs
德國靜態(tài)代理IP
德國
421,362 IPs
印度尼西亞靜態(tài)代理IP
印度尼西亞
132,158 IPs
越南靜態(tài)代理IP
越南
148,628 IPs
法國靜態(tài)代理IP
法國
215,688 IPs
更多地區(qū)資源
加拿大
384,218 IPs
美國
2,106,985 IPs
巴西
421,498 IPs
英國
476,412 IPs
法國
215,688 IPs
意大利
921,546 IPs
越南
148,628 IPs
德國
421,362 IPs
土耳其
89,398 IPs
印度
1,654,358 IPs
馬來西亞
152,784 IPs
印度尼西亞
132,158 IPs

優(yōu)質(zhì)大數(shù)據(jù)采集解決方案

高性價比的代理資源,為企業(yè)提供完善代理服務
平均 99.2% 成功率
24/7 實時支持
城市級定位
  • 動態(tài)住宅代理

    便于大數(shù)據(jù)采集的高匿輪轉住宅IP

    1000萬+動態(tài)住宅IP
    查看價格
    無限并發(fā)會話
    城市級精準定位
    流量不過期
  • 靜態(tài)住宅代理

    99.9%正常穩(wěn)定運行的長效住宅IP

    50萬+靜態(tài)住宅
    查看價格
    原生獨享IP
    不限流量
    支持HTTP(S)/Socks5代理協(xié)議
  • 獨享數(shù)據(jù)中心代理

    便于獲取的優(yōu)質(zhì)高速長效機房IP

    60萬+獨享數(shù)據(jù)中心
    查看價格
    個人專享IP
    不限流量
    支持HTTP(S)/Socks5代理協(xié)議

免費定制專屬解決方案

專享代理資源池
高性價比價格,節(jié)約企業(yè)成本
自定義IP時效,滿足多種業(yè)務需求
一對一客戶服務,隨時解決問題
技術團隊全程監(jiān)測,保障系統(tǒng)穩(wěn)定運行

Roxlabs常見應用場景

為跨境電商、社交媒體、網(wǎng)絡安全、市場調(diào)研等行業(yè)提供專業(yè)的大數(shù)據(jù)采集解決方案

數(shù)據(jù)采集

輕松實現(xiàn)高效數(shù)據(jù)采集,提高工作效率和質(zhì)量

SEO監(jiān)測

實時掌握有關競爭性SEO實踐和策略的數(shù)據(jù)

競品追蹤

及時獲取新的競品信息及定價數(shù)據(jù)

廣告驗證

保障產(chǎn)品在全球范圍內(nèi)的廣告投放準確性

品牌保護

防止假冒偽劣品牌損害正品形象和利益

市場調(diào)查

收集市場真實有效數(shù)據(jù),保持競爭優(yōu)勢

賬號管理

創(chuàng)建和管理不同平臺的賬號,滿足多任務需求

網(wǎng)絡安全

避免遭受網(wǎng)絡惡意攻擊,保護隱私安全

網(wǎng)站測試

幫助測試網(wǎng)站參數(shù),保障網(wǎng)站本地化

旅游聚合

獲取優(yōu)惠的機票酒店價格,節(jié)約旅游成本

Roxlabs多種代碼輕松集成

各種常見的爬蟲編程語言代碼示例以及API參數(shù)注釋確保您可以快速開始使用Roxlabs
C++
Go
Node.js
PHP
JAVA
Python
python-selenium
                            
    from selenium import webdriver
    import requests

    def seleniumSetUP(ip,port):
        # 設置Chrome驅(qū)動程序的路徑
        chromedriver_path = './chromedriver.exe'
        # 創(chuàng)建Chrome瀏覽器實例
        chrome_options = webdriver.ChromeOptions()
        browser = webdriver.Chrome(chromedriver_path, chrome_options=chrome_options)
        # 配置獲取到的ip和port
        chrome_options.add_argument(f'--proxy-server=http://{ip}:{port}')
        # 使用代理訪問
        browser.get('http://ipinfo.io')
        print(browser.page_source)

    if __name__ == '__main__':
        # 獲取代理的url,一次僅獲取一條
        porxyUrl = "http://api.tq.roxlabs.cn/getProxyIp?num=1&return_type=txt&lb=1&sb=0&flow=1®ions=&protocol=http"
        # 訪問并獲取代理
        ipInfo = requests.get(porxyUrl)
        info = ipInfo.json()["data"]
        # 解析json,獲取代理服務器地址
        ip = info[0]["ip"]
        # 解析json,獲取代理的端口
        port = info[0]["port"]
        # 獲取到的代理信息傳入到selenium中進行配置
        seleniumSetUP(ip,port)
                            
                        
                            
    # coding=utf-8
    # !/usr/bin/env python
    import json
    import threading
    import time
    import requests as rq

    # 設置請求頭
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0",
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2",
        "Accept-Encoding": "gzip, deflate, br"
    }
    # 測試鏈接
    testUrl = 'https://ipinfo.io'


    # 核心業(yè)務
    def testPost(host, port):
        # 配置獲取到的ip,port
        proxies = {
            # host  api獲取到的代理服務器地址
            # port  api獲取到的端口
            'http': 'http://{}:{}'.format(host, port),
            'https': 'http://{}:{}'.format(host, port),
        }
        while True:
            try:
                # 配置代理后測試
                res = rq.get(testUrl, proxies=proxies, timeout=5)
                # print(res.status_code)
                # 打印請求結果
                print(res.status_code, "***", res.text)
                break
            except Exception as e:
                print(e)
                break
        return


    class ThreadFactory(threading.Thread):
        def __init__(self, host, port):
            threading.Thread.__init__(self)
            self.host = host
            self.port = port

        def run(self):
            testPost(self.host, self.port)


    # 提取代理的鏈接  json類型的返回值
    tiqu = '提取鏈接'

    while 1 == 1:
        # 每次提取10個,放入線程中
        resp = rq.get(url=tiqu, timeout=5)
        try:
            if resp.status_code == 200:
                dataBean = json.loads(resp.text)
            else:
                print("獲取失敗")
                time.sleep(1)
                continue
        except ValueError:
            print("獲取失敗")
            time.sleep(1)
            continue
        else:
            # 解析json數(shù)組,獲取ip和port
            print("code=", dataBean["code"])
            code = dataBean["code"]
            if code == 0:
                threads = []
                for proxy in dataBean["data"]:
                    threads.append(ThreadFactory(proxy["ip"], proxy["port"]))
                for t in threads:  # 開啟線程
                    t.start()
                    time.sleep(0.01)
                for t in threads:  # 阻塞線程
                    t.join()
        # break
        time.sleep(1)
                            
                        
                            
    #!/usr/bin/env node
    require('request-promise')({
        url: 'https://ipinfo.io',//請求url
        proxy: 'http://ip:port',//代理服務器地址:端口
        })
    .then(function(data){ console.log(data); },
        function(err){ console.error(err); });
                            
                        
                            
    <?php
    //代理IP設置
    $ip = "代理服務器地址";//示例:192.168.0.1
    $port = "端口";//示例:4600
    // 要訪問的目標頁面
    $targetUrl = "http://baidu.com";
    // 代理服務器
    $proxyServer = "http://$ip:$port";

    // 隧道身份信息
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $targetUrl);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    // 設置代理服務器
    curl_setopt($ch, CURLOPT_PROXYTYPE, 0); //http
    // curl_setopt($ch, CURLOPT_PROXYTYPE, 5); //sock5
    curl_setopt($ch, CURLOPT_PROXY, $proxyServer);

    // 設置隧道驗證信息
    curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727;)");
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
    curl_setopt($ch, CURLOPT_TIMEOUT, 5);
    curl_setopt($ch, CURLOPT_HEADER, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch);
    $err = curl_error($ch);

    curl_close($ch);

    var_dump($err);
    var_dump($result);
                            
                        
                            
        package main

        import (
            "context"
            "fmt"
            "io/ioutil"
            "net"
            "net/http"
            "net/url"
            "strings"
            "time"
        
            "golang.org/x/net/proxy"
        )
        
        // 代理IP設置
        var ip = "代理服務器"   //示例:192.168.0.1
        var port = "端口" //示例:4600
        // 代理服務器
        var proxyServer = "http://" + ip + ":" + port
        
        // 測試地址
        var testApi = "https://ipinfo.io"
        
        func main() {
            var proxyIP = proxyServer
            go httpProxy(proxyIP, "", "")
            go Socks5Proxy(proxyIP, "", "")
            time.Sleep(time.Minute)
        }
        
        // http代理
        func httpProxy(proxyUrl, user, pass string) {
            defer func() {
                if err := recover(); err != nil {
                    fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), "http", "response:", err)
                }
            }()
            urli := url.URL{}
        
            if !strings.Contains(proxyUrl, "http") {
                proxyUrl = fmt.Sprintf("http://%s", proxyUrl)
            }
        
            urlProxy, _ := urli.Parse(proxyUrl)
            if user != "" && pass != "" {
                urlProxy.User = url.UserPassword(user, pass)
            }
        
            client := &http.Client{
                Transport: &http.Transport{
                    Proxy: http.ProxyURL(urlProxy),
                },
            }
            rqt, err := http.NewRequest("GET", testApi, nil)
            if err != nil {
                panic(err)
                return
            }
            response, err := client.Do(rqt)
            if err != nil {
                panic(err)
                return
            }
        
            defer response.Body.Close()
            body, _ := ioutil.ReadAll(response.Body)
            fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), proxyUrl, "【http success】", "response:", response.Status, string(body))
        
            return
        }
        
        // socks5代理
        func Socks5Proxy(proxyUrl, user, pass string) {
        
            defer func() {
                if err := recover(); err != nil {
                    fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), proxyUrl, "response:", err)
                }
            }()
        
            var userAuth proxy.Auth
            if user != "" && pass != "" {
                userAuth.User = user
                userAuth.Password = pass
            }
            dialer, err := proxy.SOCKS5("tcp", proxyUrl, &userAuth, proxy.Direct)
            if err != nil {
                panic(err)
            }
            httpClient := &http.Client{
                Transport: &http.Transport{
                    DialContext: func(ctx context.Context, network, addr string) (conn net.Conn, err error) {
                        return dialer.Dial(network, addr)
                    },
                },
                Timeout: time.Second * 10,
            }
        
            if resp, err := httpClient.Get(testApi); err != nil {
                panic(err)
            } else {
                defer resp.Body.Close()
                body, _ := ioutil.ReadAll(resp.Body)
                fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), proxyUrl, "【socks5 success】", "response:", string(body))
            }
        }                                
                            
                        
                            
    package demo;

    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.net.Proxy;
    
    /**
        * compile 'com.squareup.okhttp3:okhttp:4.9.3'
        */
    class ApiProxyJava {
        public static void main(String[] args) throws IOException {
            testHttpWithOkHttp();
            testSocks5WithOkHttp();
        }
    
        /**
            * http代理
            */
        public static void testHttpWithOkHttp() throws IOException {
            //定義要訪問的URL
            String url = "https://ipinfo.io";
            //創(chuàng)建一個HTTP類型的代理對象,設置代理服務器IP地址和端口號:
            Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("ip", "port"));//這里的 "ip" 和 "port"應替換為代理服務器地址和端口。
            //構建一個OkHttpClient實例,并配置好HTTP代理:
            OkHttpClient client = new OkHttpClient().newBuilder().proxy(proxy).build();
            //發(fā)送GET請求并獲取響應:
            Request request = new Request.Builder().url(url).build();
            okhttp3.Response response = client.newCall(request).execute();
            //獲取并打印響應內(nèi)容
            String responseString = response.body().string();
            System.out.println(responseString);
        }
    
        /**
            * SOCKS5代理
            */
        public static void testSocks5WithOkHttp() throws IOException {
            //定義要訪問的URL
            String url = "https://ipinfo.io";
            //創(chuàng)建一個SOCKS類型的代理對象,設置代理服務器IP地址和端口號:
            Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("ip", "port"));//這里的 "ip" 和 "port"應替換為實際的SOCKS代理服務器地址和端口。
            //構建一個OkHttpClient實例,并配置好SOCKS代理:
            //這里使用了SOCKS代理,這意味著所有的網(wǎng)絡流量(包括TCP連接)都將通過這個SOCKS代理進行轉發(fā)。
            OkHttpClient client = new OkHttpClient().newBuilder().proxy(proxy).build();
            //發(fā)送GET請求并獲取響應:
            Request request = new Request.Builder().url(url).build();
            okhttp3.Response response = client.newCall(request).execute();
            //獲取并打印響應內(nèi)容:
            String responseString = response.body().string();
            System.out.println(responseString);
        }
    }                                
                            
                        
                            
    // demo.cpp : 定義控制臺應用程序的入口點。
    //
    
    #include "stdafx.h"
    #include "curl/curl.h"
    #pragma comment(lib, "libcurl.lib")
    
    //在CURLOPT_WRITEFUNCTION設置屬性下,使用回調(diào)write_buff_data進行處理
    static size_t write_buff_data(char *buffer, size_t size, size_t nitems, void *outstream)
    {
        memcpy(outstream, buffer, nitems*size);
        return nitems*size;
    }
    
    /*
    使用http代理
    */
    int GetUrlHTTP(char *url, char *buff)
    {
        CURL *curl;
        CURLcode res;
        curl = curl_easy_init();
        if (curl)
        {
            curl_easy_setopt(curl, CURLOPT_PROXY,"http://代理服務器地址:端口");//設置代理
            curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//void* buff 將會傳遞給回調(diào)函數(shù)write_buff_data的第四個參數(shù) void* outstream
            curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//在CURLOPT_WRITEFUNCTION設置屬性下,使用回調(diào)write_buff_data進行處理
            curl_easy_setopt(curl, CURLOPT_URL, url);//設置訪問的域名
            /* 如果在10秒內(nèi)速度低于50個字節(jié)/秒,則中止 */
            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);/*下載最高速度*/
            res = curl_easy_perform(curl);
            curl_easy_cleanup(curl);
            if (res == CURLE_OK){
                return res;
            }else {
                printf("錯誤代碼:%d\n", res);
                MessageBox(NULL, TEXT("獲取IP錯誤"), TEXT("助手"), MB_ICONINFORMATION | MB_YESNO);
            }
        }
        return res;
    }
    /*
    使用socks5代理
    */
    int GetUrlSocks5(char *url, char *buff)
    {
        CURL *curl;
        CURLcode res;
        curl = curl_easy_init();
        if (curl)
        {
            curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://代理服務器地址:端口");//設置代理
            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);/*下載最高速度*/
            res = curl_easy_perform(curl);
            curl_easy_cleanup(curl);
            if (res == CURLE_OK) {
                return res;
            }
            else {
                printf("錯誤代碼:%d\n", res);
                MessageBox(NULL, TEXT("獲取IP錯誤"), TEXT("助手"), MB_ICONINFORMATION | MB_YESNO);
            }
        }
        return res;
    }
    /*
    不使用代理
    */
    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);/*下載最高速度*/
            res = curl_easy_perform(curl);
            curl_easy_cleanup(curl);
            if (res == CURLE_OK)
            {
                return res;
            }
            else {
                printf("錯誤代碼:%d\n", res);
                MessageBox(NULL, TEXT("獲取IP錯誤"), TEXT("助手"), 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("不使用代理:%s\n", buff);
    
        memset(buff, 0, 1024 * 1024);
        GetUrlHTTP("http://baidu.com", buff);
        printf("http結果:%s\n", buff);
    
        memset(buff, 0,1024 * 1024);
        GetUrlSocks5("http://baidu.com", buff);
        printf("socks5結果:%s\n", buff);
    
        free(buff);
        Sleep(10 * 1000);//等待10秒退出
        
        return 0;
    }                                
                            
                        
C++
Go
Node.js
PHP
JAVA
Python
python-selenium
                            
    '''
    注意:本方法需要安裝seleniumwire庫  pip install selenium-wire
    其他情況下 可能需要配合selenium的webdriver使用  即selenium和seleniumwire都要導入
    使用seleniumwire庫的目的就是減少代碼量和無意義的插件使用,方便快捷
    '''
    
    
    from seleniumwire import webdriver
    
    # selenium-wire 代理設置
    # username 用戶名
    # password 密碼
    # host 域名
    # port 端口
    seleniumwire_options = {
        'proxy': {
            'http': 'http://myusername:password@host:port',
            'https': 'http://myusername:password@host:port',
            'no_proxy': 'localhost,127.0.0.1'
        }
    }
    
    # other Chrome options
    chrome_options = webdriver.ChromeOptions()
    # 設置無頭
    chrome_options.add_argument('--headless')
    # 忽視ssl報錯
    chrome_options.add_argument('--ignore-ssl-errors')
    driver = webdriver.Chrome('chromedriver', options=chrome_options, seleniumwire_options=seleniumwire_options)
    driver.get('https://ipinfo.io')                            
                            
                        
                            
    '''
    導入thread,time,request包,
    實現(xiàn)多線程控制,等待,http請求
    '''
    import _thread
    import time
    import requests
    
    # 設置請求頭
    headers = {
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 MicroMessenger/6.5.19 NetType/4G Language/zh_TW",
    }
    
    # 測試地址
    mainUrl = 'https://ipinfo.io'
    
    def testUrl():
        # 設置帳密代理
        proxy = {
            'http': 'http://認證賬戶名:認證賬戶密碼@代理服務器地址:代理服務器端口',
            'https': 'http://認證賬戶名:認證賬戶密碼@代理服務器地址:代理服務器端口',
        }
        try:
            res = requests.get(mainUrl, headers=headers, proxies=proxy, timeout=10)
            print(res.status_code, res.text)
        except Exception as e:
            print("訪問失敗", e)
            pass
    
    # 開啟10個線程進行測試
    for i in range(0, 10):
        _thread.start_new_thread(testUrl, ())
        time.sleep(0.1)
    
    time.sleep(10)
                            
                        
                            
    #!/usr/bin/env node
    require('request-promise')({
        url: 'https://ipinfo.io',//請求url
        proxy: 'http://???:????@pr.roxlabs.cn:4600',//認證賬戶名:認證賬戶密碼@代理地址
        })
    .then(function(data){ console.log(data); },
        function(err){ console.error(err); });
                            
                        
                            
    <?php
    //賬密設置
    $user = "認證帳戶名";
    $password = "認證賬戶密碼";
    // 要訪問的目標頁面
    $targetUrl = "http://baidu.com";
    // 代理服務器
    $proxyServer = "代理地址";  //示例:xxx.pr.roxlabs.cn:4600;
    $proxyUserPwd = "$user:$password";

    // 隧道身份信息
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $targetUrl);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    // 設置代理服務器
    curl_setopt($ch, CURLOPT_PROXYTYPE, 0); //http
    // curl_setopt($ch, CURLOPT_PROXYTYPE, 5); //sock5
    curl_setopt($ch, CURLOPT_PROXY, $proxyServer);

    // 設置隧道驗證信息
    curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727;)");
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
    curl_setopt($ch, CURLOPT_TIMEOUT, 5);
    curl_setopt($ch, CURLOPT_HEADER, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyUserPwd);
    $result = curl_exec($ch);
    $err = curl_error($ch);

    curl_close($ch);

    var_dump($err);
    var_dump($result);            
                            
                        
                            
    package main

    import (
        "context"
        "fmt"
        "io/ioutil"
        "net"
        "net/http"
        "net/url"
        "strings"
        "time"
    
        "golang.org/x/net/proxy"
    )
    
    // 賬密設置
    var account = "認證帳戶名"
    var password = "認證賬戶密碼"
    
    // 代理服務器
    var proxyServer = "代理地址"  //示例:xxx.pr.roxlabs.cn:4600;
    
    // 測試地址
    var testApi = "https://ipinfo.io"
    
    func main() {
        go httpProxy(proxyServer, account, password)
        go Socks5Proxy(proxyServer, account, password)
    
        time.Sleep(time.Minute)
    }
    
    // http代理
    func httpProxy(proxyUrl, user, pass string) {
        defer func() {
            if err := recover(); err != nil {
                fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), "http", "response:", err)
            }
        }()
        urli := url.URL{}
    
        if !strings.Contains(proxyUrl, "http") {
            proxyUrl = fmt.Sprintf("http://%s", proxyUrl)
        }
    
        urlProxy, _ := urli.Parse(proxyUrl)
        if user != "" && pass != "" {
            urlProxy.User = url.UserPassword(user, pass)
        }
    
        client := &http.Client{
            Transport: &http.Transport{
                Proxy: http.ProxyURL(urlProxy),
            },
        }
        rqt, err := http.NewRequest("GET", testApi, nil)
        if err != nil {
            panic(err)
            return
        }
        response, err := client.Do(rqt)
        if err != nil {
            panic(err)
            return
        }
    
        defer response.Body.Close()
        body, _ := ioutil.ReadAll(response.Body)
        fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), proxyUrl, "【http success】", "response:", response.Status, string(body))
    
        return
    }
    
    // socks5代理
    func Socks5Proxy(proxyUrl, user, pass string) {
    
        defer func() {
            if err := recover(); err != nil {
                fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), proxyUrl, "response:", err)
            }
        }()
    
        var userAuth proxy.Auth
        if user != "" && pass != "" {
            userAuth.User = user
            userAuth.Password = pass
        }
        dialer, err := proxy.SOCKS5("tcp", proxyUrl, &userAuth, proxy.Direct)
        if err != nil {
            panic(err)
        }
        httpClient := &http.Client{
            Transport: &http.Transport{
                DialContext: func(ctx context.Context, network, addr string) (conn net.Conn, err error) {
                    return dialer.Dial(network, addr)
                },
            },
            Timeout: time.Second * 10,
        }
    
        if resp, err := httpClient.Get(testApi); err != nil {
            panic(err)
        } else {
            defer resp.Body.Close()
            body, _ := ioutil.ReadAll(resp.Body)
            fmt.Println(time.Now().Format("2006-01-02 15:04:05 07"), proxyUrl, "【socks5 success】", "response:", string(body))
        }
    }                                
                            
                        
                            
    package demo;

    import okhttp3.Credentials;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.net.PasswordAuthentication;
    import java.net.Proxy;
    
    /**
        * compile 'com.squareup.okhttp3:okhttp:4.9.3'
        */
    class AutProxyJava {
        public static void main(String[] args) throws IOException {
            testWithOkHttp();
    
            testSocks5WithOkHttp();
        }
    
        /**
            * http代理
            */
        public static void testWithOkHttp() throws IOException {
            String url = "https://ipinfo.io";//請求地址
            //創(chuàng)建一個HTTP類型的代理對象,指定代理服務器的主機名和端口號
            Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("host", "port"));//這里用到的"host"和"port"應替換為代理服務器地址和端口。
            // 構建一個自定義的OkHttpClient實例,設置代理服務器并添加一個代理認證器(proxyAuthenticator):
            OkHttpClient client = new OkHttpClient().newBuilder().proxy(proxy).proxyAuthenticator((route, response) -> {
                // 在這里生成Basic認證的憑證字符串
                String credential = Credentials.basic("account", "password");//此處的賬號密碼 "account" 和 "password" 應替換為認證賬戶名和認證賬戶密碼。
                // 如果代理服務器需要身份驗證,則在請求頭中添加認證信息
                return response.request().newBuilder()
                        .header("Proxy-Authorization", credential)
                        .build();
            }).build();
    
            //發(fā)送GET請求并獲取響應:
            Request request = new Request.Builder().url(url).build();
            okhttp3.Response response = client.newCall(request).execute();
            //獲取并打印響應內(nèi)容:
            String responseString = response.body().string();
            System.out.println(responseString);
        }
    
        /**
            * Socks5代理
            */
        public static void testSocks5WithOkHttp() throws IOException {
            //請求地址
            String url = "https://ipinfo.io";
            //創(chuàng)建一個SOCKS類型的代理對象,設置實際的代理服務器主機名和端口號:
            Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("host", "port"));//這里用到的"host"和"port"應替換為代理服務器地址和端口。
            //設置全局默認的認證器(Authenticator),用于處理所有網(wǎng)絡連接需要的基本身份驗證。這里預設了一個用戶名和密碼:
            java.net.Authenticator.setDefault(new java.net.Authenticator() {
                private PasswordAuthentication authentication =
                        new PasswordAuthentication("account", "password".toCharArray());//此處的賬號密碼 "account" 和 "password" 應替換為認證賬戶名和認證賬戶密碼。
    
                @Override
                protected PasswordAuthentication getPasswordAuthentication() 
            });
            //構建OkHttpClient實例,配置好SOCKS代理:
            OkHttpClient client = new OkHttpClient().newBuilder().proxy(proxy).build();
            //發(fā)送GET請求并獲取響應:
            Request request = new Request.Builder().url(url).build();
            okhttp3.Response response = client.newCall(request).execute();
            //獲取并打印響應內(nèi)容:
            String responseString = response.body().string();
            System.out.println(responseString);
        }
    }
                            
                        
                            
    // demo.cpp : 定義控制臺應用程序的入口點。
    //
    
    #include "stdafx.h"
    #include "curl/curl.h"
    #pragma comment(lib, "libcurl.lib")
    //curl 回調(diào)函數(shù)
    static size_t write_buff_data(char *buffer, size_t size, size_t nitems, void *outstream)
    {
        memcpy(outstream, buffer, nitems*size);
        return nitems*size;
    }
    
    /*
    使用http代理
    */
    int GetUrlHTTP(char *url, char *buff)
    {
        CURL *curl;
        CURLcode res;
        curl = curl_easy_init();
        if (curl)
        {
            curl_easy_setopt(curl, CURLOPT_PROXY,"http://代理服務器地址:端口");//設置http代理地址
            curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "認證賬戶名:認證賬戶密碼");//認證賬戶名及密碼,以":"分隔
            curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//設置讀寫緩存
            curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//設置回調(diào)函數(shù)
            curl_easy_setopt(curl, CURLOPT_URL, url);//設置url地址
            curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//設置一個長整形數(shù),控制多少秒傳送CURLOPT_LOW_SPEED_LIMIT規(guī)定的字節(jié)數(shù)
            curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//設置一個長整形數(shù),控制傳送多少字節(jié)
            curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);//下載最高速度
    
            res = curl_easy_perform(curl);
            curl_easy_cleanup(curl);
            if (res == CURLE_OK){
                return res;
            }else {
                printf("錯誤代碼:%d\n", res);
                MessageBox(NULL, TEXT("獲取IP錯誤"), TEXT("助手"), MB_ICONINFORMATION | MB_YESNO);
            }
        }
        return res;
    }
    /*
    使用socks5代理
    */
    int GetUrlSocks5(char *url, char *buff)
    {
        CURL *curl;
        CURLcode res;
        curl = curl_easy_init();
        if (curl)
        {
            curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://代理服務器地址:端口");//設置socks5代理地址
            curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "認證賬戶名:認證賬戶密碼");//認證賬戶名及密碼,以":"分隔
            curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//設置讀寫緩存
            curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//設置回調(diào)函數(shù)
            curl_easy_setopt(curl, CURLOPT_URL, url);//設置url地址
            curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//設置一個長整形數(shù),控制多少秒傳送CURLOPT_LOW_SPEED_LIMIT規(guī)定的字節(jié)數(shù)
            curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//設置一個長整形數(shù),控制傳送多少字節(jié);
            curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);/*下載最高速度*/
            res = curl_easy_perform(curl);
            curl_easy_cleanup(curl);
            if (res == CURLE_OK) {
                return res;
            }
            else {
                printf("錯誤代碼:%d\n", res);
                MessageBox(NULL, TEXT("獲取IP錯誤"), TEXT("助手"), MB_ICONINFORMATION | MB_YESNO);
            }
        }
        return res;
    }
    /*
    不使用代理
    */
    int GetUrl(char *url, char *buff)
    {
        CURL *curl;
        CURLcode res;
        //使用的curl庫 初始化curl庫
        curl = curl_easy_init();
        if (curl)
        {
            curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//設置讀寫緩存
            curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//設置回調(diào)函數(shù)
            curl_easy_setopt(curl, CURLOPT_URL, url);//設置url地址
            curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//設置一個長整形數(shù),控制多少秒傳送CURLOPT_LOW_SPEED_LIMIT規(guī)定的字節(jié)數(shù)
            curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//設置一個長整形數(shù),控制傳送多少字節(jié)
            curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);/*下載最高速度*/
            res = curl_easy_perform(curl);
            curl_easy_cleanup(curl);
            if (res == CURLE_OK)
            {
                return res;
            }
            else {
                printf("錯誤代碼:%d\n", res);
                MessageBox(NULL, TEXT("獲取IP錯誤"), TEXT("助手"), MB_ICONINFORMATION | MB_YESNO);
            }
        }
        return res;
    }
    int main()
    {
        char *buff=(char*)malloc(1024*1024);
        memset(buff, 0, 1024 * 1024);
        //不使用http代理
        GetUrl("http://myip.top", buff);
        printf("不使用代理:%s\n", buff);
        //使用http代理
        memset(buff, 0, 1024 * 1024);
        GetUrlHTTP("http://ipinfo.io", buff);
        printf("http結果:%s\n", buff);
        //使用socks5代理
        memset(buff, 0,1024 * 1024);
        GetUrlSocks5("http://ipinfo.io", buff);
        printf("socks5結果:%s\n", buff);
    
        free(buff);
        Sleep(10 * 1000);//等待10秒退出
        
        return 0;
    }
                            
                        

純凈動態(tài)住宅

獨享靜態(tài)IP

流量不過期

城市級定位

無限并發(fā)

支持HTTP(S)/Socks5協(xié)議