Connection to (ip адрес прокси сервера) failed.
server {
listen 80 default;
listen 443 ssl default;
server_name example.com www.example.com;
location / {
proxy_pass http://10.10.10.2/;
}
}
server {
listen 80;
listen 443 ssl;
server_name a.example.com www.a.example.com;
location / {
proxy_pass http://10.10.10.3:3333/;
}
}
<?php
$socks5_list = explode ("\n", str_replace ("\r", "", file_get_contents (dirname(__FILE__)."/gotovo_vse_sellery_bezdybley.txt")));
if (empty($socks5_list))
{
exit(1);
}
function _check_socks5 ($socks = array(), $filename)
{
foreach ($socks as $s)
{
list ($ip, $port) = explode (":", $s);
if (geoip_country_code_by_name($ip) == "CN") continue;
if ($socket = @fsockopen ($ip, $port, $errno, $errstr, 1))
{
$threads[$s] = $socket;
}
}
foreach ($threads as $s => $h)
{
fwrite ($h, "\x05\x01\x00");
}
foreach ($threads as $s => $h)
{
$r = fread ($h, 2);
if ((ord ($r [0]) == 5) && (ord ($r [1]) == 0))
{
file_put_contents ($filename, $s."\r\n");
}
}
}
_check_socks5 ($socks5_list, dirname(__FILE__)."/socks5_valid.txt");
?>
<?php
$proxies = file ("1_ne_check.txt");
if (empty($proxies))
{
exit(1);
}
$mc = curl_multi_init ();
for ($thread_no = 0; $thread_no<count ($proxies); $thread_no++)
{
$c [$thread_no] = curl_init ();
curl_setopt ($c [$thread_no], CURLOPT_URL, "http://google.com");
curl_setopt ($c [$thread_no], CURLOPT_HEADER, 0);
curl_setopt ($c [$thread_no], CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($c [$thread_no], CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ($c [$thread_no], CURLOPT_TIMEOUT, 10);
curl_setopt ($c [$thread_no], CURLOPT_PROXY, trim ($proxies [$thread_no]));
curl_setopt ($c [$thread_no], CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_multi_add_handle ($mc, $c [$thread_no]);
}
$proxies_out = array();
do {
while (($execrun = curl_multi_exec ($mc, $running)) == CURLM_CALL_MULTI_PERFORM);
if ($execrun != CURLM_OK) break;
while ($done = curl_multi_info_read ($mc))
{
$info = curl_getinfo ($done ['handle']);
if ($info ['http_code'] == 301) {
echo trim ($proxies [array_search ($done['handle'], $c)])."\r\n";
$proxies_out[trim($proxies[array_search($done['handle'], $c)])] = trim($proxies[array_search($done['handle'], $c)]);
unset($proxies[array_search ($done['handle'], $c)]);
}
curl_multi_remove_handle ($mc, $done ['handle']);
}
} while ($running);
curl_multi_close ($mc);
$mc = curl_multi_init ();
for ($thread_no = 0; $thread_no<count ($proxies); $thread_no++)
{
$c [$thread_no] = curl_init ();
curl_setopt ($c [$thread_no], CURLOPT_URL, "http://google.com");
curl_setopt ($c [$thread_no], CURLOPT_HEADER, 0);
curl_setopt ($c [$thread_no], CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($c [$thread_no], CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ($c [$thread_no], CURLOPT_TIMEOUT, 10);
curl_setopt ($c [$thread_no], CURLOPT_PROXY, trim ($proxies [$thread_no]));
curl_setopt ($c [$thread_no], CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_multi_add_handle ($mc, $c [$thread_no]);
}
$proxies5_out = array();
do {
while (($execrun = curl_multi_exec ($mc, $running)) == CURLM_CALL_MULTI_PERFORM);
if ($execrun != CURLM_OK) break;
while ($done = curl_multi_info_read ($mc))
{
$info = curl_getinfo ($done ['handle']);
if ($info ['http_code'] == 301) {
echo trim ($proxies [array_search ($done['handle'], $c)])."\r\n";
$proxies5_out[trim($proxies[array_search($done['handle'], $c)])] = trim($proxies[array_search($done['handle'], $c)]);
}
curl_multi_remove_handle ($mc, $done ['handle']);
}
} while ($running);
curl_multi_close ($mc);
file_put_contents("2_results.txt", implode("\r\n", $proxies_out)."\r\n\r\n".implode("\r\n", $proxies5_out));
?>
<?php
$proxies = file ("gotovo_vse_sellery_bezdybley.txt");
$proxies_out = array();
$mc = curl_multi_init ();
for ($thread_no = 0; $thread_no<count ($proxies); $thread_no++)
{
$c [$thread_no] = curl_init ();
curl_setopt ($c [$thread_no], CURLOPT_URL, "http://google.com");
curl_setopt ($c [$thread_no], CURLOPT_HEADER, 0);
curl_setopt ($c [$thread_no], CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($c [$thread_no], CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ($c [$thread_no], CURLOPT_TIMEOUT, 10);
curl_setopt ($c [$thread_no], CURLOPT_PROXY, trim ($proxies [$thread_no]));
curl_setopt ($c [$thread_no], CURLOPT_PROXYTYPE, 0);
curl_multi_add_handle ($mc, $c [$thread_no]);
}
do {
while (($execrun = curl_multi_exec ($mc, $running)) == CURLM_CALL_MULTI_PERFORM);
if ($execrun != CURLM_OK) break;
while ($done = curl_multi_info_read ($mc))
{
$info = curl_getinfo ($done ['handle']);
if ($info ['http_code'] == 301) {
echo trim ($proxies [array_search ($done['handle'], $c)])."\r\n";
$proxies_out[trim($proxies[array_search($done['handle'], $c)])] = trim($proxies[array_search($done['handle'], $c)]);
}
curl_multi_remove_handle ($mc, $done ['handle']);
}
} while ($running);
curl_multi_close ($mc);
file_put_contents("proxyuniq.txt", implode("\r\n", $proxies_out));
?>
return "HTTPS proxy-ssl.antizapret.prostovpn.org:3143; PROXY proxy-nossl.antizapret.prostovpn.org:29976; DIRECT";