Skip to content

会话类型 ​

轮换会话 ​

轮转会话不需要在代理池标识 zone-mob 后拼接会话标识,即默认会话类型为轮转会话。

若选择会话类型为 轮换会话,则每次请求都会为您切换一个新的IP,适合需要高匿名性的业务需求。

粘滞会话 ​

粘滞会话允许保留单个 IP 地址,以便发起多个请求。要多次重复使用同一个 IP 地址,必须将session-sessid参数附加到代理池标识zone-mob后,一个示例是session-123eizsdp。

默认会话时长为 10 分钟,最长可延长至 60 秒不活动时间(即无请求),即无请求达到60秒或IP失效后,将自动分配新的 IP 地址。

举例来说,原始查询导致分配了 sessid-abcde12345 代理 IP 地址 1.1.1.1。只要使用相同的会话 ID 连续发送新请求,并且 IP 地址保持在线且可用,系统就会通过 1.1.1.1。如果在 60 秒内没有发送进一步的请求,或者 IP 地址无法访问,系统就会分配一个新的代理 IP 地址。因此,后续查询 sessid-abcde12345 将通过备用 IP 地址(例如 1.1.1.2)进行路由。

以下是凭证列表的说明性示例:

USERNAME-zone-mob-session-agd6ty6jbayl:PASSWORD
USERNAME-zone-mob-session-jke15gnkac39:PASSWORD
USERNAME-zone-mob-session-zq7f15gsgfgy:PASSWORD
USERNAME-zone-mob-session-5ld641xn6bpu:PASSWORD
USERNAME-zone-mob-session-rhads5haqu15:PASSWORD

示例:

在此示例中,我们对第一个请求使用美国 IP,用户名是 session-abcdef123456。所有后续请求将使用相同的美国 IP 进行进一步查询:

cURL ​

text
curl -x gateway.ipxss.com:7777 -U "USERNAME-zone-mob-region-us-session-abcdef123456:PASSWORD" ipinfo.ipxss.com

C/C++ ​

