1## 2## tinyproxy.conf -- tinyproxy daemon configuration file 3## 4## This example tinyproxy.conf file contains example settings 5## with explanations in comments. For decriptions of all 6## parameters, see the tinproxy.conf(5) manual page. 7## 8 9# 10# User/Group: This allows you to set the user and group that will be 11# used for tinyproxy after the initial binding to the port has been done 12# as the root user. Either the user or group name or the UID or GID 13# number may be used. 14# 15User nobody 16Group nobody 17 18# 19# Port: Specify the port which tinyproxy will listen on. Please note 20# that should you choose to run on a port lower than 1024 you will need 21# to start tinyproxy using root. 22# 23Port 8888 24 25# 26# Listen: If you have multiple interfaces this allows you to bind to 27# only one. If this is commented out, tinyproxy will bind to all 28# interfaces present. 29# 30#Listen 192.168.0.1 31 32# 33# Bind: This allows you to specify which interface will be used for 34# outgoing connections. This is useful for multi-home'd machines where 35# you want all traffic to appear outgoing from one particular interface. 36# 37#Bind 192.168.0.1 38 39# 40# BindSame: If enabled, tinyproxy will bind the outgoing connection to the 41# ip address of the incoming connection. 42# 43#BindSame yes 44 45# 46# Timeout: The maximum number of seconds of inactivity a connection is 47# allowed to have before it is closed by tinyproxy. 48# 49Timeout 600 50 51# 52# ErrorFile: Defines the HTML file to send when a given HTTP error 53# occurs. You will probably need to customize the location to your 54# particular install. The usual locations to check are: 55# /usr/local/share/tinyproxy 56# /usr/local/etc/tinyproxy 57# 58#ErrorFile 404 "@pkgdatadir@/404.html" 59#ErrorFile 400 "@pkgdatadir@/400.html" 60#ErrorFile 503 "@pkgdatadir@/503.html" 61#ErrorFile 403 "@pkgdatadir@/403.html" 62#ErrorFile 408 "@pkgdatadir@/408.html" 63 64# 65# DefaultErrorFile: The HTML file that gets sent if there is no 66# HTML file defined with an ErrorFile keyword for the HTTP error 67# that has occured. 68# 69DefaultErrorFile "@pkgdatadir@/default.html" 70 71# 72# StatHost: This configures the host name or IP address that is treated 73# as the stat host: Whenever a request for this host is received, 74# Tinyproxy will return an internal statistics page instead of 75# forwarding the request to that host. The default value of StatHost is 76# @TINYPROXY_STATHOST@. 77# 78#StatHost "@TINYPROXY_STATHOST@" 79# 80 81# 82# StatFile: The HTML file that gets sent when a request is made 83# for the stathost. If this file doesn't exist a basic page is 84# hardcoded in tinyproxy. 85# 86StatFile "@pkgdatadir@/stats.html" 87 88# 89# LogFile: Allows you to specify the location where information should 90# be logged to. If you would prefer to log to syslog, then disable this 91# and enable the Syslog directive. These directives are mutually 92# exclusive. If neither Syslog nor LogFile are specified, output goes 93# to stdout. 94# 95LogFile "@localstatedir@/log/tinyproxy.log" 96 97# 98# Syslog: Tell tinyproxy to use syslog instead of a logfile. This 99# option must not be enabled if the Logfile directive is being used. 100# These two directives are mutually exclusive. 101# 102#Syslog On 103 104# 105# LogLevel: Warning 106# 107# Set the logging level. Allowed settings are: 108# Critical (least verbose) 109# Error 110# Warning 111# Notice 112# Connect (to log connections without Info's noise) 113# Info (most verbose) 114# 115# The LogLevel logs from the set level and above. For example, if the 116# LogLevel was set to Warning, then all log messages from Warning to 117# Critical would be output, but Notice and below would be suppressed. 118# 119LogLevel Info 120 121# 122# PidFile: Write the PID of the main tinyproxy thread to this file so it 123# can be used for signalling purposes. 124# If not specified, no pidfile will be written. 125# 126PidFile "@localstatedir@/run/tinyproxy.pid" 127 128# 129# XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which 130# contains the client's IP address. 131# 132#XTinyproxy Yes 133 134# 135# Upstream: 136# 137# Turns on upstream proxy support. 138# 139# The upstream rules allow you to selectively route upstream connections 140# based on the host/domain of the site being accessed. 141# 142# Syntax: upstream type (user:pass@)ip:port ("domain") 143# Or: upstream none "domain" 144# The parts in parens are optional. 145# Possible types are http, socks4, socks5, none 146# 147# For example: 148# # connection to test domain goes through testproxy 149# upstream http testproxy:8008 ".test.domain.invalid" 150# upstream http testproxy:8008 ".our_testbed.example.com" 151# upstream http testproxy:8008 "192.168.128.0/255.255.254.0" 152# 153# # upstream proxy using basic authentication 154# upstream http user:pass@testproxy:8008 ".test.domain.invalid" 155# 156# # no upstream proxy for internal websites and unqualified hosts 157# upstream none ".internal.example.com" 158# upstream none "www.example.com" 159# upstream none "10.0.0.0/8" 160# upstream none "192.168.0.0/255.255.254.0" 161# upstream none "." 162# 163# # connection to these boxes go through their DMZ firewalls 164# upstream http cust1_firewall:8008 "testbed_for_cust1" 165# upstream http cust2_firewall:8008 "testbed_for_cust2" 166# 167# # default upstream is internet firewall 168# upstream http firewall.internal.example.com:80 169# 170# You may also use SOCKS4/SOCKS5 upstream proxies: 171# upstream socks4 127.0.0.1:9050 172# upstream socks5 socksproxy:1080 173# 174# The LAST matching rule wins the route decision. As you can see, you 175# can use a host, or a domain: 176# name matches host exactly 177# .name matches any host in domain "name" 178# . matches any host with no domain (in 'empty' domain) 179# IP/bits matches network/mask 180# IP/mask matches network/mask 181# 182#Upstream http some.remote.proxy:port 183 184# 185# MaxClients: This is the absolute highest number of threads which will 186# be created. In other words, only MaxClients number of clients can be 187# connected at the same time. 188# 189MaxClients 100 190 191# 192# Allow: Customization of authorization controls. If there are any 193# access control keywords then the default action is to DENY. Otherwise, 194# the default action is ALLOW. 195# 196# The order of the controls are important. All incoming connections are 197# tested against the controls based on order. 198# 199Allow 127.0.0.1 200Allow ::1 201 202# BasicAuth: HTTP "Basic Authentication" for accessing the proxy. 203# If there are any entries specified, access is only granted for authenticated 204# users. 205#BasicAuth user password 206 207# 208# AddHeader: Adds the specified headers to outgoing HTTP requests that 209# Tinyproxy makes. Note that this option will not work for HTTPS 210# traffic, as Tinyproxy has no control over what headers are exchanged. 211# 212#AddHeader "X-My-Header" "Powered by Tinyproxy" 213 214# 215# ViaProxyName: The "Via" header is required by the HTTP RFC, but using 216# the real host name is a security concern. If the following directive 217# is enabled, the string supplied will be used as the host name in the 218# Via header; otherwise, the server's host name will be used. 219# 220ViaProxyName "tinyproxy" 221 222# 223# DisableViaHeader: When this is set to yes, Tinyproxy does NOT add 224# the Via header to the requests. This virtually puts Tinyproxy into 225# stealth mode. Note that RFC 2616 requires proxies to set the Via 226# header, so by enabling this option, you break compliance. 227# Don't disable the Via header unless you know what you are doing... 228# 229#DisableViaHeader Yes 230 231# 232# Filter: This allows you to specify the location of the filter file. 233# 234#Filter "@pkgsysconfdir@/filter" 235 236# 237# FilterURLs: Filter based on URLs rather than domains. 238# 239#FilterURLs On 240 241# 242# FilterExtended: Use POSIX Extended regular expressions rather than 243# basic. 244# 245#FilterExtended On 246 247# 248# FilterCaseSensitive: Use case sensitive regular expressions. 249# 250#FilterCaseSensitive On 251 252# 253# FilterDefaultDeny: Change the default policy of the filtering system. 254# If this directive is commented out, or is set to "No" then the default 255# policy is to allow everything which is not specifically denied by the 256# filter file. 257# 258# However, by setting this directive to "Yes" the default policy becomes 259# to deny everything which is _not_ specifically allowed by the filter 260# file. 261# 262#FilterDefaultDeny Yes 263 264# 265# Anonymous: If an Anonymous keyword is present, then anonymous proxying 266# is enabled. The headers listed are allowed through, while all others 267# are denied. If no Anonymous keyword is present, then all headers are 268# allowed through. You must include quotes around the headers. 269# 270# Most sites require cookies to be enabled for them to work correctly, so 271# you will need to allow Cookies through if you access those sites. 272# 273#Anonymous "Host" 274#Anonymous "Authorization" 275#Anonymous "Cookie" 276 277# 278# ConnectPort: This is a list of ports allowed by tinyproxy when the 279# CONNECT method is used. To disable the CONNECT method altogether, set 280# the value to 0. If no ConnectPort line is found, all ports are 281# allowed. 282# 283# The following two ports are used by SSL. 284# 285#ConnectPort 443 286#ConnectPort 563 287 288# 289# Configure one or more ReversePath directives to enable reverse proxy 290# support. With reverse proxying it's possible to make a number of 291# sites appear as if they were part of a single site. 292# 293# If you uncomment the following two directives and run tinyproxy 294# on your own computer at port 8888, you can access Google using 295# http://localhost:8888/google/ and Wired News using 296# http://localhost:8888/wired/news/. Neither will actually work 297# until you uncomment ReverseMagic as they use absolute linking. 298# 299#ReversePath "/google/" "http://www.google.com/" 300#ReversePath "/wired/" "http://www.wired.com/" 301 302# 303# When using tinyproxy as a reverse proxy, it is STRONGLY recommended 304# that the normal proxy is turned off by uncommenting the next directive. 305# 306#ReverseOnly Yes 307 308# 309# Use a cookie to track reverse proxy mappings. If you need to reverse 310# proxy sites which have absolute links you must uncomment this. 311# 312#ReverseMagic Yes 313 314# 315# The URL that's used to access this reverse proxy. The URL is used to 316# rewrite HTTP redirects so that they won't escape the proxy. If you 317# have a chain of reverse proxies, you'll need to put the outermost 318# URL here (the address which the end user types into his/her browser). 319# 320# If not set then no rewriting occurs. 321# 322#ReverseBaseURL "http://localhost:8888/" 323 324 325 326