Proxy bear

HTTP API

test

Describe Testing HTTP server status
Request URL http://{%host}:{%port}/test
Request example http://127.0.0.1:28776/test
Response example Hello, I'm ready

getLevel

Describe get the client host parameter
Request URL http://{%host}:{%port}/getLevel
Request example http://127.0.0.1:28776/GetLevel
Response example XXXXXXXXXXXXXXXXXXXXXXXX

getActiveProxy

Describe Get the proxies in "Active proxies collection", and delete the corresponding proxies in the queue after success
Request URL http://{%host}:{%port}/getActiveProxy
Request example http://127.0.0.1:28776/getActiveProxy
Response example 203.108.67.52:8080
Request example http://127.0.0.1:28776/getActiveProxy?count=10&json=true&simple=true
Response example {"count":10,"proxies":[{"country":"CN","ip":"122.72.18.60","port":"8659"},{"country":"US","ip":"184.185.166.27","port":"8875"},{"country":"CN","ip":"103.235.245.35","port":"8841"},{"country":"US","ip":"166.62.86.208","port":"8789"},{"country":"US","ip":"52.69.20.245","port":"8467"},{"country":"CN","ip":"113.214.13.1","port":"8846"},{"country":"CN","ip":"139.217.24.50","port":"8664"},{"country":"US","ip":"47.89.41.164","port":"8884"},{"country":"US","ip":"12.157.129.35","port":"8908"},{"country":"US","ip":"184.72.93.83","port":"80"}]}
Parameter Type Requisite Describe
count int no To obtain the number of proxies, the default value is 1
json bool no Whether to use JSON format to return proxy address data, the default value is false
simple bool no Whether to use a simple format to return the proxy address data, the default value is false

getTestedProxy

Describe Get the proxies in "Tested success collection", and delete the corresponding proxies in the queue after success
Request URL http://{%host}:{%port}/getTestedProxy
Request example http://127.0.0.1:28776/gettestedproxy
Response example 203.108.67.52:8080
Request example http://127.0.0.1:28776/gettestedproxy?count=10&json=true&simple=true
Response example {"count":10,"proxies":[{"country":"CN","ip":"122.72.18.60","port":"8659"},{"country":"US","ip":"184.185.166.27","port":"8875"},{"country":"CN","ip":"103.235.245.35","port":"8841"},{"country":"US","ip":"166.62.86.208","port":"8789"},{"country":"US","ip":"52.69.20.245","port":"8467"},{"country":"CN","ip":"113.214.13.1","port":"8846"},{"country":"CN","ip":"139.217.24.50","port":"8664"},{"country":"US","ip":"47.89.41.164","port":"8884"},{"country":"US","ip":"12.157.129.35","port":"8908"},{"country":"US","ip":"184.72.93.83","port":"80"}]}
Parameter Type Requisite Describe
count int no To obtain the number of proxies, the default value is 1
json bool no Whether to use JSON format to return proxy address data, the default value is false
simple bool no Whether to use a simple format to return the proxy address data, the default value is false

copyActiveProxy

Describe Get the proxies in "Active proxies collection"
Request URL http://{%host}:{%port}/copyActiveProxy
Request example http://127.0.0.1:28776/copyactiveproxy
Response example 203.108.67.52:8080
Request example http://127.0.0.1:28776/copyactiveproxy?count=10&json=true&simple=true
Response example {"count":10,"proxies":[{"country":"CN","ip":"122.72.18.60","port":"8659"},{"country":"US","ip":"184.185.166.27","port":"8875"},{"country":"CN","ip":"103.235.245.35","port":"8841"},{"country":"US","ip":"166.62.86.208","port":"8789"},{"country":"US","ip":"52.69.20.245","port":"8467"},{"country":"CN","ip":"113.214.13.1","port":"8846"},{"country":"CN","ip":"139.217.24.50","port":"8664"},{"country":"US","ip":"47.89.41.164","port":"8884"},{"country":"US","ip":"12.157.129.35","port":"8908"},{"country":"US","ip":"184.72.93.83","port":"80"}]}
Parameter Type Requisite Describe
count int no To obtain the number of proxies, the default value is 1
json bool no Whether to use JSON format to return proxy address data, the default value is false
simple bool no Whether to use a simple format to return the proxy address data, the default value is false

