TINYPROXY.CONF(5)
π NAME π
Okay bestie, welcome to the TINYPROXY.CONF(5) page from the Tinyproxy manual β it's literally all about tinyproxy.conf, the Tinyproxy HTTP proxy daemon configuration file. Periodt. π
β¨ SYNOPSIS β¨
tinyproxy.conf
π¦ DESCRIPTION π¦
So tinyproxy(8) reads its configuration file, and that file is usually chillin' at /etc/tinyproxy/tinyproxy.conf β or you can pass it to Tinyproxy with -c on the command line. This manpage is here to explain the syntax and contents of that config file, no cap. π«Ά
The Tinyproxy configuration file contains key-value pairs, one per line. Lines starting with # and empty lines are comments and are ignored. Keywords are case-insensitive, whereas values are case-sensitive. Some string values must be enclosed in double quotes (") as noted below. Slay. πΈ
The possible keywords and their descriptions are as follows:
Userβ the user that the Tinyproxy process should run as, after the initial port-binding has been done as therootuser. You can specify either the user name or the UID. πGroupβ the group that the Tinyproxy process should run as, after the initial port-binding has been done as therootuser. You can specify either the group name or the GID. πPortβ the port that the Tinyproxy service will listen on. If the port is less than1024, you will need to start the Tinyproxy process as therootuser. π₯Listenβ by default, Tinyproxy listens for connections on all available interfaces, i.e. it listens on the wildcard address0.0.0.0. With this configuration parameter, Tinyproxy can be told to listen only on one specific address. π¦Bindβ this lets you specify which address Tinyproxy will bind to for outgoing connections. This parameter may be specified multiple times, and then Tinyproxy will try all the specified addresses in order. β¨BindSameβ if this boolean parameter is set toyes, then Tinyproxy will bind the outgoing connection to the IP address of the incoming connection that triggered the outgoing request. π«Timeoutβ the maximum number of seconds of inactivity a connection is allowed to have before it is closed by Tinyproxy. β³ErrorFileβ this parameter controls which HTML file Tinyproxy returns when a given HTTP error occurs. It takes two arguments: the error number and the location of the HTML error file. Enclose the file location in double quotes. πDefaultErrorFileβ the HTML template file returned when an error occurs for which no specific error file has been set. Enclose in double quotes. πStatHostβ the host name or IP address that is treated as thestat host. Enclose in double quotes. Whenever Tinyproxy receives a request for thestat host, it returns an internal statistics page instead of forwarding the request to that host. The template for this page can be configured with theStatFileconfiguration option. The default value ofStatHostistinyproxy.stats. πStatFileβ the HTML file that Tinyproxy sends in response to a request for thestat host. Enclose in double quotes. If this parameter is not set, Tinyproxy returns a hard-coded basic statistics page. See the STATHOST section in thetinyproxy(8)manual page for details. π- Note that the
StatFileand the error files configured withErrorFileandDefaultErrorFileare template files that can contain a few template variables that Tinyproxy expands prior to delivery. Examples are{cause}for an abbreviated error description and{detail}for a detailed error message. Thetinyproxy(8)manual page contains a description of all template variables. π
- Note that the
LogFileβ the location of the file to which Tinyproxy writes its debug output. Enclose in double quotes. Alternatively, Tinyproxy can log to syslog β see theSyslogoption. πSyslogβ when set toOn, this option tells Tinyproxy to write its debug messages to syslog instead of to a log file configured withLogFile. These two options are mutually exclusive. π«LogLevelβ sets the log level. Messages from the set level and above are logged. For example, if theLogLevelwas set toWarning, then all log messages fromWarningtoCriticalwould be output, butNoticeand below would be suppressed. Allowed values are:Critical(least verbose)ErrorWarningNoticeConnect(log connections withoutInfo's noise)Info(most verbose) π₯
PidFileβ the location of the file where the main Tinyproxy process stores its process ID for signaling purposes. Enclose in double quotes. π«ΆXTinyproxyβ setting this option toYestells Tinyproxy to add a headerX-Tinyproxycontaining the client's IP address to the request. πUpstreamβ this option allows you to set up a set of rules for deciding whether an upstream proxy server is to be used, based on the host or domain of the site being accessed. The rules are stored in the order encountered in the configuration file and the LAST matching rule wins. The following forms for specifying upstream rules exist:upstream type host:portturns proxy upstream support on generally.upstream type user:pass@host:portdoes the same, but uses the supplied credentials for authentication.upstream type host:port "site_spec"turns on the upstream proxy for the sites matchingsite_spec.typecan be one ofhttp,socks4,socks5,none.- a
site_specis either a full domain name, a domain name starting with a., in which case it is treated as a suffix, or an ip/mask tuple. thesite_specneeds to be double-quoted. π¦
upstream none "site_spec"turns off upstream support for sites matchingsite_spec; that means the connection is done directly.
It's recommended to use raw IP addresses to specify the upstream host, so no costly DNS lookup has to be done everytime it is used. IPv6 addresses need to be enclosed in square brackets. π
The site can be specified in various forms as a hostname, domain name or as an IP range:
nameβ matches host exactly.nameβ matches any host in domain "name".β matches any host with no domain (in 'empty' domain)IP/bitsβ matches network/maskIP/maskβ matches network/mask π«
Note that the upstream directive can also be used to null-route a specific target domain/host, e.g.: upstream http 0.0.0.0:0 ".adserver.com" π
MaxClientsβ Tinyproxy creates one thread for each connected client. This options specifies the absolute highest number processes that will be created. With other words, onlyMaxClientsclients can be connected to Tinyproxy simultaneously. π―Allow/Denyβ theAllowandDenyoptions provide a means to customize which clients are allowed to access Tinyproxy.AllowandDenylines can be specified multiple times to build the access control list for Tinyproxy. The order in the config file is important. If there are noAlloworDenylines, then all clients are allowed. Otherwise, the default action is to deny access. The argument toAlloworDenycan be a single IP address of a client host, like127.0.0.1or::1, an IP address range, like192.168.0.1/24, or a string that will be matched against the end of the client host name β i.e. this can be a full host name likehost.example.comor a domain name like.example.comor even a top level domain name like.com. Note that by adding a rule using a host or domain name, a costly name lookup has to be done for every new connection, which could slow down the service considerably. πBasicAuthβ configure HTTP "Basic Authentication" username and password for accessing the proxy. If there are any entries specified, access is only granted for authenticated users. π
BasicAuth user password
BasicAuthRealmβ in case "BasicAuth" is configured, the "realm" information. "Proxy Authentication Required" status http 407 "error-response" can be customized. π- defaults in code to "Tinyproxy" (
PACKAGE_NAME), if not configured.
- defaults in code to "Tinyproxy" (
AddHeaderβ configure one or more HTTP request headers to be added to outgoing HTTP requests that Tinyproxy makes. Note that this option will not work for HTTPS traffic, as Tinyproxy has no control over what headers are exchanged. β¨
AddHeader "X-My-Header" "Powered by Tinyproxy"
ViaProxyNameβ RFC 2616 requires proxies to add aViaheader to the HTTP requests, but using the real host name can be a security concern. If theViaProxynameoption is present, then its string value will be used as the host name in theViaheader. Otherwise, the server's host name will be used. Enclose in double quotes. π¦DisableViaHeaderβ when this is set to yes, Tinyproxy does NOT add theViaheader to the requests. This virtually puts Tinyproxy into stealth mode. Note that RFC 2616 requires proxies to set theViaheader, so by enabling this option, you break compliance. Don't disable theViaheader unless you know what you are doing... π
Bestie, for real, this one is a compliance-breaking stealth-mode move β do not touch it unless you know exactly what you're doing. π
Filterβ Tinyproxy supports filtering of web sites based on URLs or domains. This option specifies the location of the file containing the filter rules, one rule per line. π§
Rules are specified as POSIX basic regular expressions (BRE), unless another FilterType is specified. Comment lines start with a # character.
Example filter file contents:
# filter exactly cnn.com
^cnn\.com$
# filter all subdomains of cnn.com, but not cnn.com itself
.*\.cnn.com$
# filter any domain that has cnn.com in it, like xcnn.comfy.org
cnn\.com
# filter any domain that ends in cnn.com
cnn\.com$
# filter any domain that starts with adserver
^adserver
πΈ FilterType πΈ
Okay so this one lets you pick how your filter rules get matched, and you've got three flavors: bre, ere, or fnmatch.
breβ your rules in the filter file get matched with POSIX basic regular expressionsereβ same idea but POSIX extended regular expressionsfnmatchβ matching happens via thefnmatchfunction, exactly likeman 3p fnmatchsays. It's literally the same matching your shell uses to glob filenames, so for example*.google.comcatches everything ending in.google.comβ¨
Ngl, if you have no clue what a regular expression even is, or you're just importing filter lists from 3rd party sources, fnmatch is probably your girl. It's also the fastest of the three, so likeβ¦ win-win π
π¦ FilterURLs π¦
Set this boolean to Yes or On and filtering happens on URLs instead of domains. Default? Domain-based filtering, bestie.
Heads up! URL filtering only works in plain HTTP situations. HTTPS is literally everywhere these days, so this'll only work on a tiny fraction of websites β so like, don't use this option, fr fr π
π FilterExtended π
Deprecated. Use FilterType ere instead β that's the whole vibe now.
If you still set this boolean to Yes, extended POSIX regular expressions get used to match your filter rules. Default is basic POSIX regular expressions.
β FilterCaseSensitive β
Set this to Yes and your filter rules match in a case sensitive way. The default is case-insensitive matching, unfortunately π
The glow-up: set it to Yes and your matching is almost twice as fast. Obsessed.
Quick note though β this setting only affects the bre and ere FilterTypes. fnmatch is always case sensitive, no exceptions, periodt.
π FilterDefaultDeny π
The default filtering policy is: everything that isn't matched by a rule is allowed through. Setting FilterDefaultDeny to Yes flips that β now everything is denied except the domains or URLs your rules matched.
So in other words:
- set it to
Noβ your filter list is a blacklist - set it to
Yesβ your filter list is a whitelist
π§ Anonymous π§
If an Anonymous keyword shows up, anonymous proxying is enabled π. The headers you list with Anonymous are allowed through, and every other header gets denied. If there's no Anonymous keyword at all, then all headers are allowed through.
You must put double quotes around the headers, iykyk.
Most sites need cookies enabled to work right, so if you're hitting those sites, you'll need to let cookies through.
Example:
Anonymous "Host"
Anonymous "Authorization"
Anonymous "Cookie"
π ConnectPort π
This one lets you specify which ports are allowed for the CONNECT method. No ConnectPort line anywhere? Then all ports are allowed. Wanna kill CONNECT entirely? Just include a single ConnectPort line with a value of 0 π
π ReversePath π
Configure one or more ReversePath directives and boom β reverse proxy support is on. With reverse proxying you can make a bunch of sites appear as if they were all part of a single site. Main character energy for real.
Uncomment the following two directives and run Tinyproxy on your own computer at port 8888, and you can access example.com via http://localhost:8888/example/:
ReversePath "/example/" "http://www.example.com/"
πΈ ReverseOnly πΈ
When you're using Tinyproxy as a reverse proxy, it is STRONGLY recommended that you turn the normal proxy off by setting this boolean option to Yes. Like, please. For me. π«Ά
β¨ ReverseMagic β¨
Set this to Yes and Tinyproxy uses a cookie to track reverse proxy mappings. If you need to reverse proxy sites that have absolute links, you must use this option. Non-negotiable.
π¦ ReverseBaseURL π¦
The URL used to access this reverse proxy. It gets used to rewrite HTTP redirects so they don't escape the proxy. Got a chain of reverse proxies? Then put the outermost URL here β the address the end user types into his/her browser. If you don't set this option, then no rewriting of redirects happens at all.
π BUGS π
To report bugs in Tinyproxy, please visit <https://tinyproxy.github.io/>.
π SEE ALSO π
π AUTHOR π
This manpage was written by the Tinyproxy project team.
π COPYRIGHT π
Copyright (c) 1998-2024 the Tinyproxy authors.
This program is distributed under the terms of the GNU General Public License version 2 or above. See the COPYING file for additional information.
And that's a wrap, bestie! π«Ά This little beauty is from Tinyproxy Version 1.11.3, dated 2026-06-18, and it lives its best life as TINYPROXY.CONF(5). Go configure something iconic π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: tinyproxy 1.11.3-bp160.2.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: tinyproxy 1.11.3-bp160.2.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: tinyproxy 1.11.3-bp160.2.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: tinyproxy 1.11.3-bp160.2.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms