Packetstream
This page will guide you on how to generate sticky and rotating proxies, Supported countries, other optional features, White labeling and FAQs regarding Packetstream APIs.
How to generate sticky proxies:
Countries are uppercase country codes. All supported countries are listed below.
const random_string = (length) => {
var result = "";
var characters = "abcdefghijklmnopqrstuvwxyz1234567890";
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
};
function proxyGenerationSticky(
amount,
country,
username,
password,
) {
proxy = [];
for (var i = 0; i < amount; i++) {
proxy.push(
`pkt.x.proxiess.com:31112:${username}:${password}-country-${country}-session-${random_string(
7
)}\n`
);
}
return proxy.join("");
}
Session ( add this under sticky proxy generation )
The
_session-
key instructs our routing system to either create or resolve a unique session for the connection. The value assigned to this key must be a random alphanumeric string, precisely 8 characters in length. This ensures the uniqueness and integrity of the session.
General Proxy format for Packetstream Sticky:
<Domain>:<Port>:<username>:<password>-country-<country>-session-<session id>
Follow the below table for generate HTTP/HTTPS and SOCKS5.
Packetstream
HTTP/HTTPS
pkt.x.proxiess.com
31112
Packetstream EU
HTTP/HTTPS
pkteu.x.proxiess.com
31113
Packetstream Asia
HTTP/HTTPS
pktasia.x.proxiess.com
31114
Packetstream
SOCKS5
sockspkt.x.proxiess.com
31115
Packetstream EU
SOCKS5
sockspkteu.x.proxiess.com
31116
Packetstream Asia
SOCKS5
sockspktasia.x.proxiess.com
31117
How to generate rotating proxies:
function proxyGenerationRotating(
amount,
country,
username,
password,
) {
proxy = [];
for (var i = 0; i < amount; i++) {
proxy.push(
`pkt.x.proxiess.com:31112:${username}:${password}-country-${country}\n`
);
}
return proxy.join("");
}
General Proxy format for Packetstream Rotating:
<Domain>:<Port>:<username>:<password>-country-<country>
Follow the below table for generate HTTP/HTTPS and SOCKS5.
Packetstream
HTTP/HTTPS
pkt.x.proxiess.com
31112
Packetstream EU
HTTP/HTTPS
pkteu.x.proxiess.com
31113
Packetstream Asia
HTTP/HTTPS
pktasia.x.proxiess.com
31114
Packetstream
SOCKS5
sockspkt.x.proxiess.com
31115
Packetstream EU
SOCKS5
sockspkteu.x.proxiess.com
31116
Packetstream Asia
SOCKS5
sockspktasia.x.proxiess.com
31117
Supported Countries:
{
AL: { name: 'AL', display: 'Albania' },
DZ: { name: 'DZ', display: 'Algeria' },
AO: { name: 'AO', display: 'Angola' },
AR: { name: 'AR', display: 'Argentina' },
AM: { name: 'AM', display: 'Armenia' },
AU: { name: 'AU', display: 'Australia' },
AT: { name: 'AT', display: 'Austria' },
AZ: { name: 'AZ', display: 'Azerbaijan' },
BH: { name: 'BH', display: 'Bahrain' },
BD: { name: 'BD', display: 'Bangladesh' },
BB; { name: 'BB', display: 'Barbados' },
BY: { name: 'BY', display: 'Belarus' },
BE: { name: 'BE', display: 'Belgium' },
BJ: { name: 'BJ', display: 'Benin' },
BO: { name: 'BO', display: 'Bolivia' },
BA: { name: 'BA', display: 'Bosnia and Herzegovina' },
BW: { name: 'BW', display: 'Botswana' },
BR: { name: 'BR', display: 'Brazil' },
BN: { name: 'BN', display: 'Brunei Darussalam' },
BG: { name: 'BG', display: 'Bulgaria' },
KH: { name: 'KH', display: 'Cambodia' },
CM: { name: 'CM', display: 'Cameroon' },
CA: { name: 'CA', display: 'Canada' },
CL: { name: 'CL', display: 'Chile' },
CN: { name: 'CN', display: 'China' },
CO: { name: 'CO', display: 'Colombia' },
CR: { name: 'CR', display: 'Costa Rica' },
CI: { name: 'CI', display: "Cote D'Ivoire" },
HR: { name: 'HR', display: 'Croatia' },
CU: { name: 'CU', display: 'Cuba' },
CY: { name: 'CY', display: 'Cyprus' },
CZ: { name: 'CZ', display: 'Czech Republic' },
DK: { name: 'DK', display: 'Denmark' },
DM: { name: 'DM', display: 'Dominica' },
DO: { name: 'DO', display: 'Dominican Republic' },
EC { name: 'EC', display: 'Ecuador' },
EG: { name: 'EG', display: 'Egypt' },
SV: { name: 'SV', display: 'El Salvador' },
EE: { name: 'EE', display: 'Estonia' },
ET: { name: 'ET', display: 'Ethiopia' },
FI: { name: 'FI', display: 'Finland' },
FR: { name: 'FR', display: 'France' },
DE: { name: 'DE', display: 'Germany' },
GE: { name: 'GE', display: 'Georgia' },
GH: { name: 'GH', display: 'Ghana' },
GR: { name: 'GR', display: 'Greece' },
GT: { name: 'GT', display: 'Guatemala' },
GY: { name: 'GY', display: 'Guyana' },
HT: { name: 'HT', display: 'Haiti' },
HN: { name: 'HN', display: 'Honduras' },
HK: { name: 'HK', display: 'Hong Kong' },
HU: { name: 'HU', display: 'Hungary' },
IN: { name: 'IN', display: 'India' },
ID: { name: 'ID', display: 'Indonesia' },
IR: { name: 'IR', display: 'Iran, Islamic Republic of' },
IQ: { name: 'IQ', display: 'Iraq' },
IE: { name: 'IE', display: 'Ireland' },
IL: { name: 'IL', display: 'Israel' },
IT: { name: 'IT', display: 'Italy' },
JM: { name: 'JM', display: 'Jamaica' },
JP: { name: 'JP', display: 'Japan' },
JO: { name: 'JO', display: 'Jordan' },
KZ: { name: 'KZ', display: 'Kazakhstan' },
KE: { name: 'KE', display: 'Kenya' },
KR: { name: 'KR', display: 'Korea, Republic of' },
KW: { name: 'KW', display: 'Kuwait' },
KG: { name: 'KG', display: 'Kyrgyzstan' },
LA: { name: 'LA', display: "Lao People's Democratic Republic" },
LV: { name: 'LV', display: 'Latvia' },
LB: { name: 'LB', display: 'Lebanon' },
LY: { name: 'LY', display: 'Libyan Arab Jamahiriya' },
LT: { name: 'LT', display: 'Lithuania' },
MO: { name: 'MO', display: 'Macao' },
MK: { name: 'MK', display: 'Macedonia, the Former Yugoslav Republic of' },
MG: { name: 'MG', display: 'Madagascar' },
MY: { name: 'MY', display: 'Malaysia' },
ML: { name: 'ML', display: 'Mali' },
MT: { name: 'MT', display: 'Malta' },
MU: { name: 'MU', display: 'Mauritius' },
MX: { name: 'MX', display: 'Mexico' },
MD: { name: 'MD', display: 'Moldova, Republic of' },
MN: { name: 'MN', display: 'Mongolia' },
ME: { name: 'ME', display: 'Montenegro' },
MA; { name: 'MA', display: 'Morocco' },
MZ: { name: 'MZ', display: 'Mozambique' },
MM: { name: 'MM', display: 'Myanmar' },
NA: { name: 'NA', display: 'Namibia' },
NP: { name: 'NP', display: 'Nepal' },
NL: { name: 'NL', display: 'Netherlands' },
NZ: { name: 'NZ', display: 'New Zealand' },
NI: { name: 'NI', display: 'Nicaragua' },
NG: { name: 'NG', display: 'Nigeria' },
NO: { name: 'NO', display: 'Norway' },
OM: { name: 'OM', display: 'Oman' },
PK: { name: 'PK', display: 'Pakistan' },
PS: { name: 'PS', display: 'Palestine, State of' },
PA: { name: 'PA', display: 'Panama' },
PY: { name: 'PY', display: 'Paraguay' },
PE: { name: 'PE', display: 'Peru' },
PH: { name: 'PH', display: 'Philippines' },
PL: { name: 'PL', display: 'Poland' },
PT: { name: 'PT', display: 'Portugal' },
PR: { name: 'PR', display: 'Puerto Rico' },
QA: { name: 'QA', display: 'Qatar' },
RE: { name: 'RE', display: 'Reunion' },
RO: { name: 'RO', display: 'Romania' },
RU: { name: 'RU', display: 'Russian Federation' },
LC: { name: 'LC', display: 'Saint Lucia' },
SA: { name: 'SA', display: 'Saudi Arabia' },
SN: { name: 'SN', display: 'Senegal' },
RS: { name: 'RS', display: 'Serbia' },
SG: { name: 'SG', display: 'Singapore' },
SK: { name: 'SK', display: 'Slovakia' },
SL: { name: 'SI', display: 'Slovenia' },
SO: { name: 'SO', display: 'Somalia' },
ZA: { name: 'ZA', display: 'South Africa' },
ES: { name: 'ES', display: 'Spain' },
LK: { name: 'LK', display: 'Sri Lanka' },
SD: { name: 'SD', display: 'Sudan' },
SR: { name: 'SR', display: 'Suriname' },
SE: { name: 'SE', display: 'Sweden' },
CH: { name: 'CH', display: 'Switzerland' },
SY: { name: 'SY', display: 'Syrian Arab Republic' },
TW: { name: 'TW', display: 'Taiwan, Province of China' },
TH: { name: 'TH', display: 'Thailand' },
TG: { name: 'TG', display: 'Togo' },
TT: { name: 'TT', display: 'Trinidad and Tobago' },
TN: { name: 'TN', display: 'Tunisia' },
TR: { name: 'TR', display: 'Turkey' },
UA: { name: 'UA', display: 'Ukraine' },
AE: { name: 'AE', display: 'United Arab Emirates' },
UK: { name: 'UK', display: 'United Kingdom' },
US: { name: 'US', display: 'United States' },
UY: { name: 'UY', display: 'Uruguay' },
UZ: { name: 'UZ', display: 'Uzbekistan' },
VE: { name: 'VE', display: 'Venezuela' },
VN: { name: 'VN', display: 'Viet Nam' },
ZM: { name: 'ZM', display: 'Zambia' },
ZW: { name: 'ZW', display: 'Zimbabwe' },
}
White labeling
Use this method to brand your proxies with your own domain/company name
To brand the proxies under your domain follow these steps:
Open the DNS configuration for your domain.
Create a CNAME Record pointing to the domain.
Whatever you enter in 'host' will decide the domain which points to our API IP.
Thus if your domain is API.com and you enter the host premium or whatever you want to call it pointing to the PacketStream domain, your proxies will be formatted premium.yourdomain.com:port:user:pass
An example on Godaddy is linked below:

Packetstream
HTTP/HTTPS
CNAME
pkt.x.proxiess.com
31112
Packetstream EU
HTTP/HTTPS
CNAME
pkteu.x.proxiess.com
31113
Packetstream Asia
HTTP/HTTPS
CNAME
pktasia.x.proxiess.com
31114
Packetstream
SOCKS5
CNAME
sockspkt.x.proxiess.com
31115
Packetstream EU
SOCKS5
CNAME
sockspkteu.x.proxiess.com
31116
Packetstream Asia
SOCKS5
CNAME
sockspktasia.x.proxiess.com
31117
FAQ
What is Authorization?
This is a header value you provide with every request. We are using Bearer token so send in the header like this: "Authorization: Bearer <your api token>"
Im getting this error:
{"message":"user_id cannot be null or undefined.","timestamp":1634146275996}
how do I fix it?
Make sure you have this "Content-Type": "application/json"
header present in your requests.
Headers
Please check on how to send requests with headers in whichever languages you are using.
POST Request:
{
"Authorization": "Bearer <your api token>",
"Content-Type": "application/json"
}
# Sample curl request
curl --location --request POST '<https://basic.proxiesapi.xyz/proxy_api/v1/basic/users/add_balance>' \\
--data-raw '{
"username": "lqwdqqwoidasdq",
"data_gb": 1
}' -H "Authorization: Bearer <your api token>" -H "Content-Type: application/json"
GET Request:
{
"Authorization": "Bearer <your api token>",
}
# Sample curl request
curl --location --request POST '<https://basic.proxiesapi.xyz/proxy_api/v1/basic/users/get/lqwdqqwoi>' \\
-H "Authorization: Bearer <your api token>"
Last updated