CopyTestedProxy

Describe Get the proxies in "Tested success collection"
Request URL http://{%host}:{%port}/CopyTestedProxy
Request example http://127.0.0.1:28776/Copytestedproxy
Response example 203.108.67.52:8080
Request example http://127.0.0.1:28776/Copytestedproxy?count=10&json=true&simple=true
Response example {"count":10,"proxies":[{"country":"CN","ip":"122.72.18.60","port":"8659"},{"country":"US","ip":"184.185.166.27","port":"8875"},{"country":"CN","ip":"103.235.245.35","port":"8841"},{"country":"US","ip":"166.62.86.208","port":"8789"},{"country":"US","ip":"52.69.20.245","port":"8467"},{"country":"CN","ip":"113.214.13.1","port":"8846"},{"country":"CN","ip":"139.217.24.50","port":"8664"},{"country":"US","ip":"47.89.41.164","port":"8884"},{"country":"US","ip":"12.157.129.35","port":"8908"},{"country":"US","ip":"184.72.93.83","port":"80"}]}
Parameter Type Requisite Describe
count int no To obtain the number of proxies, the default value is 1
json bool no Whether to use JSON format to return proxy address data, the default value is false
simple bool no Whether to use a simple format to return the proxy address data, the default value is false

copyCrawlProxy

Describe Get the proxies in "Crawl proxies collection"
Request URL http://{%host}:{%port}/copyCrawlProxy
Request example http://127.0.0.1:28776/copycrawlproxy
Response example 203.108.67.52:8080
Request example http://127.0.0.1:28776/copycrawlproxy?count=10&json=true&simple=true
Response example {"count":10,"proxies":[{"country":"CN","ip":"122.72.18.60","port":"8659"},{"country":"US","ip":"184.185.166.27","port":"8875"},{"country":"CN","ip":"103.235.245.35","port":"8841"},{"country":"US","ip":"166.62.86.208","port":"8789"},{"country":"US","ip":"52.69.20.245","port":"8467"},{"country":"CN","ip":"113.214.13.1","port":"8846"},{"country":"CN","ip":"139.217.24.50","port":"8664"},{"country":"US","ip":"47.89.41.164","port":"8884"},{"country":"US","ip":"12.157.129.35","port":"8908"},{"country":"US","ip":"184.72.93.83","port":"80"}]}
Parameter Type Requisite Describe
count int no To obtain the number of proxies, the default value is 1
json bool no Whether to use JSON format to return proxy address data, the default value is false
simple bool no Whether to use a simple format to return the proxy address data, the default value is false

removeActiveProxy

Describe Delete the proxies in "Active proxies collection"
Request URL http://{%host}:{%port}/removeActiveProxy
Request example http://127.0.0.1:28776/removeactiveproxy
Response example success
Request example http://127.0.0.1:28776/removeactiveproxy?count=100
Response example success
Parameter Type Requisite Describe
count int no Number of deleted proxies,delete all proxy addresses at =0,the default value is 0

removeTestedProxy

Describe Delete the proxies in "Tested success proxies collection"
Request URL http://{%host}:{%port}/removeTestedProxy
Request example http://127.0.0.1:28776/removetestedproxy
Response example success
Request example http://127.0.0.1:28776/removetestedproxy?count=100
Response example success
Parameter Type Requisite Describe
count int no Number of deleted proxies,delete all proxy addresses at =0,the default value is 0

removeBlockProxy

Describe Delete the proxies in "Blocklist proxies collection"
Request URL http://{%host}:{%port}/removeBlockProxy
Request example http://127.0.0.1:28776/removeblockproxy
Response example success
Request example http://127.0.0.1:28776/removeblockproxy?count=100
Response example success
Parameter Type Requisite Describe
count int no Number of deleted proxies,delete all proxy addresses at =0,the default value is 0

removeCrawlProxy