cpp
// demo.cpp : Define the entry point of a console application
        //
        
        #include "stdafx.h"
        #include "curl/curl.h"
        #pragma comment(lib, "libcurl.lib")
        //cURL callback function
        static size_t write_buff_data(char *buffer, size_t size, size_t nitems, void *outstream)
        {
            //Copy the received data to a buffer
            memcpy(outstream, buffer, nitems*size);
            return nitems*size;
        }
        /*
        Use an 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 server:port");//Set the HTTP proxy address
                curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "USERNAME-zone-mob-region-us:PASSWORD");//username and password, separated by ":"
                curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//Set read/write buffers
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//Set callback function
                curl_easy_setopt(curl, CURLOPT_URL, url);//Set URL address
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//Set a long integer to control the number of seconds to transfer the bytes defined by CURLOPT_LOW_SPEED_LIMIT
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//Set a long integer to control the number of bytes to transfer
                curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);//Maximum 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("Get IP error"), TEXT("Helper"), MB_ICONINFORMATION | MB_YESNO);
                }
            }
            return res;
        }
        /*
        Don't use a proxy
        */
        int GetUrl(char *url, char *buff)
        {
            CURL *curl;
            CURLcode res;
            //The cURL library used, initialize the cURL library
            curl = curl_easy_init();
            if (curl)
            {
                curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//Set read/write buffers
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//Set callback function
                curl_easy_setopt(curl, CURLOPT_URL, url);//Set URL address
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//Set a long integer to control the number of seconds to transfer the bytes defined by CURLOPT_LOW_SPEED_LIMIT
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//Set a long integer to control the number of bytes to transfer
                curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);/*Maximum 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("Get IP error"), TEXT("Helper"), MB_ICONINFORMATION | MB_YESNO);
                }
            }
            return res;
        }
        int main()
        {
            char *buff=(char*)malloc(1024*1024);
            memset(buff, 0, 1024 * 1024);
            //Not use an HTTP proxy
            GetUrl("http://ipinfo.ipxss.com", buff);
            printf("Not use proxy:%s\n", buff);
            //Use an HTTP proxy
            memset(buff, 0, 1024 * 1024);
            GetUrlHTTP("http://ipinfo.ipxss.com", buff);
            printf("HTTP result:%s\n", buff);
        
            free(buff);
            Sleep(10 * 1000);//Wait 10 seconds and exit
                    Wait 10 seconds and exit
            
            return 0;
        }

GO ​

go
package main
        
        import (
            "context"
            "fmt"
            "io/ioutil"
            "net"
            "net/http"
            "net/url"
            "strings"
            "time"
        
            "golang.org/x/net/proxy"
        )
        
        // User Pass Auth Setting
        var account = "USERNAME-zone-mob-region-us"//Proxy_username
        var password = "PASSWORD"//Proxy_password
        
        // Proxy server
        var proxyServer = "HOST:PORT"//Example:xxx.na.ipxss.com:2336;
        
        // Test URL
        var testApi = "http://ipinfo.ipxss.com"
        
        func main() {
            go httpProxy(proxyServer, account, password)
        
            time.Sleep(time.Minute)
        }
        
        // http proxy
        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
        }

Node.js ​

json
#!/usr/bin/env node
        require('request-promise')({
            url: 'http://ipinfo.ipxss.com',//Request URL
            proxy: 'http://USERNAME-zone-mob-region-us:[email protected]:7777',//proxy username-zone-proxy pool:proxy username@proxy server address
            })
        .then(function(data){ console.log(data); },
            function(err){ console.error(err); });

PHP ​

php
<?php
        //User Pass Auth setting
        $user = "USERNAME-zone-mob-region-us";//Proxy_username
        $password = "PASSWORD";//Proxy_password
        // Target URL
        $targetUrl = "http://ipinfo.ipxss.com";
        // Proxy server
        $proxyServer = "proxy address";  //Example:xxx.na.ipxss.com:2336;
        $proxyUserPwd = "$user:$password";
                                        
        // Tunnel verification
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $targetUrl);
        curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                                        
        // Set proxy server
        curl_setopt($ch, CURLOPT_PROXYTYPE, 0); //http
        // curl_setopt($ch, CURLOPT_PROXYTYPE, 5); //sock5
        curl_setopt($ch, CURLOPT_PROXY, $proxyServer);
                                        
        // Set tunnel verification information
        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);

JAVA ​

java
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();
        
            }
        
            /**
            * http proxy
            */
            public static void testWithOkHttp() throws IOException {
                String url = "http://ipinfo.ipxss.com";//Request URL
                //Create a proxy object of type HTTP and specify the host name and port number of the proxy server
                Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("host", "port"));//The "host" and "port" used here should be replaced with the proxy server address and port.
                // Build a custom OkHttpClient instance, set up a proxy server and add a proxy authenticator (proxyAuthenticator)
                OkHttpClient client = new OkHttpClient().newBuilder().proxy(proxy).proxyAuthenticator((route, response) -> {
                    // Generate the credential string for Basic authentication here
                    String credential = Credentials.basic("USERNAME-zone-mob-region-us", "PASSWORD");//The "USERNAME-zone-custom-region-us" and "PASSWORD" here should be replaced with proxy username and proxy password.
                    // If proxy server needs authentication, please add authentication information in request head.
                    return response.request().newBuilder()
                            .header("Proxy-Authorization", credential)
                            .build();
                }).build();
        
                //Send GET Request and get response
                Request request = new Request.Builder().url(url).build();
                okhttp3.Response response = client.newCall(request).execute();
                //Get and print response
                String responseString = response.body().string();
                System.out.println(responseString);
            }

Python ​

python
'''
        Import thread, time and request package)
        to realize multiple thread control, waiting and http request)
        '''
        import _thread
        import time
        import requests
        
        # Set request head
        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",
        }
        
        # Test URL
        mainUrl = 'https://ipinfo.ipxss.com'
        
        def testUrl():
            # Set proxy username and password
            proxy = {
                'http': 'http://USERNAME-zone-mob-region-us:[email protected]:7777',#proxy username:proxy password@proxy server IP:proxy server port
                'https': 'http://USERNAME-zone-mob-region-us:[email protected]:7777',#proxy username:proxy password@proxy server IP:proxy server port
            }
            try:
                res = requests.get(mainUrl, headers=headers, proxies=proxy, timeout=10)
                print(res.status_code, res.text)
            except Exception as e:
                print("Fail to visit", e)
                pass
        
        # Turn on 10 threads to test
        for i in range(0, 10):
            _thread.start_new_thread(testUrl, ())
            time.sleep(0.1)
        
        time.sleep(10)

