ProxyDetector
[ class tree: ProxyDetector ] [ index: ProxyDetector ] [ all elements ]

Class: ProxyDetector

Source Location: /proxydetector.class.php

Class Overview


This is the main class of ProxyDetector Project.


Variables

Methods



Class Details

[line 31]
This is the main class of ProxyDetector Project.

This is the main class of ProxyDetector Project. All check is here.




[ Top ]


Class Variables

$detected = array('Headers' => array(),'Tor'=>false,'VPN'/*currently not implemented*/)

[line 66]

Array resume errors found

Array resume errors found




Tags:

see:  Config()
access:  protected

Type:   array


[ Top ]

$forbiddenHeaders = array()

[line 58]

HTTP headers characteristic of a Proxy

HTTP headers characteristic of a Proxy Some "imposed" headers and user can add alternative header in Config::headers




Tags:

var:  See Config::$headers
access:  protected

Type:   array


[ Top ]

$torNodeList =

[line 48]

URI of TORdnsel server

URI of TORdnsel server




Tags:

access:  protected

Type:   string


[ Top ]

$useTor =  false

[line 41]

Using Tor Check ? (read in config)

Using Tor Check ? (read in config)




Tags:

var:  See Config::$useTor
link:  https://www.torproject.org/tordnsel/
access:  protected

Type:   boolean


[ Top ]



Class Methods


constructor ProxyDetector [line 75]

ProxyDetector ProxyDetector( )

Constructor check for session_name Config::$session_name,

Constructor check for session_name Config::$session_name, run readConf(), checkRequirement() and initHeaders()




[ Top ]

method checkRequirement [line 86]

void checkRequirement( )

Perfom some check, for ProxyDetector need

Perfom some check, for ProxyDetector need




[ Top ]

method initHeaders [line 109]

void initHeaders( )

Init $forbiddenHeaders using imposed headers and config header Config::$headers

Init $forbiddenHeaders using imposed headers and config header Config::$headers




[ Top ]

method isTorNode [line 122]

boolean isTorNode( string $host)

Check if remote host is a Tor node

Check if remote host is a Tor node Basing on https://www.torproject.org/tordnsel/




Tags:

return:  True if host is tor node


Parameters:

string   $host   host needed to check

[ Top ]

method performCheck [line 176]

boolean performCheck( )

Prevent multiple-checking (base on sessions), perform all tests

Prevent multiple-checking (base on sessions), perform all tests




Tags:

return:  True if it's good, false if proxy is detected


[ Top ]

method performHeadersCheck [line 150]

void performHeadersCheck( )

Check HTTP headers, basing on $forbiddenHeaders

Check HTTP headers, basing on $forbiddenHeaders




[ Top ]

method performTorCheck [line 162]

void performTorCheck( )

Init and perform Tor Node Checking if user set Config::$useTor

Init and perform Tor Node Checking if user set Config::$useTor




[ Top ]

method process [line 240]

void process( )

Main function, run tests and display Config::$errorFile if it's needed

Main function, run tests and display Config::$errorFile if it's needed




[ Top ]

method readConf [line 101]

void readConf( )

Init $useTor and $torNodeList

Init $useTor and $torNodeList




[ Top ]

method reverseAddr [line 141]

string reverseAddr( string $ip)

Reverse Ip Addr

Reverse Ip Addr




Tags:

return:  Reverse IP


Parameters:

string   $ip   IP to reverse

[ Top ]

method showFile [line 201]

void showFile( )

Display file when Proxy is detecting, based on user file Config::$errorFile

Display file when Proxy is detecting, based on user file Config::$errorFile




[ Top ]


Documentation generated on Tue, 26 Aug 2008 18:42:08 +0200 by phpDocumentor 1.4.1