I'm gonna break the mold here and explain a little on how this works.
A proxy works by sending an HTTP request to a server on your behalf and then returning the server's response. The server sees the connection, but the proxy can also reveal the IP that
it got the request from. This is done via a special client header called X-Fowarded-For.
What are Client headers? They are what your browser sends to the server in order to ask it for information. Client headers are where the the server is told which page you requested, what cookies you have, what browser you're running, and a few miscellaneous things such as your language preferences and what types of compression your browser supports. I ran a simple web server that echoes back your request headers on my laptop, and this is what I got for Firefox 3.0 on Ubuntu Linux:
Code:
GET / HTTP/1.1
Host: localhost:9000
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2) Gecko/20081209 Firefox/3.1b2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
When you browse through a proxy, most of the time the proxy will sneak an extra header into there that looks like:
Code:
X-Fowarded-For: 67.49.145.24
That's where your real IP address is revealed through a proxy.
Of course, anybody could pretend to be a proxy and send that header through, so the webmaster needs to differentiate between a few different options: Trust only certain proxies' X-Fowarded-For headers, trust all X-Fowarded-For headers, or block requests that contain an X-Fowarded-For header.
Trusting only certain proxies will work if you don't get a lot of proxy traffic and have a list of "approved" proxies for your site. It is high-maintenance but the best compromise between your users and your site's integrity.
If all proxies are trusted, that means anybody can send an X-Fowarded-For header and masquerade as some random IP. An open proxy scanner might fix this, but this would greatly slow down requests for all proxies - both legitimate and spoofed. This would be used on a site where proxies aren't a big deal.
If a webmaster is concerned heavily with the security of his website, he/she will do the latter. It is the only way to make sure that IP addresses will never be spoofed through a proxy.
Always, always, ALWAYS, X-Fowarded-For headers should be checked to ensure they're not originating from a private/non-routeable subnet (192.168.0.0/16, 172.16.0.0/20, and 10.0.0.0/24 I believe are the official ones).
X-Fowarded-For headers are always done at the web application level - Apache (or whatever webserver is being used) will almost never change REMOTE_ADDRESS based on a simple client header. It's waaaaaay too easy to fake it!
So, those are the options. Every webmaster will have different opinions on how proxies should be handled; at ADISC, I would assume that Moo would lean towards the latter option because that is fair to users and ensures the best security for the site overall.
Note that good networks like Tor don't send X-Fowarded-For headers. Even if someone running an exit node modified their local copy of Tor to send them, they wouldn't have any ability to reach them because exit nodes have no idea what the original IP is.
--Danny :ninja: