descriptionGemini client
homepage URLhttps://mbays.sdf.org/diohsc/
ownermbays@sdf.org
last changeTue, 17 Sep 2024 00:00:00 +0000 (17 00:00 +0000)
content tags
add:
README.md

Diohsc: Denotationally Intricate Obedient Haskell Smallnet Client

diohsc [URI]

Features

Building

Install the haskell package manager cabal; e.g. on a debian system:

$ sudo apt-get install cabal-install

Then in the diohsc directory, run

$ cabal update && cabal install

The resulting binary will be installed as ~/.cabal/bin/diohsc.

Compile-time options

Trusting server certificates

Diohsc uses "Trust On First Use": if a host provides a certificate chain you do not currently trust, the client will ask for confirmation then add the certificate for the host to a collection stored in ~/.diohsc/known_hosts/ if there isn't already one stored; if there is one already stored, it will give some details and ask if you want to overwrite it with the newly provided one.

You can also trust Certificate Authorities by putting their certificates in ~/.diohsc/trusted_certs/. For example, if you want to trust all the certificates installed on your system,

$ ln -s /etc/ssl/certs/* ~/.diohsc/trusted_certs/

or if you just want to trust Let's Encrypt:

$ mkdir ~/.diohsc/trusted_certs
$ wget -O ~/.diohsc/trusted_certs/lets-encrypt-x3-cross-signed.pem https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem
$ sha256sum ~/.diohsc/trusted_certs/lets-encrypt-x3-cross-signed.pem
e446c5e9dbef9d09ac9f7027c034602492437a05ff6c40011d7235fca639c79a /home/me/.diohsc/trusted_certs/lets-encrypt-x3-cross-signed.pem

Configuration

See diohscrc.sample for ideas for configuration options, in particular indicating how to make use of third-party software to allow diohsc to access gopher and the web, parse markdown and html, and provide ascii-art previews of image files. Copy the file to ~/.diohsc/diohscrc and uncomment lines as appropriate.

Multiple instances

Multiple simultaneous diohsc instances may share ~/.diohsc without serious conflict. However, command history is written only on exit, so the last instance to exit will determine that history. The log is appended to continuously, but read only on startup, so logs from simultaneous instances will be interleaved. Uris in ~/.diohsc/queue are taken by an instance on startup and whenever it processes a command, and leftover queue items are written there on exit.

To ensure that an instance won't interfere with other running instances: either use "--datadir" to specify an alternative directory to ~/.diohsc, or use the "--ghost" option (which also acts as a "private browsing" mode).

Running under Windows

It is apparently possible to compile and run diohsc on Windows. However, it requires a terminal with ANSI and unicode support, which it seems is not the default situation in even the most recent versions of Windows. On Windows 10, following the instructions of this link has been reported to work: https://akr.am/blog/posts/using-utf-8-in-the-windows-terminal

shortlog
2024-09-17 mbaysbrowse: shell-escape %s; add %S for unescapedmaster
2024-05-05 mbaysbump 0.1.15
2024-05-04 mbayshandle missing .diohsc/queues directory
2024-05-04 mbaysdiohscrc.sample: fix GMIR alias
2024-05-04 mbaysDon't interpret escaped terminal backslash in input...
2024-05-03 mbaysHandle 44 response with exponential backoff
2024-05-03 mbaysrender tabs as spaces in non-preformatted gemtext;...
2024-04-27 mbaysdisallow status codes 70-79
2024-04-27 mbaysallow connecting to TLS1.2 servers without EMS
2024-04-21 mbaysset >=tls-2.0 lower bound
2024-04-21 mbaysbump 0.1.14.7
2024-04-21 mbaysadapt error handling and RTT0 to tls-2.0
2024-04-21 mbaysdrop support for ciphers dropped by tls-2.0
2024-04-20 mbaysadapt SessionManager to tls-2.0
2024-04-20 mbaysbump upper bounds, including <tls-2.1
2024-04-20 mbaysbump 0.1.14.6
...
heads
2 months ago master
4 years ago clientCerts