Commit Graph

67 Commits

Author SHA1 Message Date
rofl0r
c2d4114427 add support for asciidoctor to generate manpages
asciidoctor is a modern replacement for asciidoc and much more lightweight,
issuing "apt-get install asciidoc" on ubuntu 16.04 results in an attempt to
install more than 1.3 GB of dependencies.
2020-08-11 15:25:02 +01:00
LucasVerneyDGE
25e2cc330c add a comment example in the filter file example 2020-07-06 12:20:58 +01:00
rofl0r
f6d4da5d81 do hostname resolution only when it is absolutely necessary for ACL check
tinyproxy used to do a full hostname resolution whenever a new client
connection happened, which could cause very long delays (as reported in #198).

there's only a single place/scenario that actually requires a hostname, and
that is when an Allow/Deny rule exists for a hostname or domain, rather than
a raw IP address. since it is very likely this feature is not very widely used,
it makes absolute sense to only do the costly resolution when it is unavoidable.
2019-12-21 00:43:45 +00:00
rofl0r
b935dc85c3 simplify codebase by using one thread/conn, instead of preforked procs
the existing codebase used an elaborate and complex approach for
its parallelism:

5 different config file options, namely

- MaxClients
- MinSpareServers
- MaxSpareServers
- StartServers
- MaxRequestsPerChild

were used to steer how (and how many) parallel processes tinyproxy
would spin up at start, how many processes at each point needed to
be idle, etc.
it seems all preforked processes would listen on the server port
and compete with each other about who would get assigned the new
incoming connections.
since some data needs to be shared across those processes, a half-
baked "shared memory" implementation was provided for this purpose.
that implementation used to use files in the filesystem, and since
it had a big FIXME comment, the author was well aware of how hackish
that approach was.

this entire complexity is now removed. the main thread enters
a loop which polls on the listening fds, then spins up a new
thread per connection, until the maximum number of connections
(MaxClients) is hit. this is the only of the 5 config options
left after this cleanup. since threads share the same address space,
the code necessary for shared memory access has been removed.
this means that the other 4 mentioned config option will now
produce a parse error, when encountered.

currently each thread uses a hardcoded default of 256KB per thread
for the thread stack size, which is quite lavish and should be
sufficient for even the worst C libraries, but people may want
to tweak this value to the bare minimum, thus we may provide a new
config option for this purpose in the future.
i suspect that on heavily optimized C libraries such a musl, a
stack size of 8-16 KB per thread could be sufficient.

since the existing list implementation in vector.c did not provide
a way to remove a single item from an existing list, i added my
own list implementation from my libulz library which offers this
functionality, rather than trying to add an ad-hoc, and perhaps
buggy implementation to the vector_t list code. the sblist
code is contained in an 80 line C file and as simple as it can get,
while offering good performance and is proven bugfree due to years
of use in other projects.
2019-12-21 00:43:45 +00:00
rofl0r
04f68e21e7 tinyproxy.8: remove l flag from short options 2018-09-05 00:57:23 +02:00
Michael Adam
8333a4bb1a docs: update the copyright notice in the manpages
Signed-off-by: Michael Adam <obnox@samba.org>
2018-09-01 04:06:59 +02:00
Michael Adam
56f30a4386 main: remove the "-l" switch to display the license and authors
Signed-off-by: Michael Adam <obnox@samba.org>
2018-09-01 04:06:59 +02:00
rofl0r
e78b461607 update upstream syntax in manpage template 2018-02-25 23:52:23 +00:00
Michael Adam
1e93411810 Merge pull request #59 from gmp216/pull
Fix OS X build
2017-01-04 16:21:27 +01:00
Greg
802a6aa93f Added conditional for xmllint by testing "a2x" without the -L flag. 2017-01-04 09:18:20 -05:00
rofl0r
909528e29c ship manpages as part of the dist tarball
`make dist` now creates the manpages and puts them into the tarball, so
the user does not need to have `a2x` installed to build them.

closes #2
2016-12-20 21:06:20 +00:00
rofl0r
ee83293285 update URL 2016-01-03 21:16:21 +00:00
Mukund Sivaraman
ec86c15d5a Minor whitespace fix 2011-08-16 17:44:17 +05:30
Mukund Sivaraman
50e3a0f6d9 Fix typo in manpage 2010-05-30 10:01:36 +05:30
Mukund Sivaraman
7c39cdfe1d Use complete sentences in the manpages 2010-04-22 21:14:27 +05:30
Mukund Sivaraman
1e0ad98f7f Just fix the support URLs 2010-03-28 10:33:38 +05:30
Mukund Sivaraman
34088e2175 Revert "Update Tinyproxy website URLs"
This reverts commit b108162dfb.
2010-03-28 10:27:40 +05:30
Mukund Sivaraman
b108162dfb Update Tinyproxy website URLs 2010-03-27 08:22:51 +05:30
Michael Adam
e87c856487 change the default pid file location to "@LOCALSTATEDIR@/run/tinyproxy/tinyproxy.pid"
I.e., add a tinyproxy subdirectory.
This is meant to ease running tinyproxy as non-root user.
The subdirectory can be used to give the tinyproxy user
write permission.

Michael
2010-03-02 23:39:30 +01:00
Michael Adam
cfa5792880 change the default log file location to "@LOCALSTATEDIR@/log/tinyproxy/tinyproxy.log"
i.e. add a tinyproxy subdirectory.
This is meant to ease running tinyproxy as non-root user
the subdirectory can be used to give the tinyproxy user
write permission.

Michael
2010-03-02 23:39:21 +01:00
Mukund Sivaraman
41d80861e3 Fix typo in manpage 2010-01-25 19:35:30 +05:30
Mukund Sivaraman
d3df735f89 Add author sections to the manpages 2010-01-16 16:42:02 +05:30
Mukund Sivaraman
74334a7700 Add see-also sections to the manpages 2010-01-16 16:40:48 +05:30
Michael Adam
b106091343 Happy new year 2010! 2010-01-10 13:53:03 +01:00
Michael Adam
594df6bf43 Happy new year 2010! 2010-01-10 13:52:17 +01:00
Mukund Sivaraman
9c0c3d5ced [BB#17] Add custom HTTP request headers to outgoing HTTP requests 2010-01-08 22:05:17 +05:30
Mukund Sivaraman
e5abe844d1 Use named lists to match rest of the document 2010-01-03 20:50:07 +05:30
Mukund Sivaraman
9e79e9975f Modify description of LogLevel in manpage 2010-01-03 20:46:37 +05:30
Mukund Sivaraman
70e8197344 Use proper asciidoc formatting in manpage 2010-01-03 20:14:43 +05:30
Mukund Sivaraman
34f9e5f95e Fix caps in manpage 2010-01-03 20:14:29 +05:30
Mukund Sivaraman
c42fbaaf80 Make asciidoc a requirement for building Tinyproxy
asciidoc is necessary as the version number is added during
configure into the asciidoc manpage sources. So simply bundling
a pre-generated manpage won't do.
2009-11-14 16:34:06 +05:30
Mukund Sivaraman
2061a18313 Revert "Don't cleanup generated and dist'ed manpages"
This reverts commit 276ca8369d.
2009-11-14 16:16:49 +05:30
Mukund Sivaraman
66abbbe72d Use located a2x binary instead of hard-coded name 2009-11-14 15:47:51 +05:30
Mukund Sivaraman
e71b3e08a6 Mark all generated stuff with silent rules 2009-11-14 15:47:21 +05:30
Mukund Sivaraman
276ca8369d Don't cleanup generated and dist'ed manpages 2009-11-14 15:40:57 +05:30
Michael Adam
41dd25d8e6 docs: update description of STATHOST in tinyproxy(8)
Michael
2009-11-10 13:58:08 +01:00
Michael Adam
cbb179ef0b docs: document StatHost in tinyproxy.conf(5)
Michael
2009-11-10 13:58:07 +01:00
Michael Adam
db7f340b3a Document DisableViaHeader in the tinyproxy.conf(5) manpage. 2009-10-11 02:00:44 +02:00
Michael Adam
03b8e8bc19 Fix another typo in the tinyproxy.conf(5) manpage. 2009-10-10 22:24:02 +02:00
Michael Adam
add2685a55 Fix a typo in the tinyproxy.conf(5) manpage. 2009-10-10 22:23:28 +02:00
Mukund Sivaraman
92378a9085 docs: Fix typos in tinyproxy.conf manpage 2009-09-28 18:51:42 +05:30
Mukund Sivaraman
afcd38536b docs: Fix case 2009-09-28 16:26:19 +05:30
Michael Adam
5a77c9744a docs: document the reverse proxying options in tinyproxy.conf(5) 2009-09-28 12:18:52 +02:00
Michael Adam
f0cbc35ca9 docs: document ConnectPort in tinyproxy.conf(5) 2009-09-28 11:37:54 +02:00
Michael Adam
9ff9bd18fe docs: document Anonymous in tinproxy.conf(5) 2009-09-28 11:35:20 +02:00
Michael Adam
f1e5360ef1 docs: document the filtering options in tinyproxy.conf(5) 2009-09-28 11:24:34 +02:00
Michael Adam
33872928d5 docs: document ViaProxyName in tinyproxy.conf(5) 2009-09-28 11:24:34 +02:00
Michael Adam
8c31287805 docs: document Allow and Deny in tinyproxy.conf(5) 2009-09-28 11:24:34 +02:00
Michael Adam
42b072b863 docs: document MaxRequestsPerChild in tinyproy.conf(5) 2009-09-28 11:24:34 +02:00
Michael Adam
553b95b3ed docs: document StartServers in tinyproxy.conf(5) 2009-09-28 11:24:34 +02:00