Detecting Proxies in PHP and JavaScript

Paul Alexander Thornton  > Tech >  Detecting Proxies in PHP and JavaScript
0 Comments

A VPN connection is required to access campus resources that are normally only available on the K: and U: drives from off-campus computers. A VPN provides a secure tunnel between your ISP, your computer, and the WPUNJ network that encrypts your data so that only those who should be viewing your data can see it. This allows you to remotely work on University business as if you were in the office, but is still considered off-campus work and must be done in compliance with WPUNJ’s Data Security Policy.

How do I know if a client is using a proxy?

Webmasters and developers often deal with the challenge of detecting users who are hiding behind proxy connections or using a VPN. This can be a problem for both legitimate and malicious users who want to avoid detection. Fortunately, there are some easy methods for performing proxies tests in PHP VPN connection and JavaScript including this API service that can quickly evaluate an IP address to identify high risk users.

For example, you can create a script on the server that your database is located on that will connect to the database via the VPN network. However, this is not ideal since you are introducing the possibility of a remote user accidentally closing the connection and your script will stop working. Instead you might consider setting up a port forward from the server to the database, which can be done through an ssh or putty connection. This is an alternative to connecting directly to the database from your server and can be accomplished in a similar way to an exec() command.

Leave a Reply

Your email address will not be published. Required fields are marked *