A http server designed for faking responses to network connectivity tests (and wpad). Cookied are saved into ./data/<host>.txt with the IP of the client who sent the cookie. Note that these files should be read with "sort -u" to filter out the duplicates
Arguments: -v : debug level logging
Files are served in the following priority, falling to the next if the file does not exist:
-
overwrites in the ## directory: ./web/##/(.*)*/<path>
-
index.html in the directory defined by the path and host requested: ./web/<host>/<path>/index.html
-
#.html in the directory defined by the path and host requested: ./web/<host>/<path>/#.html
-
original path requeuested on host requested: ./web/<host>/<path>
-
#.html in the directory defined by the host: ./web/<host>/#.html
-
if there is no ./web/<host>/ folder, path requsted in # folder: ./web/#/<path>
-
notfound page: ./web/#/#.html
A .headers file defines custom headers for a response e.g.
Content-Type: text/html; charset=UTF-8
The first line of the .headers file can be a number, if so this is the status code of the response
.headers are read in the following priority:
./web/<host>/<path>/.headers
./web/<host>/.headers
e.g.
would first try
./web/www.google.com/foo/.headers
then
./web/www.google.com/.headers
This allows single pages on the same vhost to use different status codes by using a folder in place of the page and putting the content in a index.hmtl or #.html file inside this folder along with the custom .headers for this page