会话时长控制:

想要控制粘滞会话的时长,您需要将 sessTime 参数附加到 session-sessid 后,该参数的值即为您需要设置的会话时长。会话时长最长为120分钟,若预设时长到期或 IP 失效,系统就会为您自动切换 IP。

注意:会话时间参数并不能确保您的所有请求在会话结束时完成。即使请求尚未完成,会话也将在设定的时间限制内过期。

凭证列表示例:

示例表示建立具有不同会话时间(分钟)的不同会话的凭证列表。

USERNAME-zone-mob-session-15jrAGF6jbayl-sessTime-5:PASSWORD
USERNAME-zone-mob-session-jh125fdaf5ja-sessTime-10:PASSWORD
USERNAME-zone-mob-session-54khfdhs4uyw-sessTime-15:PASSWORD
USERNAME-zone-mob-session-lksagfd7p165-sessTime-20:PASSWORD
USERNAME-zone-mob-session-51ajsscv86hg-sessTime-25:PASSWORD

代码示例:

在这个例子中,再次选择了之前使用的美国 IP 地址。但是,这次添加了会话字符串和 sessTime 参数,持续时间为 15 分钟。

cURL ​

text
curl -x gateway.ipxss.com:7777 -U "USERNAME-zone-resi-region-us-session-abcdef123456-sessTime-15:PASSWORD" ipinfo.ipxss.com

C/C++ ​

