Update README.
This commit is contained in:
parent
06a52879a8
commit
c375807e26
67
README.md
67
README.md
|
@ -1,40 +1,41 @@
|
|||
# gemini-demo-1
|
||||
# gemini-certificate-validation-demo-1
|
||||
|
||||
Minimal but usable interactive Gemini client in < 100 LOC of Python 3
|
||||
This is a minimal Gemini client capable of (self-signed) certificate
|
||||
validation using the additional network perspective of a Tor exit node.
|
||||
When the client encounters a new certificate for a host, it makes a TLS
|
||||
connection to the same host via Tor, in order to obtain its certificate
|
||||
from a second vantage point. The user is notified on certificate
|
||||
mismatch or connection failure.
|
||||
|
||||
## Rationale
|
||||
This method should detect any local man-in-the-middle attack
|
||||
(originating from the same LAN, for instance) and should also provide
|
||||
protection over a more or less broad area of the Internet, depending on
|
||||
the exit node's position in the network graph and its DNS resolution
|
||||
setup. Any attack will trigger an alert unless it affects both the user
|
||||
and the exit node (whether it's a BGP hijack, a DNS compromise or
|
||||
whatever else).
|
||||
|
||||
One of the original design criteria for the Gemini protocol was that
|
||||
"a basic but usable (not ultra-spartan) client should fit comfortably
|
||||
within 50 or so lines of code in a modern high-level language.
|
||||
Certainly not more than 100". This client was written to gauge how
|
||||
close to (or far from!) that goal the initial rough specification is.
|
||||
This validation method works best when the exit node is far from the
|
||||
user's position. Users may configure Tor to select specific exit nodes
|
||||
by setting
|
||||
the [ExitNodes](https://2019.www.torproject.org/docs/tor-manual.html.en#ExitNodes)
|
||||
and [StrictNodes](https://2019.www.torproject.org/docs/tor-manual.html.en#StrictNodes)
|
||||
options in their `torrc` file. The `ExitNodes` option accepts
|
||||
countries, IP address ranges and node fingerprints. For example, this
|
||||
is how to only select exits located in France:
|
||||
|
||||
## Capabilities
|
||||
```
|
||||
ExitNodes {fr}
|
||||
StrictNodes 1
|
||||
```
|
||||
|
||||
This crude but functional client:
|
||||
False alarms can be triggered by MITM attacks on the exit node's end.
|
||||
And, obviously, validation does not work for servers which block Tor.
|
||||
|
||||
* Has a minimal interactive interface for "Gemini maps"
|
||||
* Will print plain text in any encoding if it is properly declared in
|
||||
the server's response header
|
||||
* Will handle binary files using programs specified in `/etc/mailcap`
|
||||
(so you can, e.g. view images)
|
||||
* Will follow redirects
|
||||
* Will report errors
|
||||
* Does NOT DO ANY validation of TLS certificates
|
||||
Validated certificates are kept in memory for the duration of the
|
||||
browsing session. Tor is assumed to be listening on localhost, port
|
||||
9050.
|
||||
|
||||
It's a *snug* fit in 100 lines, but it's possible. A 50 LOC client
|
||||
would need to be much simpler.
|
||||
|
||||
## Usage
|
||||
|
||||
Run the script and you'll get a prompt. Type a Gemini URL (the scheme
|
||||
is implied, so simply entering e.g. `gemini.conman.org` will work) to
|
||||
visit a Gemini location.
|
||||
|
||||
If a Gemini menu is visited, you'll see numeric indices for links, ala
|
||||
VF-1 or AV-98. Type a number to visit that link.
|
||||
|
||||
There is very crude history: you can type `b` to go "back".
|
||||
|
||||
Type `q` to quit.
|
||||
This is a fork of Solderpunk's [minimal Gemini
|
||||
client](https://tildegit.org/solderpunk/gemini-demo-1) written in
|
||||
Python.
|
||||
|
|
Loading…
Reference in New Issue