For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using Proxy Strings

In this section, we'll show practical examples of using the proxy string we've created. We'll focus on setting up HTTP/HTTPS and SOCKS5 connections, illustrated through examples in various programming languages.

Our Sneaker DC proxies are compatible with both UDP and TCP connections.

HTTP/HTTPS

curl -v -x 127.0.0.150:12323:1a76fc101622:b585565c4a -L https://ipv4.icanhazip.com
<?php

$url = 'https://ipv4.icanhazip.com';
$proxy = '127.0.0.150:12323';
$proxyAuth = '1a76fc101622:b585565c4a';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

?>

SOCKS5

curl -v --socks5 127.0.0.150:12324 --proxy-user 1a76fc101622:b585565c4a -L https://ipv4.icanhazip.com
<?php

$url = 'https://ipv4.icanhazip.com';
$proxy = '127.0.0.150:12324';
$proxyAuth = '1a76fc101622:b585565c4a';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

?>

Last updated

Was this helpful?