@node Usage
@unnumbered Usage

Currently @command{tofuproxy} uses:
GnuTLS'es @url{https://www.gnutls.org/manual/html_node/certtool-Invocation.html, certtool},
@url{https://www.tcl.tk/, Tcl/Tk}'s @command{wish} shell for GUI dialogues,
@command{dwebp}, @command{djxl}, @command{avifdec} for images transcoding,
@url{https://vanheusden.com/multitail/, multitail} for logs viewing.

@itemize

@item @ref{Install, Download} and build it.

@item
Create separate @file{state/} directory, generate @command{tofuproxy}'s
certificate and create necessary FIFOs by executing @command{state-init}
helper:

@example
$ mkdir state ; cd state
$ ../state-init
@end example

@item
Run @command{tofuproxy} itself then. By default it will bind to
@code{[::1]:8080} and use @code{[::1]:53} DNS server for DANE requests
(set to an empty string to disable DANE lookups):

@example
$ ../cmd/tofuproxy/tofuproxy [-ai ecdsa] -unzstd ../cmd/zstd/unzstd
main.go:70: listening: [::1]:8080 dns: [::1]:53 certs: ./certs ccerts: ./ccerts
@end example

@item Trust your newly generated CA:

@example
# cat cert.pem >>/etc/ssl/cert.pem
@end example

@item Point you HTTP/HTTPS clients to @code{http://localhost:8080} proxy.

@item Watch logs:

@example
$ ( cd fifos ; ../../fifos/multitail )
@end example

@image{logs,,,Example logs,.webp}

@end itemize
