
: Can I detect the IP address and location of visitors to my web application who are behind a proxy? I'm writing a web application and I need to make sure that I have the actual IP address
I'm writing a web application and I need to make sure that I have the actual IP address and location of my visitors, since there are many users in Middle East and China using proxy services to bypass the restrictions there. Is there a way to detect this information behind a proxy?
More posts by @Kevin317
1 Comments
Sorted by latest first Latest Oldest Best
Proxies run by national governments and ISPs will generally pass the carrier grade NAT (or in some cases, global) IPv4 address in the X-Forwarded-For header.
Some proxies, such as those used by some UK ISPs to implement that country's censorship schemes, are transparent proxies, and the connection appears to come directly from the IP address of the end user, as if there were no proxy. (Not all UK proxies are transparent; notably, those run by UK colleges and universities typically are not.)
If the user has set up their own proxy in order to bypass national government censorship, for instance, then there is little you can do; that information won't be available to you without performing black-hat operations which will get your site branded as a malware distributing attack site (and possibly delisted from Google or worse).
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.