Describe Delete the proxies in "Crawl proxies collection"
Request URL http://{%host}:{%port}/removeCrawlProxy
Request example http://127.0.0.1:28776/removecrawlproxy
Response example success
Request example http://127.0.0.1:28776/removecrawlproxy?count=100
Response example success
Parameter Type Requisite Describe
count int no Number of deleted proxies,delete all proxy addresses at =0,the default value is 0

countActive

Describe Get the number of proxies in "Active proxies collection"
Request URL http://{%host}:{%port}/countActive
Request example http://127.0.0.1:28776/countactive
Response example 2376

countTested

Describe Get the number of proxies in "Tested success proxies collection"
Request URL http://{%host}:{%port}/countTested
Request example http://127.0.0.1:28776/counttested
Response example 682

countBlock

Describe Get the number of proxies in "Blocklist proxies collection"
Request URL http://{%host}:{%port}/countBlock
Request example http://127.0.0.1:28776/countblock
Response example 13

countCrawl

Describe Get the number of proxies in "Crawl proxies collection"
Request URL http://{%host}:{%port}/countcrawl
Request example http://127.0.0.1:28776/countcrawl
Response example 19232

returnActiveProxy

Describe Add a proxy to "Active proxies collection"
Request URL http://{%host}:{%port}/returnActiveProxy
Request example http://127.0.0.1:28776/returnactiveproxy?proxy=222544204603288
Response example success
Request example http://127.0.0.1:28776/returnactiveproxy?proxy=aaaaaaa
Response example error
Parameter Type Requisite Describe
proxy long yes Integer representation of proxy

returnBlockProxy

Describe Add a proxy to "Blocklist proxies collection"
Request URL http://{%host}:{%port}/returnBlockProxy
Request example http://127.0.0.1:28776/returnblockproxy?proxy=222544204603288
Response example success
Request example http://127.0.0.1:28776/returnblockproxy?proxy=aaaaaaaa
Response example error
Parameter Type Requisite Describe
proxy long yes Integer representation of proxy

returnTestedProxy

Describe Add a proxy to "Tested success proxies collection"
Request URL http://{%host}:{%port}/returnTestedProxy
Request example http://127.0.0.1:28776/returntestedproxy?proxy=222544204603288
Response example success
Request example http://127.0.0.1:28776/returntestedproxy?proxy=aaaaaaaa
Response example error
Parameter Type Requisite Describe
count long yes Integer representation of proxy

SOCKET API

Socket request packets

  The requested packet length is 88byte:

Request flag: 4byte

Request method: 2byte

Requested quantity: 4byte

Proxy IP address: 8byte

Proxy port: 2byte

Authentication coding: 32byte

null: 32byte

End of request flag: 4byte

Position(byte) c++ type c# type java type Describe
0~3 const char* flag = "mplz" char[] flag = new char[] {'m','p','l','z'} char[] flag = new char[] {'m','p','l','z'} Fixed value "mplz"
4~5 unsigned short ushort short request method
6~9 unsigned int uint int requested quantity
10~17 long long long long proxy IP address
18~19 uint short int proxy port
20~51 unsigned char code[32] byte[32] byte[32] authentication coding
52~83 unsigned char code[32] byte[32] byte[32] nul
84~87 const char* flag = "mplz" char[] flag = new char[] {'m','p','l','z'} char[] flag = new char[] {'m','p','l','z'} Fixed value "mplz"
Method definition Value Describe
SOCKET_API_TEST 0 Test server is successful
SOCKET_API_GET_ACTIVE 1 Get the proxies in "Active proxies collection", and delete the corresponding proxies in the queue after success
SOCKET_API_GET_TESTED 2 Get the proxies in "Tested success collection", and delete the corresponding proxies in the queue after success
SOCKET_API_COPY_ACTIVE 3 Get the proxies in "Active proxies collection"
SOCKET_API_COPY_TESTED 4 Get the proxies in "Tested success collection"
SOCKET_API_COPY_CRAWL 5 Get the proxies in "Crawl proxies collection"
SOCKET_API_REMOVE_ACTIVE 6 Delete the proxies in "Active proxies collection"
SOCKET_API_REMOVE_TESTED 7 Delete the proxies in "Tested success proxies collection"
SOCKET_API_REMOVE_CRAWL 8 Delete the proxies in "Crawl proxies collection"
SOCKET_API_REMOVE_BLOCK 9 Delete the proxies in "Blocklist proxies collection"
SOCKET_API_COUNT_ACTIVE 10 Get the number of proxies in "Active proxies collection"
SOCKET_API_COUNT_TESTED 11 Get the number of proxies in "Tested success proxies collection"
SOCKET_API_COUNT_CRAWL 12 Get the number of proxies in "Crawl proxies collection"
SOCKET_API_COUNT_BLOCK 13 Get the number of proxies in "Blocklist proxies collection"
SOCKET_API_RETURN_ACTIVE 14 Add a proxy to "Active proxies collection"
SOCKET_API_RETURN_TESTED 15 Add a proxy to "Blocklist proxies collection"
SOCKET_API_RETURN_BLOCK 16 Add a proxy to "Tested success proxies collection"

