tinyproxy.conf 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. ##
  2. ## tinyproxy.conf -- tinyproxy daemon configuration file
  3. ##
  4. #
  5. # Name of the user the tinyproxy daemon should switch to after the port
  6. # has been bound.
  7. #
  8. User tinyproxy
  9. Group tinyproxy
  10. #
  11. # Port to listen on.
  12. #
  13. Port 8888
  14. #
  15. # If you have multiple interfaces this allows you to bind to only one. If
  16. # this is commented out, tinyproxy will bind to all interfaces present.
  17. #
  18. #Listen 192.168.0.1
  19. #
  20. # The Bind directive allows you to bind the outgoing connections to a
  21. # particular IP address.
  22. #
  23. #Bind 192.168.0.1
  24. #
  25. # Timeout: The number of seconds of inactivity a connection is allowed to
  26. # have before it closed by tinyproxy.
  27. #
  28. Timeout 600
  29. #
  30. # ErrorFile: Defines the HTML file to send when a given HTTP error
  31. # occurs. You will probably need to customize the location to your
  32. # particular install. The usual locations to check are:
  33. # /usr/local/share/tinyproxy
  34. # /usr/share/tinyproxy
  35. # /etc/tinyproxy
  36. #
  37. # ErrorFile 404 "/usr/share/tinyproxy/404.html"
  38. # ErrorFile 400 "/usr/share/tinyproxy/400.html"
  39. # ErrorFile 503 "/usr/share/tinyproxy/503.html"
  40. # ErrorFile 403 "/usr/share/tinyproxy/403.html"
  41. # ErrorFile 408 "/usr/share/tinyproxy/408.html"
  42. #
  43. # DefaultErrorFile: The HTML file that gets sent if there is no
  44. # HTML file defined with an ErrorFile keyword for the HTTP error
  45. # that has occured.
  46. #
  47. DefaultErrorFile "/usr/share/tinyproxy/default.html"
  48. #
  49. # StatFile: The HTML file that gets sent when a request is made
  50. # for the stathost. If this file doesn't exist a basic page is
  51. # hardcoded in tinyproxy.
  52. #
  53. StatFile "/usr/share/tinyproxy/stats.html"
  54. #
  55. # Where to log the information. Either LogFile or Syslog should be set,
  56. # but not both.
  57. #
  58. Logfile "/var/log/tinyproxy.log"
  59. # Syslog On
  60. #
  61. # Set the logging level. Allowed settings are:
  62. # Critical (least verbose)
  63. # Error
  64. # Warning
  65. # Notice
  66. # Connect (to log connections without Info's noise)
  67. # Info (most verbose)
  68. # The LogLevel logs from the set level and above. For example, if the LogLevel
  69. # was set to Warning, than all log messages from Warning to Critical would be
  70. # output, but Notice and below would be suppressed.
  71. #
  72. LogLevel Critical
  73. #
  74. # PidFile: Write the PID of the main tinyproxy thread to this file so it
  75. # can be used for signalling purposes.
  76. #
  77. PidFile "/var/run/tinyproxy.pid"
  78. #
  79. # Include the X-Tinyproxy header, which has the client's IP address when
  80. # connecting to the sites listed.
  81. #
  82. #XTinyproxy mydomain.com
  83. #
  84. # Turns on upstream proxy support.
  85. #
  86. # The upstream rules allow you to selectively route upstream connections
  87. # based on the host/domain of the site being accessed.
  88. #
  89. # For example:
  90. # # connection to test domain goes through testproxy
  91. # upstream testproxy:8008 ".test.domain.invalid"
  92. # upstream testproxy:8008 ".our_testbed.example.com"
  93. # upstream testproxy:8008 "192.168.128.0/255.255.254.0"
  94. #
  95. # # no upstream proxy for internal websites and unqualified hosts
  96. # no upstream ".internal.example.com"
  97. # no upstream "www.example.com"
  98. # no upstream "10.0.0.0/8"
  99. # no upstream "192.168.0.0/255.255.254.0"
  100. # no upstream "."
  101. #
  102. # # connection to these boxes go through their DMZ firewalls
  103. # upstream cust1_firewall:8008 "testbed_for_cust1"
  104. # upstream cust2_firewall:8008 "testbed_for_cust2"
  105. #
  106. # # default upstream is internet firewall
  107. # upstream firewall.internal.example.com:80
  108. #
  109. # The LAST matching rule wins the route decision. As you can see, you
  110. # can use a host, or a domain:
  111. # name matches host exactly
  112. # .name matches any host in domain "name"
  113. # . matches any host with no domain (in 'empty' domain)
  114. # IP/bits matches network/mask
  115. # IP/mask matches network/mask
  116. #
  117. #Upstream some.remote.proxy:port
  118. #
  119. # This is the absolute highest number of threads which will be created. In
  120. # other words, only MaxClients number of clients can be connected at the
  121. # same time.
  122. #
  123. MaxClients 100
  124. #
  125. # These settings set the upper and lower limit for the number of
  126. # spare servers which should be available. If the number of spare servers
  127. # falls below MinSpareServers then new ones will be created. If the number
  128. # of servers exceeds MaxSpareServers then the extras will be killed off.
  129. #
  130. MinSpareServers 5
  131. MaxSpareServers 20
  132. #
  133. # Number of servers to start initially.
  134. #
  135. StartServers 10
  136. #
  137. # MaxRequestsPerChild is the number of connections a thread will handle
  138. # before it is killed. In practise this should be set to 0, which disables
  139. # thread reaping. If you do notice problems with memory leakage, then set
  140. # this to something like 10000
  141. #
  142. MaxRequestsPerChild 0
  143. #
  144. # The following is the authorization controls. If there are any access
  145. # control keywords then the default action is to DENY. Otherwise, the
  146. # default action is ALLOW.
  147. #
  148. # Also the order of the controls are important. The incoming connections
  149. # are tested against the controls based on order.
  150. #
  151. Allow 127.0.0.1
  152. Allow 192.168.1.0/25
  153. #
  154. # The "Via" header is required by the HTTP RFC, but using the real host name
  155. # is a security concern. If the following directive is enabled, the string
  156. # supplied will be used as the host name in the Via header; otherwise, the
  157. # server's host name will be used.
  158. #
  159. ViaProxyName "tinyproxy"
  160. #
  161. # The location of the filter file.
  162. #
  163. #Filter "/etc/tinyproxy/filter"
  164. #
  165. # Filter based on URLs rather than domains.
  166. #
  167. #FilterURLs On
  168. #
  169. # Use POSIX Extended regular expressions rather than basic.
  170. #
  171. #FilterExtended On
  172. #
  173. # Use case sensitive regular expressions.
  174. #
  175. #FilterCaseSensitive On
  176. #
  177. # Change the default policy of the filtering system. If this directive is
  178. # commented out, or is set to "No" then the default policy is to allow
  179. # everything which is not specifically denied by the filter file.
  180. #
  181. # However, by setting this directive to "Yes" the default policy becomes to
  182. # deny everything which is _not_ specifically allowed by the filter file.
  183. #
  184. #FilterDefaultDeny Yes
  185. #
  186. # If an Anonymous keyword is present, then anonymous proxying is enabled.
  187. # The headers listed are allowed through, while all others are denied. If
  188. # no Anonymous keyword is present, then all header are allowed through.
  189. # You must include quotes around the headers.
  190. #
  191. #Anonymous "Host"
  192. #Anonymous "Authorization"
  193. #
  194. # This is a list of ports allowed by tinyproxy when the CONNECT method
  195. # is used. To disable the CONNECT method altogether, set the value to 0.
  196. # If no ConnectPort line is found, all ports are allowed (which is not
  197. # very secure.)
  198. #
  199. # The following two ports are used by SSL.
  200. #
  201. ConnectPort 443
  202. ConnectPort 563