Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Detektiranje IP adrese

[es] :: Java :: Detektiranje IP adrese

[ Pregleda: 4079 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

karatas

Član broj: 63060
Poruke: 24
*.jware.hr.



Profil

icon Detektiranje IP adrese13.09.2005. u 07:13 - pre 203 meseci
Pozdrav!

Sustav koji koristim je: WinXP + SP1, J2EE 1.4, JBoss, Struts...

Imam problema pri detektiranju IP adrese ukoliko korisnik "dolazi" preko Proxy servera. S kodom:

String IPAddr = request.getRemoteAddr();

dobijem dobru IP adresu samo ukoliko korisnik ne dolazi preko Proxy servera.

Pokusao sam s ovim:

System.out.println("HTTP_VIA: " + request.getHeader("HTTP_VIA"));
System.out.println("HTTP_PROXY_CONNECTION: " + request.getHeader("HTTP_PROXY_CONNECTION"));
System.out.println("REMOTE_ADDR: " + request.getHeader("REMOTE_ADDR"));
System.out.println("REMOTE_HOST: " + request.getHeader("REMOTE_HOST"));
System.out.println("HTTP_X_FORWARDED_FOR: " + request.getHeader("HTTP_X_FORWARDED_FOR"));
System.out.println("FORWARDED: " + request.getHeader("FORWARDED"));
System.out.println("CLIENT_IP: " + request.getHeader("CLIENT_IP"));
System.out.println("HTTP_FROM: " + request.getHeader("HTTP_FROM"));
System.out.println("HTTP_X_FORWARDED: " + request.getHeader("HTTP_X_FORWARDED"));
System.out.println("HTTP_FORWARDED: " + request.getHeader("HTTP_FORWARDED"));
System.out.println("HTTP_X_COMING_FROM: " + request.getHeader("HTTP_X_COMING_FROM"));
System.out.println("HTTP_COMING_FROM: " + request.getHeader("HTTP_COMING_FROM"));

ali prikaze mi se da je to sve jednako "null". Treba li se nesto ustimavati u Tomcatu da to radi ili nesto drugo trebam koristiti?

Hvala
 
Odgovor na temu

antix

Član broj: 8388
Poruke: 265
*.pat-pool.nsad.sbb.co.yu.

Jabber: antix@elitesecurity.org


Profil

icon Re: Detektiranje IP adrese13.09.2005. u 14:45 - pre 203 meseci
check this out

http://www.jguru.com/faq/view.jsp?EID=448703

 
Odgovor na temu

[es] :: Java :: Detektiranje IP adrese

[ Pregleda: 4079 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.