]> Sergey Matveev's repositories - tofuproxy.git/blob - doc/usage.texi
Ability to remove hosts from the states, refactoring
[tofuproxy.git] / doc / usage.texi
1 @node Usage
2 @unnumbered Usage
3
4 @itemize
5
6 @item Currently @command{tofuproxy} uses:
7     GnuTLS'es @url{https://www.gnutls.org/manual/html_node/certtool-Invocation.html, certtool},
8     @url{http://cr.yp.to/redo.html, redo} build system,
9     @url{https://www.tcl.tk/, Tcl/Tk}'s @command{wish} shell for GUI dialogues,
10     @command{dwebp}, @command{djxl} for images transcoding,
11     @url{https://github.com/halturin/multitail, multitail} for logs viewing.
12
13 @item Download and build @command{tofuproxy}:
14
15 @example
16 $ git clone git://git.stargrave.org/tofuproxy.git
17 $ cd tofuproxy
18 $ redo all
19 @end example
20
21 @item
22 If build fails because of untrusted @code{ca.cypherpunks.ru} certificate, then:
23
24 @example
25 $ [fetch|wget] http://www.ca.cypherpunks.ru/cert.pem
26 $ [fetch|wget] http://www.ca.cypherpunks.ru/cert.pem.asc
27 $ gpg --auto-key-locate dane --locate-keys stargrave at stargrave dot org
28 $ gpg --auto-key-locate wkd --locate-keys stargrave at gnupg dot net
29 $ gpg --verify cert.pem.asc
30 $ SSL_CERT_FILE=`pwd`/cert.pem GIT_SSL_CAINFO=`pwd`/cert.pem redo all
31 @end example
32
33 @item
34 Run @command{tofuproxy} itself. By default it will bind to
35 @code{[::1]:8080}, use @code{[::1]:53} DNS server for DANE requests
36 (set to an empty string to disable DANE lookups):
37
38 @example
39 $ ./tofuproxy.cmd
40 main.go:70: listening: [::1]:8080 dns: [::1]:53 certs: ./certs ccerts: ./ccerts
41 @end example
42
43 @item Trust your newly generated CA:
44
45 @example
46 # cat cert.pem >> /etc/ssl/cert.pem
47 @end example
48
49 @item Point you HTTP/HTTPS clients to @code{http://localhost:8080}.
50
51 @item
52 If you want to use TLS client certificates, then place them to
53 @file{-ccerts} directory.
54
55 @item Watch logs:
56
57 @example
58 $ ( cd fifos ; ./multitail.sh )
59 @end example
60
61 @image{logs,,,Example logs,.webp}
62
63 @item
64 When you encounter something requiring your attention and decision, you
65 will be shown Tk-dialog through the @command{wish} invocation. GnuTLS'es
66 @command{certtool} is used for certificate information printing.
67
68 @image{dialog,,,Example dialog,.webp}
69
70 @item
71 To list currently accepted, rejected, HTTP authorized, TLS client
72 authenticated hosts:
73
74 @example
75 $ cat fifos/list-@{accepted,rejected,http-auth,tls-auth@}
76 @end example
77
78 @item
79 To remove knowledge of the host from any of the states mentioned above:
80
81 @example
82 $ echo www.example.com > fifos/del-tls-auth
83 @end example
84
85 @end itemize