FFPROXY(8)
πΈ NAME πΈ
okay so you opened the manual for ffproxy(8) and bestie, it's a filtering HTTP/HTTPS proxy server. that's the whole vibe. it filters, it proxies, it slays π
β¨ SYNOPSIS β¨
ffproxy [-p port] [-c ip|hostname] [-C ip|hostname] [-l children]
[-u uid|user -g gid|group] [-r dir] [-D datadir]
[-x proxyip|proxyhost -X proxyport] [-a ip|hostname] [-A port]
[-n piddir] [-f configfile] [-ds4bBhv]
π¦ DESCRIPTION π¦
okay so ffproxy is a filtering HTTP/HTTPS proxy server, and she does a lot. she can filter by host, by URL, and by header. custom header entries can be filtered and added, which is giving full control honestly π
she can even drop her privileges and optionally chroot(2) to some directory. logging to syslog(3) is supported, and so is using another auxiliary proxy server. there's also an HTTP accelerator feature (acting as a front-end to an HTTP server) included. contacting IPv6 servers as well as binding to IPv6 is supported, and it allows transparent IPv6 over IPv4 browsing (and vice versa). no cap.
remind that there is an alternative to command line options by using configuration files. see ffproxy.conf(5) and sample.config for details. it allows options that are not available on command line β so yeah, config files stay winning.
the following command line options are recognized. they specify general settings like IP to bind to or place of the db/ and html/ directories. note that arguments to options must be separated from the option by spaces, as are such options from each other. no squishing them together bestie, it's not that kind of party π
-p portβ bind to port. default is8080.-c ip|hostnameβ bind to IPv4. default is any IPv4.-C ip|hostnameβ bind to IPv6. default is any IPv6.-l childrenβ maximum number of child processes to be forked. that is, the maximum number of concurrent requests allowed. default is10.-u uid|user -g gid|groupβ change UID and GID. both options must be used (they're a package deal fr fr). default is not changing UID and GID.-r dirβ change rootchroot(7)to dir. used in conjunction with-uand-g. because ffproxy drops its privileges and chroots after reading the configuration files,-Dshould be set to.(the current dir). it might need/etc/resolv.confcopied asetc/resolv.confin its working directory. example:# cd /var/ffproxy ; /usr/local/bin/ffproxy -r /var/ffproxy -D . -d -u proxy -g proxy -f ""-x ip|hostnameβ specify IP (or hostname) of an auxiliary proxy server that the program will forward requests to. used together with-X.-X portβ port number of auxiliary proxy.-D dirβ location of thedb/andhtml/directories. for example, specifying-D /var/ffproxytells the proxy to search fordb/files in/var/ffproxy/db/andhtml/files in/var/ffproxy/html/.-a ip|hostnameβ auxiliary forward HTTP server to use (see section HTTP ACCELERATOR).-A portβ port to use for above. defaults to80.-n piddirβ directory to store fileffproxy.pidwith ffproxy pid inside. default is/var/run-f configfileβ user configuration file to load. please note that command line options get overwritten by set configuration file options. default location is/etc/ffproxy/ffproxy.conf. readffproxy.conf(5)for details. use-f ""to disable configuration files.-dβ run as daemon.-sβ be silent. don't log to syslog.-4β use IPv4 only. do not try contacting servers via IPv6.-bβ don't bind to IPv4. might be needed under Linux 2.4, due to a ``Feature'' IPv6 binds to IPv4, too. try using this option or bind to specific IPv6 address via-C.-Bβ don't bind to IPv6.-hβ show usage information.-vβ display version number.
π THE DB/ DIRECTORY π
the db/ directory contains files that control the behaviour of ffproxy. the files for filtering are prefixed by filter. access to the proxy server is controlled by files with prefix host.
π Filtering
requests or header entries to be filtered are matched by extended regular expressions or case insensitive by strings.
ffproxy is able to filter requests by host, header, remote header, and URL. the specific files are
filter.host.match
filter.header.drop
filter.header.entry
filter.header.match
filter.rheader.drop
filter.rheader.entry
filter.rheader.match
filter.url.match
files ending in drop specify requests to be completely filtered (dropped). files ending in entry specify header entries to be removed from the header. they are matched case insensitive without extended regular expressions. files ending in match specify extended regular expressions to be matched against header entries, host, or URL.
adding custom header entries is also supported β¨ the entries of file filter.header.add will be added to every outgoing request.
π Access Control
access to the proxy is controlled through the files prefixed host.
host.dyndns contains host names with dynamic IPv4 addresses. the host names are resolved to IPv4 addresses and compared to the client's IP. if it matches, access is granted.
host.ip contains static IPv4 and IPv6 address.
host.name contains official hostnames (reverse lookup).
except for host.dyndns, the files contain extended regular expressions. if any of the entries matches, access is granted π
π Layout of db/ Files
every mentioned file above must exist, although it may be empty. every entry is exactly one line. empty lines are ignored, as are lines beginning with a # (comments).
the location of the db/ directory may be specified by an argument to the command line option -D. if this option and configuration file option db_files_path are not used, ffproxy will search for db/ and html/ in /usr/share/ffproxy.
ffproxy comes with sample db/ files. they also contain needed and suggested entries, as described next.
π Suggested db/ file entries
the file filter.header.entry should contain following entries for the program's proper operation
Accept-Encoding:
Accept:
Connection:
Proxy-Connection:
Host:
first two lines are needed for browsers that send out Accept*: Headers but don't understand encoded data coming back from the proxy. Host: has to be removed, since proxies require absolute URIs (Host: is redundant).
filter.header.add should contain
Connection: close
Proxy-Connection: close
we removed the two entries through filter.header.entry and now implant our own to force disconnection after each request. main character energy honestly π
filter.rheader.entry should contain
Connection:
Proxy-Connection:
whatever the server answered, we remove it. periodt.
π THE HTML/ DIRECTORY π
this directory contains files with HTTP header and HTML that are sent to the user's browser if either an error occurred or a request was filtered. in the files, the variable $u will be replaced by the URL, $h by the host to connect to, and $c by the hostname of the client.
since the files are loaded into memory for faster execution, the size of each file is limited to about 8 kB (what is more than enough, the default files are under 1 kB).
the specific files are (every file must exist)
connect Connection failed (503)
filtered Request filtered (200)
invalid Invalid request (400)
post Unable to post data (400)
resolve Resolve error (503)
π HTTP ACCELERATOR π
ffproxy may also be used as a HTTP accelerator, that is, connecting to just one HTTP server and being a front-end to that. use accel_host and accel_port in configuration file or command line options -a and -A to use this feature.
default behaviour is not sending Host: header to allow insertion of a custom one via filter.header.add (see section THE DB/ DIRECTORY) or keeping the original one used by connecting client (Host: hast to be removed from default filter.header.entry, of course). to change this, use accel_user_host no in the configuration file. Host: accel_host:accel_port will be used then.
πΆοΈ TRANSPARENT OPERATION πΆοΈ
it is possible to redirect all HTTP traffic, that is, traffic to port 80, to the proxy's listening port. it will then transparently act as a HTTP proxy, the client not even knowing it is connecting to a proxy. sneaky, iconic, we love her π
on OpenBSD one could enable this by adding a line like
rdr on rl0 proto tcp from any to any port 80 -> 127.0.0.1 port 8080
to /etc/pf.conf. in this example, rl0 is the local interface. all traffic coming from rl0 directed to port 80 (HTTP standard port) is sent to 127.0.0.1:8080 where ffproxy is supposed to be listening.
π KEEP ALIVE π
the program supports keep alive on client to proxy connections. this is used automatically by default and may be disabled by setting use_keep_alive no in the configuration file.
π HTTPS OPERATION π
the proxy allows HTTPS proxying via implementation of the CONNECT request method. by default, only port 443 is allowed for CONNECT. this may be changed by using unrestricted_connect yes in the configuration file. timeout may also be tuned by timeout_connect seconds.
π RELOADING CONFIGURATION π
send a SIGHUP to the pid of the ffproxy master process to let it reload db/ files, html/ files, and configuration file. if no configuration file was specified, /etc/ffproxy/ffproxy.conf is tried. of course, only some changes to the program can be done at runtime. see ffproxy.conf(5) for details on options that may be changed at runtime.
ffproxy write its pid file ffproxy.pid in the directory specified by the command line parameter -n or the pid_dir setting in config file. default is /var/run.
π LOGGING π
by default, the proxy logs incorrect and filtered requests. to log all requests, use the configuration file keyword log_all_requests yes. please make sure that you separate the programs log output from that of other programs by modifying syslog.conf(5), since the output is very noisy. bestie she's a yapper when you let her log everything π
π FILES π
behaviour of ffproxy is determined by
- startup options given either on the command line or read from configuration files β
/etc/ffproxy/ffproxy.confis loaded by default. - the files in
db/which specify filtering options and who is allowed to connect and use ffproxy
π SEE ALSO π
sample.config for a sample configuration file
/etc/ffproxy/ffproxy.conf for default configuration file
ffproxy.conf(5) for details on config file
ffproxy.quick(7) for a short description of how to set up the proxy
http://faith.eu.org/programs.html for latest version and patches
regex(7), re_format(7), syslogd(8), chroot(2), kill(1)
π«Ά CONTRIBUTORS π«Ά
Dobrica Pavlinusic <dpavlin@rot13.org> provided patches for http accelerator feature
β VERSION β
this manual documents ffproxy 1.6 (2005-01-05).
send bug reports, comments, suggestions to <niklas@noxa.de>
π AUTHOR π
Okay bestie, one (1) absolute legend made this whole thing happen, and you have to give them their flowers π
- Niklas Olmes
<niklas@noxa.de>β yeah, that's the icon, the moment, the main character. Ifffproxyever came in clutch for you, this is the name you're thanking. Respect where respect is due, fr fr π«Ά
And that's a wrap on the whole page, bestie! You just read through ffproxy(8) β this version landed on Jan 5, 2005, so it's giving vintage, it's giving old-school Unix royalty, and honestly? It ate. π
β¨
Go forth, proxy responsibly, and remember: read the whole man page before you touch the config file. No cap. ππ
π¦ where this page comes from
- debian bookworm: ffproxy 1.6-12+b3 Β· GPL-2.0-or-later
- debian trixie: ffproxy 1.6-13 Β· GPL-2.0-or-later
- ubuntu jammy: ffproxy 1.6-12 Β· GPL-2.0-or-later
- ubuntu noble: ffproxy 1.6-12 Β· GPL-2.0-or-later
- ubuntu questing: ffproxy 1.6-13
- ubuntu resolute: ffproxy 1.6-14 Β· GPL-2.0-or-later
- ubuntu stonking: ffproxy 1.6-14 Β· GPL-2.0-or-later
- Copyright (c) 2002-2005 Niklas Olmes <niklas@noxa.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms