]> Sergey Matveev's repositories - tofuproxy.git/blob - doc/usage.texi
70084563d14ad8ce6407ec49437f8ecaa0221981
[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}, @command{avifdec} 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
56 Load spying domains to reject to with:
57
58 @example
59 $ cat spies.txt > fifos/add-spies
60 @end example
61
62 @item Watch logs:
63
64 @example
65 $ ( cd fifos ; ./multitail.sh )
66 @end example
67
68 @image{logs,,,Example logs,.webp}
69
70 @item
71 When you encounter something requiring your attention and decision, you
72 will be shown Tk-dialog through the @command{wish} invocation. GnuTLS'es
73 @command{certtool} is used for certificate information printing.
74
75 @image{dialog,,,Example dialog,.webp}
76
77 @item
78 Certificate trust decision dialog (like above one) has multiple hotkeys:
79
80     @itemize
81     @item @code{a} -- accept and save certificate chain to disk
82     @item @code{o} -- accept once per session (@command{tofuproxy} running)
83     @item @code{r} -- reject certificate
84     @item @code{q} -- reject certificate really once, same as closing the window
85     @item @code{n} -- next page of "their" certificate chain
86     @item @code{p} -- previous page of "their" certificate chain
87     @item @code{N} -- next page of "our" certificate chain
88     @item @code{P} -- previous page of "our" certificate chain
89     @end itemize
90
91 @item
92 To list currently accepted, rejected, HTTP authorized, TLS client
93 authenticated hosts:
94
95 @example
96 $ cat fifos/list-@{accepted,rejected,http-auth,tls-auth@}
97 @end example
98
99 @item
100 To remove knowledge of the host from any of the states mentioned above:
101
102 @example
103 $ echo www.example.com > fifos/del-tls-auth
104 @end example
105
106 @end itemize