cpp
// demo.cpp : Define the entry point of a console application
        //
        
        #include "stdafx.h"
        #include "curl/curl.h"
        #pragma comment(lib, "libcurl.lib")
        //cURL callback function
        static size_t write_buff_data(char *buffer, size_t size, size_t nitems, void *outstream)
        {
            //Copy the received data to a buffer
            memcpy(outstream, buffer, nitems*size);
            return nitems*size;
        }
        /*
        Use an 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 server:port");//Set the HTTP proxy address
                curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "USERNAME-zone-resi-region-us:PASSWORD");//username and password, separated by ":"
                curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//Set read/write buffers
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//Set callback function
                curl_easy_setopt(curl, CURLOPT_URL, url);//Set URL address
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//Set a long integer to control the number of seconds to transfer the bytes defined by CURLOPT_LOW_SPEED_LIMIT
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//Set a long integer to control the number of bytes to transfer
                curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);//Maximum 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("Get IP error"), TEXT("Helper"), MB_ICONINFORMATION | MB_YESNO);
                }
            }
            return res;
        }
        /*
        Don't use a proxy
        */
        int GetUrl(char *url, char *buff)
        {
            CURL *curl;
            CURLcode res;
            //The cURL library used, initialize the cURL library
            curl = curl_easy_init();
            if (curl)
            {
                curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//Set read/write buffers
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//Set callback function
                curl_easy_setopt(curl, CURLOPT_URL, url);//Set URL address
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//Set a long integer to control the number of seconds to transfer the bytes defined by CURLOPT_LOW_SPEED_LIMIT
                curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//Set a long integer to control the number of bytes to transfer
                curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);/*Maximum 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("Get IP error"), TEXT("Helper"), MB_ICONINFORMATION | MB_YESNO);
                }
            }
            return res;
        }
        int main()
        {
            char *buff=(char*)malloc(1024*1024);
            memset(buff, 0, 1024 * 1024);
            //Not use an HTTP proxy
            GetUrl("http://ipinfo.ipxss.com", buff);
            printf("Not use proxy:%s\n", buff);
            //Use an HTTP proxy
            memset(buff, 0, 1024 * 1024);
            GetUrlHTTP("http://ipinfo.ipxss.com", buff);
            printf("HTTP result:%s\n", buff);
        
            free(buff);
            Sleep(10 * 1000);//Wait 10 seconds and exit
                    Wait 10 seconds and exit
            
            return 0;
        }

GO ​

go
package main
        
        import (
            "context"
            "fmt"
            "io/ioutil"
            "net"
            "net/http"
            "net/url"
            "strings"
            "time"
        
            "golang.org/x/net/proxy"
        )
        
        // User Pass Auth Setting
        var account = "USERNAME-zone-resi-region-us"//Proxy_username
        var password = "PASSWORD"//Proxy_password
        
        // Proxy server
        var proxyServer = "HOST:PORT"//Example:xxx.na.ipxss.com:2336;
        
        // Test URL
        var testApi = "http://ipinfo.ipxss.com"
        
        func main() {
            go httpProxy(proxyServer, account, password)
        
            time.Sleep(time.Minute)
        }
        
        // http proxy
        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
        }

Node.js ​

json
#!/usr/bin/env node
        require('request-promise')({
            url: 'http://ipinfo.ipxss.com',//Request URL
            proxy: 'http://USERNAME-zone-resi-region-us:[email protected]:7777',//proxy username-zone-proxy pool:proxy username@proxy server address
            })
        .then(function(data){ console.log(data); },
            function(err){ console.error(err); });

PHP ​

php
<?php
        //User Pass Auth setting
        $user = "USERNAME-zone-resi-region-us";//Proxy_username
        $password = "PASSWORD";//Proxy_password
        // Target URL
        $targetUrl = "http://ipinfo.ipxss.com";
        // Proxy server
        $proxyServer = "proxy address";  //Example:xxx.na.ipxss.com:2336;
        $proxyUserPwd = "$user:$password";
                                        
        // Tunnel verification
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $targetUrl);
        curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                                        
        // Set proxy server
        curl_setopt($ch, CURLOPT_PROXYTYPE, 0); //http
        // curl_setopt($ch, CURLOPT_PROXYTYPE, 5); //sock5
        curl_setopt($ch, CURLOPT_PROXY, $proxyServer);
                                        
        // Set tunnel verification information
        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);

JAVA ​

java
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();

            }
        
            /**
            * http proxy
            */
            public static void testWithOkHttp() throws IOException {
                String url = "http://ipinfo.ipxss.com";//Request URL
                //Create a proxy object of type HTTP and specify the host name and port number of the proxy server
                Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("host", "port"));//The "host" and "port" used here should be replaced with the proxy server address and port.
                // Build a custom OkHttpClient instance, set up a proxy server and add a proxy authenticator (proxyAuthenticator)
                OkHttpClient client = new OkHttpClient().newBuilder().proxy(proxy).proxyAuthenticator((route, response) -> {
                    // Generate the credential string for Basic authentication here
                    String credential = Credentials.basic("USERNAME-zone-resi-region-us", "PASSWORD");//The "USERNAME-zone-custom-region-us" and "PASSWORD" here should be replaced with proxy username and proxy password.
                    // If proxy server needs authentication, please add authentication information in request head.
                    return response.request().newBuilder()
                            .header("Proxy-Authorization", credential)
                            .build();
                }).build();
        
                //Send GET Request and get response
                Request request = new Request.Builder().url(url).build();
                okhttp3.Response response = client.newCall(request).execute();
                //Get and print response
                String responseString = response.body().string();
                System.out.println(responseString);
            }

Python ​

python
'''
        Import thread, time and request package)
        to realize multiple thread control, waiting and http request)
        '''
        import _thread
        import time
        import requests
        
        # Set request head
        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",
        }
        
        # Test URL
        mainUrl = 'http://ipinfo.ipxss.com'
        
        def testUrl():
            # Set proxy username and password
            proxy = {
                'http': 'http://USERNAME-zone-resi-region-us:[email protected]:7777',#proxy username:proxy password@proxy server IP:proxy server port
                'https': 'http://USERNAME-zone-resi-region-us:[email protected]:7777',#proxy username:proxy password@proxy server IP:proxy server port
            }
            try:
                res = requests.get(mainUrl, headers=headers, proxies=proxy, timeout=10)
                print(res.status_code, res.text)
            except Exception as e:
                print("Fail to visit", e)
                pass
        
        # Turn on 10 threads to test
        for i in range(0, 10):
            _thread.start_new_thread(testUrl, ())
            time.sleep(0.1)
        
        time.sleep(10)

需要帮助? ​

如果您需要进一步说明或位置定位方面的帮助,请随时通过以下方式与我们联系:

IPxSS 代理基础设施