A Simple Proxy Anonymity Tester Program
Putting this simple program on your web site allows you to see some common server environment variables and test the anonymity of a proxy server. If you are anonymous, your IP should not be visible in the listing it generates.
It is a program originally written in PERL and I rewrote it for PHP.
[code]
<?PHP
/*
This simple program displays some common
server environment variables. It shows
what the web host sees when you connect
to a web site.
It can be useful in helping to determine how
anonymous a proxy server really is.
Language : PHP 5.2.4
Author : Jay Tanner - 2007 Sep *4 - Fri
*/
print Env_Vars();
function Env_Vars()
{
$a = "SERVER_SOFTWARE\t\t" . $_SERVER['SERVER_SOFTWARE'] . "\n";
$b = "SERVER_NAME\t\t" . $_SERVER['SERVER_NAME'] . "\n";
$c = "GATEWAY_INTERFACE\t" . $_SERVER['GATEWAY_INTERFACE'] . "\n";
$d = "SERVER_PROTOCOL\t\t" . $_SERVER['SERVER_PROTOCOL'] . "\n";
$e = "SERVER_PORT\t\t" . $_SERVER['SERVER_PORT'] . "\n";
$f = "HTTP_ACCEPT\t\t" . $_SERVER['HTTP_ACCEPT'] . "\n";
$g = "PATH_INFO\t\t" . $_SERVER['PATH_INFO'] . "\n";
$h = "PATH_TRANSLATED\t\t" . $_SERVER['PATH_TRANSLATED'] . "\n";
$i = "REQUEST_METHOD\t\t" . $_SERVER['REQUEST_METHOD'] . "\n";
$j = "REMOTE_HOST\t\t" . $_SERVER['REMOTE_HOST'] . "\n";
$k = "REMOTE_ADDR\t\t" . $_SERVER['REMOTE_ADDR'] . "\n";
$out = "Some Common Server Environment Variables\n\n$a$b$c$d$e$f$g$h$i$j$k";
return "<PRE>$out</PRE>";
} // End of Env_Vars()
?>
[/code]
I connected to a proxy server in China, ran the program on my web host and obtained the following listing:
[code]
Some Common Server Environment Variables
SERVER_SOFTWARE Apache/2.2.6 (Unix) mod_ssl/2.2.6 mod_auth_passthrough/2.* mod_bwlimited/*.4
SERVER_NAME neoprogrammics.info
GATEWAY_INTERFACE CGI/*.*
SERVER_PROTOCOL HTTP/*.0
SERVER_PORT 80
HTTP_ACCEPT application/x-shockwave-flash, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
PATH_INFO
PATH_TRANSLATED
REQUEST_METHOD GET
REMOTE_HOST
REMOTE_ADDR 222.88.75.24*
[/code]
The REMOTE_ADDR = 222.88.75.24* is the proxy server I used in China to test the program and see if the proxy was anonymous.
Since my IP doesn't show up, it means that I'm anonymous to the web server, since my own IP is not shown - at least in theory.
So, according to my web host, I posted the kiddie porn on MySpace.com from a computer in China instead of New York State, USA.
(LOL - Just kidding, folks).
The idea of a proxy is to surf the Internet leaving any IP except your own on the server logs.
In fact, an anonymous proxy shouldn't keep general client connection logs or it defeats their purpose!
:)