Socket response

Length Describe
2byte Response start flag, fixed value 0x7F7E
1byte Response state
1byte Response data type
4byte Response data length
0..n Response data

  Response state:

Definition Value Describe
SOCKET_RETURN_ERROR_FAILD 0 Execution failure
SOCKET_RETURN_ERROR_SUCCESS 1 Successful execution

  Response data type:

Response type Value Describe
SOCKET_RETURN_ERROR_NULL 0 Null data
SOCKET_RETURN_ERROR_DATA 1 Proxies or number of proxies
SOCKET_RETURN_ERROR_AUTHTOKEN 0 Authentication error
SOCKET_RETURN_ERROR_NOMETHOD 1 Invalid request
SOCKET_RETURN_ERROR_INVALIDPARAM 2 Invalid request(params)

.NET Remote API

GetTest

Definition string GetTest()
Request example return GetTest();
Response example "Hello , I'm ready."
Describe Test server is successful

GetActiveProxies

Definition string[] GetActiveProxies(int count)
Request example return GetActiveProxies(1);
Response example string[1] {"203.102.66.27:8088"}
Describe Get the proxies in "Active proxies collection", and delete the corresponding proxies in the queue after success

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

GetSimpleActiveProxies

Definition ulong[] GetSimpleActiveProxies(int count)
Request example return GetSimpleActiveProxies(1);
Response example 222544204603288
Describe Get the proxies(Integer representation) in "Active proxies collection", and delete the corresponding proxies in the queue after success

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

GetTestedProxies

Definition string[] GetTestedProxies(int count)
Request example return GetTestedProxies(1);
Response example string[1] {"203.102.66.27:8088"}
Describe Get the proxies in "Tested success collection", and delete the corresponding proxies in the queue after success

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

GetSimpleTestedProxies

Definition ulong[] GetSimpleTestedProxies(int count)
Request example return GetSimpleTestedProxies(1);
Response example 222544204603288
Describe Get the proxies(Integer representation) in "Tested success collection", and delete the corresponding proxies in the queue after success

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

CopyActiveProxies

Definition string[] CopyActiveProxies(int count)
Request example return CopyActiveProxies(1);
Response example string[1] {"203.102.66.27:8088"}
Describe Get the proxies in "Active proxies collection"

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

CopySimpleActiveProxies

Definition ulong[] CopySimpleActiveProxies(int count)
Request example return CopySimpleActiveProxies(1);
Response example 222544204603288
Describe Get the proxies(Integer representation) in "Active proxies collection"

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, if 0, gets all the proxies

CopyTestedProxies

Definition string[] CopyTestedProxies(int count)
Request example return CopyTestedProxies(1);
Response example string[1] {"203.102.66.27:8088"}
Describe Get the proxies in "Tested success collection"

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

CopySimpleTestedProxies

Definition ulong[] CopySimpleTestedProxies(int count)
Request example return CopySimpleTestedProxies(1);
Response example 222544204603288
Describe Get the proxies(Integer representation) in "Tested success collection"

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

CopyCrawlProxies

