Skip to content

A http server designed for faking responses to network connectivity tests (and wpad)

Notifications You must be signed in to change notification settings

cquijano/FakeHTTPServers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FakeHTTPServers

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:

  1. overwrites in the ## directory: ./web/##/(.*)*/<path>

  2. index.html in the directory defined by the path and host requested: ./web/<host>/<path>/index.html

  3. #.html in the directory defined by the path and host requested: ./web/<host>/<path>/#.html

  4. original path requeuested on host requested: ./web/<host>/<path>

  5. #.html in the directory defined by the host: ./web/<host>/#.html

  6. if there is no ./web/<host>/ folder, path requsted in # folder: ./web/#/<path>

  7. 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.

www.google.com/foo/bar.html

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

About

A http server designed for faking responses to network connectivity tests (and wpad)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published