As a web developer, it is frequently helpful to be
able to see exactly what's being sent between
your browser and the web server. Having detailed
logs/statistics regarding those http conversations
can also be useful and being able to easily acquire
images, css files, jss files, etc. from a site is
also frequently handy.
|
With these goals in mind, I wrote ZProxy. Full source
code is available below along with a pre-built
windows binary distribution. Below the zip file
links is zproxy's documentation which is included
inside 'zproxy.cfg' which comes with both distributions.
|
|
# -----------------------------------------------------------------------
# Installation
# The program zproxy.exe will run "as is" without the need for
# any additional files. However, if you'd like to set zproxy's
# parameters you'll need an cfg file such as this one.
#
# Execution
#
# The program will always execute in the directory where
# zproxy.exe resides. Any output written to file will be
# relative to zproxy's home/working directory.
#
# To run the program:
#
# zproxy.exe
# zproxy.exe someFile.cfg
#
# Without an cfg file name, the program will use 'zproxy.cfg'
# as the configuration file name. The config file must have
# a section called [settings]. Here are the settings zproxy
# supports:
#
# Setting Default Value Description
# ------- ------------- -----------
#
# port 8888 port the proxy server will listen
# on for incoming connections
#
# dir [*] write output (log and rlog) to
# this directory
#
# rlog no write request/response log files
#
# verbose no verbose output
#
# timeout 10.0 period of time to wait before
# giving up on an inactive connection
#
# console yes write output to console
#
# log no write output to log file 'zproxy.log'
#
#
# [*] The default value for 'dir' is a based upon the current day
# and time. The format is:
#
# {year}-{month}-{day}-{hour}-{minute}-{second}-{millis}
#
# 2007-07-14-09-00-19-281
#
# If 'dir' is omitted, a directory with the above time-stamped
# format will be automatically created. To write output to
# the current directory, use:
#
# dir = .
#
# Notes:
#
# If rlog is true (we've been asked to log request/response data)
# here's how that data will be logged:
#
# - When a connection cones in to the proxy server, we assign that
# connection the next sequential "connection number"
# (i.e. 1, 2, 3, ... )
#
# - We create a subdirectory whose name reflects that connection
# number under the 'dir' specified directory with this format:
#
# 00001
#
# - Under each connection number directory, we'll have:
#
# - connect.log (example data follows)
#
# connect_number = 1
# thread_id = 1704
# ip_address = 1.0.0.127
# start = Sun Jul 15 16:16:39 2007
# start_timestamp = 1184534199.375
# end = Sun Jul 15 16:16:40 2007
# end_timestamp = 1184534200.140
# request_bytes = 453
# response_bytes = 71883
#
# - inf_001.log (one of these per request/response pair)
#
# host = www.luser.net
# port = 80
# connect = no
# start_timestamp = 1184534199.375000
# end_timestamp = 1184534200.140000
# request_bytes = 453
# response_bytes = 71883
#
# - req_001.log, res_001.log
#
# These files contain the request and response headers
# respectively. The request is frequently just headers
# however the response normally has a payload which is
# written to a parallel file:
#
# - req_001.dat
#
# If your request was for an image, you can recover the image
# by simply renaming the corresponding dat file
# (i.e. rename req_001.dat someImage.jpg)
#
# Note that each request/response pair will have an inf, res and
# req file so a connection with 3 exchanges would have:
# (inf/res/req)_001, (inf/res/req)_002 and (inf/res/req_003) files.
# -----------------------------------------------------------------------
[settings]
port = 8888
dir = log_dir
rlog = yes
verbose = yes
timeout = 10
console = yes
log = yes
|