Skip to content
Thomas Mangin edited this page Oct 11, 2013 · 1 revision

running it on a mac

»› ./sbin/exaproxy
ExaProxy 6201   supervisor    Starting exaproxy version 1.1.2
ExaProxy 6201   supervisor    python version 2.7.3 (3eef596df459, Apr 06 2013, 09:50:58) [PyPy 2.0.0-beta2 with GCC 4.2.1]
ExaProxy 6201   daemon        WARNING: python remote execution via the web server is enabled
ExaProxy 6201   daemon        exaproxy.daemon.reactor can only be epoll on Linux, changing the reactor to select
ExaProxy 6201   daemon        the select reactor is not very scalable, and can only handle 1024 simultaneous descriptors
ExaProxy 6201   daemon        your configuration requires 65826 file descriptors
ExaProxy 6201   daemon        please increase your system maximum limit, alternatively you can reduce
ExaProxy 6201   daemon        exaproxy.http.connections, exaproxy.web.connections and/or configuration.redirector.maximum
»› env exaproxy.http.connections=100 ./sbin/exaproxy
ExaProxy 6256   supervisor    Starting exaproxy version 1.1.2
ExaProxy 6256   supervisor    python version 2.7.3 (3eef596df459, Apr 06 2013, 09:50:58) [PyPy 2.0.0-beta2 with GCC 4.2.1]
ExaProxy 6256   daemon        exaproxy.daemon.reactor can only be epoll on Linux, changing the reactor to select

--help

»› ./sbin/exaproxy -h
usage:
 exaproxy [options]

  -h, --help      : this help
  -c, --conf-file : configuration file to use (ini format)
  -i, -fi, --ini  : display the configuration using the ini format
  -e, -fe, --env  : display the configuration using the env format
 -di, --diff-ini  : display non-default configurations values using the ini format
 -de, --diff-env  : display non-default configurations values using the env format
  -d, --debug     : shortcut to turn on all subsystems debugging to LOG_DEBUG
  -p, --pdb       : start the python debugger on serious logging and on SIGTERM
  -m, --memory    : display memory usage information on exit

ExaProxy will automatically look for its configuration file (in windows ini format)
 - 1 : in      etc/exaproxy/exaproxy.conf (relative position within the extracted tgz file)
 - 2 : in     /etc/exaproxy/exaproxy.conf
 - 3 : in /usr/etc/exaproxy/exaproxy.conf

You can generate the configuration file using the -i, or -fi, optionEvery configuration value has a sensible built-in default

Individual configuration options can be set using environment variables, such as :
   > env exaproxy.dns.timeout=20 ./sbin/exaproxy
or > env exaproxy_dns_timeout=20 ./sbin/exaproxy
or > export exaproxy_dns_timeout=20; ./sbin/exaproxy

Multiple environment values can be set
and the order of preference is :
 - 1 : command line env value using dot separated notation
 - 2 : exported value from the shell using dot separated notation
 - 3 : command line env value using underscore separated notation
 - 4 : exported value from the shell using underscore separated notation
 - 5 : the value in the ini configuration file

The following UNIX signal are acted on :
 - SIGUSR1  : decrease the maximum number of processes
 - SIGUSR2  : increase the mininum number of processes
 - SIGTTOU  : stop listening for new proxy connections
 - SIGTTIN  : start listening for new proxy connections
 - SIGQUIT  : stop listening and exit when exiting connections are all closed
 - SIGTERM  : terminate the program immediatly (SIGINT too atm)

