diohsc: Gemini client

[ browser, gpl, program ] [ Propose Tags ]

Line-based command-oriented interactive client for the gemini protocol.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
libiconv

On windows: use libiconv for charset conversion (iconv is always used on POSIX systems, with no need for this flag)

Disabled
magic

Use libmagic to determine mimetypes of local files

Disabled
irilinks

Allow IRIs in gemtext links (preparing for likely spec change). Punycoding is not currently supported.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.1, 0.1.2, 0.1.3, 0.1.3.1, 0.1.4, 0.1.5, 0.1.6, 0.1.6.1, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.14.1, 0.1.14.2, 0.1.14.3, 0.1.14.4, 0.1.14.5, 0.1.14.6
Change log CHANGELOG.md
Dependencies asn1-encoding (<0.10), asn1-types (>=0.3.4 && <0.4), base (>=4.3 && <5), bytestring (>=0.10.4.0 && <0.12), containers (>=0.5.5.1 && <0.7), cryptonite (>=0.26 && <0.31), data-default-class (>=0.1.2.0 && <0.2), data-hash (>=0.2.0.1 && <0.3), directory (>=1.2.1.0 && <1.4), drunken-bishop (>=0.1.0.0 && <0.2), exceptions (>=0.10.4 && <0.11), filepath (>=1.3.0.2 && <1.5), haskeline (>=0.8 && <0.9), hourglass (>=0.2.12 && <0.3), iconv (>=0.4.1.3 && <0.5), memory (>=0.14 && <0.18), mime (>=0.4.0.2 && <0.5), mtl (>=2.1.3.1 && <2.4), network (>=2.4.2.3 && <3.2), network-simple (>=0.4.3 && <0.5), network-uri (>=2.6.3.0 && <2.8), parsec (>=3.1.5 && <3.2), pem (>=0.2.4 && <0.3), process (>=1.2.0.0 && <1.7), regex-compat (>=0.95.1 && <0.96), rset (<1.1), safe (>=0.3.19 && <0.4), temporary (>=1.3 && <1.4), terminal-size (>=0.3.2.1 && <0.4), text (>=1.1.0.0 && <2.1), tls (>=1.5.4 && <1.6), transformers (>=0.3.0.0 && <0.7), unix (>=2.7.0.1 && <2.8), x509 (>=1.7.5 && <1.8), x509-store (>=1.6.7 && <1.7), x509-validation (>=1.6.11 && <1.7) [details]
License GPL-3.0-only
Author Martin Bays
Maintainer mbays@sdf.org
Category Browser
Home page https://mbays.sdf.org/diohsc
Source repo head: git clone https://repo.or.cz/diohsc.git
Uploaded by mbays at 2022-05-15T11:47:36Z
Distributions NixOS:0.1.14.6
Executables diohsc
Downloads 2182 total (58 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2022-05-15 [all 1 reports]

Readme for diohsc-0.1.11

[back to package description]

Diohsc: Denotationally Intricate Obedient Haskell Smallnet Client

diohsc [URI]

Features

  • Simple line-based command-response terminal user interface with ANSI colour.
  • Terse but combinatorially expressive command language.
  • Navigational aids: history, marks, queue.
  • Facilities to invoke external commands and use per-scheme proxies.
  • Responses streamed to pager or external command.
  • Certificate checking with TOFU and/or explicitly trusted CAs.
  • Support for TLS resuming, 0RTT, and client certificates.
  • All configuration and certificates stored as user-manipulable files.
  • Extensive help.

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

  • cabal install -f magic: use libmagic to detect mimetypes of local files
  • cabal install -f irilinks: allow IRIs in gemtext links

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