rejetto forum

FACTORY_IP_SERVICES

Mars · 2 · 6718

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
thank you mars.

i still don't know how to tell a good one from a bad one.
i mean, sometimes in the past, i had to remove some of these URLs because they shown the wrong IP to some people.
i know little about this, i just had the person to watch the result of these URLs one-by-one, and report me what had a different result.


the code i use on the domains i have is this

Code: [Select]
function localAddress($ip) { return preg_match('°^( *127\.0\.0\.|192\.168|10\.|169\.254|172\.(1[6-9]|2\d|3[01])\.)°',$ip); }

foreach (split('\s*,\s*',getenv('HTTP_X_FORWARDED_FOR')) as $ip)
   if (preg_match('/[0-9.]+/', $ip) && !localAddress($ip)) die($ip);
die(getenv('REMOTE_ADDR'));

the only thing i can imagine, is that the non-working services are not checking the x-forwarded-for field.
but i may be wrong about it, also because it should be a field used by http proxies, and HFS is not able to use any. so how could those people meet the problem?
guys, this is truly challenging :P

even if i don't know if this is the right point, yesterday i built a script to check what services are using this field.
all the services in the current list are, except www.ip-adress.com, which is not.
also www.jonthompson.info is not using it.
now i'm unsure if to add it or not.

now i would like to know if this is the criterion to know good services. :-\
« Last Edit: October 03, 2009, 10:02:26 AM by rejetto »