sub proxy_check($ip)
{
my($ip)=@_;
for my $port (PROXY_CHECK)
{
use HTTP::ProxyCheck
my $proxycheck = new HTTP::ProxyCheck();
my $proxy=$ip.":".$port;
my $url="http://www.google.com/";
my $type="full";
if($proxycheck->check(proxy=>"$proxy",url=>"$url",answer=>"$type"))
{
make_error(S_PROXY,$port) if($proxycheck->get_answer()=~/©[\d]{4} Google/);
}
}
}
dunno if it works or not... i wasn't able to find any working public proxies in the 10 minutes i spent looking for one...
Wakaba 3.0 already has a proxy check, using the proxycheck
command, but it's still a bit rough around the edges. It does, however, cache results so that it won't slow down posting unnecessarily.
Can't hurt to put the body in for those individuals disinclined to compile the standard proxycheck. Is HTTP::ProxyCheck commonly installed?
It's not in the standard install, so no.
> Wakaba 3.0 already has a proxy check
but kareha doesn't...
That's true, but it's also much harder to get right, since checking for caches on EVERY post is a bit too slow.