Valid configuration options are :

 - exaproxy.daemon.daemonize      : should we run in the background. default (false)
 - exaproxy.daemon.identifier     : a name for the log (to diferenciate multiple instances more easily). default (ExaProxy)
 - exaproxy.daemon.pidfile        : where to save the pid if we manage it. default ('')
 - exaproxy.daemon.poll-interfaces : periodically poll for local addresses the proxy should not connect to. default (true)
 - exaproxy.daemon.reactor        : what event mechanism to use (select/epoll). default ('epoll')
 - exaproxy.daemon.speed          : when waiting for connection how long are we sleeping for. default (2)
 - exaproxy.daemon.user           : user to run as. default ('nobody')
 - exaproxy.debug.log             : command line option --debug. default (false)
 - exaproxy.debug.memory          : command line option --memory. default (false)
 - exaproxy.debug.pdb             : command line option --pdb. default (false)
 - exaproxy.dns.definitions       : location of file defining dns query types. default ('etc/exaproxy/dns/types')
 - exaproxy.dns.fqdn              : only resolve FQDN (hostnames must have a dot. default (true)
 - exaproxy.dns.resolver          : resolver file. default ('/etc/resolv.conf')
 - exaproxy.dns.retries           : how many times to retry sending requests. default (10)
 - exaproxy.dns.timeout           : how long to wait for DNS replies before retrying. default (2)
 - exaproxy.dns.ttl               : amount of time (in seconds) we will cache dns results for. default (900)
 - exaproxy.http.allow-connect    : allow client to use CONNECT and https connections. default (true)
 - exaproxy.http.connections      : the maximum number of proxy connections. default (32768)
 - exaproxy.http.expect           : block messages with EXPECT headers with a 417. default (false)
 - exaproxy.http.extensions       : allow new HTTP method (space separated). default ('')
 - exaproxy.http.forward          : read client address from this header (normally x-forwarded-for). default ('')
 - exaproxy.http.header-size      : maximum size in bytes for HTTP headers (0 : unlimited). default (65536)
 - exaproxy.http.idle-connect     : time before we abandon new inactive http client connections (0: unlimited). default (300)
 - exaproxy.http.proxied          : request is encapsulated with haproxy proxy protocol. default (false)
 - exaproxy.http.transparent      : do not reveal the presence of the proxy. default (false)
 - exaproxy.log.client            : log messages from the client subsystem. default (true)
 - exaproxy.log.configuration     : log messages from the configuration subsystem. default (true)
 - exaproxy.log.daemon            : log messages from the daemon subsystem. default (true)
 - exaproxy.log.destination       : where syslog should log. default ('stdout')
 - exaproxy.log.download          : log messages from the download subsystem. default (true)
 - exaproxy.log.enable            : enable traffic logging. default (true)
 - exaproxy.log.header            : log messages from the header subsystem. default (true)
 - exaproxy.log.http              : log messages from the http subsystem. default (true)
 - exaproxy.log.level             : log message with at least the priority logging.<level>. default (ERROR)
 - exaproxy.log.manager           : log messages from the manager subsystem. default (true)
 - exaproxy.log.resolver          : log messages from the dns subsystem. default (true)
 - exaproxy.log.server            : log messages from the server subsystem. default (true)
 - exaproxy.log.signal            : log messages from the signal subsystem. default (true)
 - exaproxy.log.supervisor        : log messages from the supervisor subsystem. default (true)
 - exaproxy.log.web               : log messages from the web subsystem. default (true)
 - exaproxy.log.worker            : log messages from the worker subsystem. default (true)
 - exaproxy.profile.destination   : save profiling to file (instead of to the screen on exit). default ('stdout')
 - exaproxy.profile.enable        : enable profiling. default (false)
 - exaproxy.proxy.version         : ExaProxy's version. default (unknown)
 - exaproxy.redirector.enable     : use redirector programs to filter http request. default (false)
 - exaproxy.redirector.maximum    : maximum number of worker threads (forked program). default (25)
 - exaproxy.redirector.minimum    : minimum number of worker threads (forked program). default (5)
 - exaproxy.redirector.program    : the program used to know where to send request. default ('etc/exaproxy/redirector/url-allow')
 - exaproxy.redirector.protocol   : what protocol to use (url -> squid like / icap:://<uri> -> icap like). default ('url')
 - exaproxy.security.connect      : ports allowed with CONNECT. default ('443 981 7000')
 - exaproxy.security.local        : ip:port for allowed services (*:80 or 127.0.0.1:* allowed). default ()
 - exaproxy.tcp4.backlog          : when busy how many connection should the OS queue for us. default (200)
 - exaproxy.tcp4.bind             : which ipv4 to use when creating outbound connection. default ('0.0.0.0')
 - exaproxy.tcp4.host             : the host the proxy listen on. default ('127.0.0.1')
 - exaproxy.tcp4.listen           : should we listen for connections over IPv4. default (true)
 - exaproxy.tcp4.out              : allow connections to remote web servers over IPv4. default (true)
 - exaproxy.tcp4.port             : the port the proxy listen on. default (3128)
 - exaproxy.tcp4.timeout          : time before we abandon inactive established connections. default (5)
 - exaproxy.tcp6.backlog          : when busy how many connection should the OS queue for us. default (200)
 - exaproxy.tcp6.bind             : which ipv6 to use when creating outbound connection. default ('::')
 - exaproxy.tcp6.host             : the host the proxy listen on. default ('::1')
 - exaproxy.tcp6.listen           : should we listen for connections over IPv6. default (false)
 - exaproxy.tcp6.out              : allow connections to remote web servers over IPv6. default (true)
 - exaproxy.tcp6.port             : the port the proxy listen on. default (3128)
 - exaproxy.tcp6.timeout          : time before we abandon inactive established connections. default (5)
 - exaproxy.usage.destination     : where syslog should log. default ('stdout')
 - exaproxy.usage.enable          : enable traffic logging. default (false)
 - exaproxy.web.connections       : the maximum number of web connections. default (100)
 - exaproxy.web.debug             : allow to debug the program via the web client (do not use in production). default (false)
 - exaproxy.web.enable            : enable the built-in webserver. default (true)
 - exaproxy.web.host              : the address the web server listens on. default ('127.0.0.1')
 - exaproxy.web.html              : where internal proxy html pages are served from. default ('etc/exaproxy/html')
 - exaproxy.web.port              : port the web server listens on. default (8080)

show the running settings, ini format

»› ./sbin/exaproxy -fi

[daemon]
daemonize = false
identifier = ExaProxy
pidfile = ''
poll-interfaces = true
reactor = 'epoll'
speed = 2
user = 'nobody'

[dns]
definitions = 'etc/exaproxy/dns/types'
fqdn = true
resolver = '/var/run/resolv.conf'
retries = 10
timeout = 2
ttl = 900

[http]
allow-connect = true
connections = 32768
expect = false
extensions = ''
forward = ''
header-size = 65536
idle-connect = 300
proxied = false
transparent = false

[log]
client = true
configuration = true
daemon = true
destination = 'stdout'
download = true
enable = true
header = true
http = true
level = ERROR
manager = true
resolver = true
server = true
signal = true
supervisor = true
web = true
worker = true

[profile]
destination = 'stdout'
enable = false

[redirector]
enable = false
maximum = 25
minimum = 5
program = 'etc/exaproxy/redirector/url-allow'
protocol = 'url'

[security]
connect = '443 981 7000'
local = ''

[tcp4]
backlog = 200
bind = '0.0.0.0'
host = '127.0.0.1'
listen = true
out = true
port = 3128
timeout = 5

[tcp6]
backlog = 200
bind = '::'
host = '::1'
listen = false
out = true
port = 3128
timeout = 5

[usage]
destination = 'stdout'
enable = false

[web]
connections = 100
debug = false
enable = true
host = '127.0.0.1'
html = 'etc/exaproxy/html'
port = 8080

show the running settings, env format

»› ./sbin/exaproxy -fe

exaproxy.profile.enable=false
exaproxy.profile.destination='stdout'
exaproxy.web.enable=true
exaproxy.web.connections=100
exaproxy.web.host='127.0.0.1'
exaproxy.web.html='etc/exaproxy/html'
exaproxy.web.debug=false
exaproxy.web.port=8080
exaproxy.daemon.reactor='epoll'
exaproxy.daemon.daemonize=false
exaproxy.daemon.user='nobody'
exaproxy.daemon.identifier=ExaProxy
exaproxy.daemon.speed=2
exaproxy.daemon.pidfile=''
exaproxy.daemon.poll-interfaces=true
exaproxy.http.header-size=65536
exaproxy.http.allow-connect=true
exaproxy.http.proxied=false
exaproxy.http.connections=32768
exaproxy.http.extensions=''
exaproxy.http.expect=false
exaproxy.http.idle-connect=300
exaproxy.http.forward=''
exaproxy.http.transparent=false
exaproxy.log.web=true
exaproxy.log.daemon=true
exaproxy.log.enable=true
exaproxy.log.supervisor=true
exaproxy.log.level=ERROR
exaproxy.log.signal=true
exaproxy.log.destination='stdout'
exaproxy.log.worker=true
exaproxy.log.server=true
exaproxy.log.header=true
exaproxy.log.manager=true
exaproxy.log.client=true
exaproxy.log.resolver=true
exaproxy.log.download=true
exaproxy.log.http=true
exaproxy.log.configuration=true
exaproxy.usage.enable=false
exaproxy.usage.destination='stdout'
exaproxy.tcp6.bind='::'
exaproxy.tcp6.host='::1'
exaproxy.tcp6.timeout=5
exaproxy.tcp6.listen=false
exaproxy.tcp6.port=3128
exaproxy.tcp6.backlog=200
exaproxy.tcp6.out=true
exaproxy.dns.retries=10
exaproxy.dns.resolver='/var/run/resolv.conf'
exaproxy.dns.fqdn=true
exaproxy.dns.timeout=2
exaproxy.dns.ttl=900
exaproxy.dns.definitions='etc/exaproxy/dns/types'
exaproxy.tcp4.bind='0.0.0.0'
exaproxy.tcp4.host='127.0.0.1'
exaproxy.tcp4.timeout=5
exaproxy.tcp4.listen=true
exaproxy.tcp4.port=3128
exaproxy.tcp4.backlog=200
exaproxy.tcp4.out=true
exaproxy.security.local=''
exaproxy.security.connect='443 981 7000'
exaproxy.redirector.protocol='url'
exaproxy.redirector.enable=false
exaproxy.redirector.program='etc/exaproxy/redirector/url-allow'
exaproxy.redirector.minimum=5
exaproxy.redirector.maximum=25
Clone this wiki locally