Definition string[] CopyCrawlProxies(int count)
Request example return CopyCrawlProxies(1);
Response example string[1] {"203.102.66.27:8088"}
Describe Get the proxies in "Crawl proxies collection"

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

CopySimpleCrawlProxies

Definition ulong[] CopySimpleCrawlProxies(int count)
Request example return CopySimpleCrawlProxies(1);
Response example 222544204603288
Describe Get the proxies(Integer representation) in "Crawl proxies collection"

  parameter

Definition Range Describe
int count 0..n Gets the number of proxies, and if 0, gets all the proxies

RemoveActiveProxies

Definition void RemoveActiveProxies(int count)
Request example RemoveActiveProxies(1);
Response example
Describe Delete the proxies in "Active proxies collection"

  parameter

Definition Range Describe
int count 0..n Number of deleted proxies,delete all proxy addresses at =0

RemoveTestedProxies

Definition void RemoveTestedProxies(int count)
Request example RemoveTestedProxies(1);
Response example
Describe Delete the proxies in "Tested success proxies collection"

  parameter

Definition Range Describe
int count 0..n Number of deleted proxies,delete all proxy addresses at =0

RemoveCrawlProxies

Definition void RemoveCrawlProxies(int count)
Request example RemoveCrawlProxies(1);
Response example
Describe Delete the proxies in "Crawl proxies collection"

  parameter

Definition Range Describe
int count 0..n Number of deleted proxies,delete all proxy addresses at =0

RemoveBlockProxies

Definition void RemoveBlockProxies(int count)
Request example RemoveBlockProxies(1);
Response example
Describe Delete the proxies in "Blocklist proxies collection"

  parameter

Definition Range Describe
int count 0..n Number of deleted proxies,delete all proxy addresses at =0

GetAcitveCount

Definition int GetAcitveCount()
Request example return GetAcitveCount();
Response example 2376
Describe Get the number of proxies in "Active proxies collection"

GetTestedCount

Definition int GetTestedCount()
Request example return GetTestedCount();
Response example 823
Describe Get the number of proxies in "Tested success proxies collection"

GetCrawlCount

Definition int GetCrawlCount()
Request example return GetCrawlCount();
Response example
Describe Get the number of proxies in "Crawl proxies collection"

GetBlockCount

Definition int GetBlockCount()
Request example return GetBlockCount();
Response example 27
Describe Get the number of proxies in "Blocklist proxies collection"

ReturnActive

Definition bool ReturnActive(string proxy)
Request example return ReturnActive("203.136.28.11:8088");
Response example true
Describe Add a proxy to "Active proxies collection"

  parameter

Definition Range Describe
string proxy The string representation of the proxy,{%host:%port}

ReturnSimpleActive

Definition bool ReturnSimpleActive(ulong proxy)
Request example return ReturnSimpleActive(222544204603288);
Response example true
Describe Add a proxy to "Active proxies collection"

  parameter

Definition Range Describe
ulong proxy Integer representation of proxy

ReturnTested

Definition bool ReturnTested(string proxy)
Request example return ReturnTested("203.136.28.11:8088");
Response example true
Describe Add a proxy to "Tested success proxies collection"

  parameter

Definition Range Describe
string proxy The string representation of the proxy,{%host:%port}

ReturnSimpleTested

Definition bool ReturnSimpleTested(ulong proxy)
Request example return ReturnSimpleTested(222544204603288);
Response example true
Describe Add a proxy to "Tested success proxies collection"

  parameter

Definition Range Describe
ulong proxy Integer representation of proxy

ReturnBlock

Definition bool ReturnBlock(string proxy)
Request example return ReturnBlock("203.136.28.11:8088");
Response example true
Describe Add a proxy to "Blocklist proxies collection"

  parameter

Definition Range Describe
string proxy The string representation of the proxy,{%host:%port}

ReturnSimpleBlock

Definition bool ReturnSimpleBlock(ulong proxy)
Request example return ReturnSimpleBlock(222544204603288);
Response example true
Describe Add a proxy to "Blocklist proxies collection"

  parameter

Definition Range Describe
ulong proxy Integer representation of proxy