]> Sergey Matveev's repositories - tofuproxy.git/blob - doc/index.texi
Ability to remove hosts from the states, refactoring
[tofuproxy.git] / doc / index.texi
1 \input texinfo
2 @documentencoding UTF-8
3 @settitle tofuproxy
4
5 @copying
6 Copyright @copyright{} 2021 @email{stargrave@@stargrave.org, Sergey Matveev}
7 @end copying
8
9 @node Top
10 @top tofuproxy
11
12 @itemize
13
14 @item I am tired that various HTTPS clients (like browsers and feed
15 aggregators) use various TLS libraries with different features. NSS,
16 GnuTLS, OpenSSL... All of them sucks, comparing to Go's @code{crypto/tls}.
17
18 @item I tired that everyone provides very limited certificates trust
19 management capabilities, like either certificate or SPKI
20 @url{https://en.wikipedia.org/wiki/Certificate_pinning, pinning} with
21 @url{https://en.wikipedia.org/wiki/Trust_on_first_use, TOFU}. Even my
22 beloved @url{https://en.wikipedia.org/wiki/Xombrero, Xombrero} browser
23 still pins only the whole certificate, but its public key would be much
24 more sufficient and convenient to work with.
25
26 @item I am tired that many clients provides very few information about
27 certificates and connections at all.
28
29 @item I hate that hardly anyone can control (no automatic silent
30 transparent following) HTTP redirections. Although Firefox had proper
31 extensions for that.
32
33 @item I am sick of tiny control on URLs. The best you can is to use some
34 kind of @url{https://en.wikipedia.org/wiki/Privoxy, Privoxy}, but it is
35 not friendly with TLS connections, obviously.
36
37 @item Xombrero sometimes has problems with HTTP-based authorization.
38
39 @item Hardly anyone does
40 @url{https://en.wikipedia.org/wiki/DNS-based_Authentication_of_Named_Entities, DANE}
41 checks.
42
43 @item And there is insanity of downloading fonts.
44 Why the hell people just do not send PostScript documents instead!?
45
46 @item And wonderful @url{http://jpegxl.info/, JPEG XL} image format is
47 not supported by most browsers. Even pretty old
48 @url{https://developers.google.com/speed/webp, WebP} is not supported
49 everywhere. @url{https://aomediacodec.github.io/av1-avif/, AVIF} would
50 be useful too.
51
52 @end itemize
53
54 That is why I wrote @command{tofuproxy} -- pure Go HTTP proxy, MitMing
55 all HTTPS connections on the fly. It is written for my personal needs
56 exclusively, so many features are just directly hard-coded, instead of
57 creating some kind of complex configuration framework.
58
59 @itemize
60
61 @item
62 @strong{Effective} responses proxying, without storing them in the memory first.
63
64 @item
65 TLS connection between client and @command{tofuproxy} has the
66 @strong{proper hostname} set in ephemeral on-the-fly generated
67 certificate.
68
69 @item
70 @code{HEAD} method is forbidden.
71
72 @item
73 @code{www.reddit.com} is redirected to @code{old.reddit.com}.
74
75 @item
76 @url{https://habr.com/ru/all/, Хабр}'s resolution reduced images are
77 redirected to their full size variants.
78
79 @item
80 Various @strong{spying} domains (advertisement, tracking counters) are denied.
81
82 @item
83 Web @strong{fonts} downloads are forbidden.
84
85 @item
86 @strong{Permanent} HTTP @strong{redirects} are replaced with HTML page
87 with the link.
88
89 @item
90 @strong{Temporary} HTTP @strong{redirects} are replaced with HTML too,
91 if it is neither @url{https://newsboat.org/, Newsboat} nor image paths.
92
93 @item
94 @strong{WebP} images, if it is not Xombrero, is transcoded to PNG.
95
96 @item
97 @strong{JPEG XL} and @strong{AVIF} images are transparently transcoded
98 to PNG too.
99
100 @item
101 Default Go's checks are applied to all certificates. If they pass, then
102 certificate chain is saved on the disk (@strong{TOFU}). Future
103 connections are compared against it, warning you about SPKI change
104 (@strong{SPKI pinning}) and waiting for your decision either to accept
105 new chain (possibly once per session), or reject it.
106
107 @item
108 Even when native Go's checks are failed, you can still make a decision
109 to forcefully trust the domain.
110
111 @item
112 @strong{HTTP-based authorization} requests are intercepted and
113 user/password input dialogue is shown. It automatically loads
114 @strong{initial form} values from @strong{@file{.netrc}}.
115
116 @item
117 TLS @strong{client certificates} supported: separate dialogue window for
118 certificate choice.
119
120 @item
121 Optional @strong{DANE-EE} check is also made for each domain you visit.
122
123 @item
124 TLS @strong{session resumption} and @strong{keep-alives} are also supported.
125
126 @item
127 And Go itself tries also to act as a @url{https://http2.github.io/,
128 HTTP/2} client too.
129
130 @end itemize
131
132 @include usage.texi