Kristall Small-Internet Browser

2021-03-06

A browser I created for Gemini, Gopher and HTTP.

software (29) network (10) qt (3) gemini (7) kristall (2)

Table of Contents
  1. The Browser
  2. Outlines
  3. The Protocols
  4. Gemini
  5. Gopher
  6. HTTP(S)
  7. Finger
  8. The Customization
  9. Themes
  10. Automatic Themes
  11. Dark Themes
  12. Light Themes
  13. Anonymity & Identity
  14. Links

The kristall logo

Select anchorThe Browser

Kristall is a browser for the so called Small Internet, a part of the net where people do focus on content over style. The gemini project brought me into this world and I liked it. But most people just used terminal based browsers, which was kinda not my style.

So I decided to create my own browser, and started a new project called Kristall. I quickly achieved good results with Gemini, and started adding support for more protocols and features.

Today, Kristall is nearly done and is on-par with oldschool browsers when it comes to features. The only thing Kristall still doesn’t like at all are served-defined styles and server-defined layouts.

Select anchorOutlines

The browser supports generation of outlines for websites that use headers:

This way, a quick navigation can be guaranteed for larger documents.

Select anchorThe Protocols

Kristall supports a good bunch of protocols, including HTTP, Gemini and Gopher.

Select anchorGemini

Gemini was the first protocol implemented, and the reason I created Kristall. The full specification is supported and you can easily utilize client certificates and other features.

Select anchorGopher

Gopher quickly followed the Gemini implementation, as a lot of people in the Small Internet still use Gopher to serve content.

I tried to implement a nice visual representation of Gopher maps that uses icons for certain content types to present it nicely to the user, but it’s also possible to just list the data as it was originally designed.

Select anchorHTTP(S)

HTTP(s) was also implemented and provided the major pain point when it came to content presentation:

Most content on the web is served via HTML, the thing people in the Small Internet want to get away from. Thus, Kristall features a unique way to display HTML:

It parses the whole content with gumbo, then processes the AST and yeets everything that isn’t recognized as content. This way, even pages like Spiegel Online can be read, even though they employ heavy styling and use of JavaScript.

This way, people can read news and other web pages with Kristall, and still adapt the pages to their own style.

Select anchorFinger

The Finger protocol is a small protocol where people can post their status with. I mainly implemented this because James Tomasino thought, it was a funny thing to support. So I did.

Now we can query information via a graphical finger client. How exciting!

Select anchorThe Customization

Customization was one of the key features that drive Kristall development. Basically all aspects of the browser can be customized:

Select anchorThemes

Kristall allows the user to basically customize text visualization completly to their liking. The form of the document can’t be changed, but the presentation can be set up very fine grained.

I put a special focus on providing information inside the coloring of links. Links can be rendered differently if they point to other hosts or other protocols so the user can see if they will leave the current site or not.

Also each element could be styled with different fonts to allow a quick distinction.

Select anchorAutomatic Themes

Displaying every page in the same style could be boring, and so I created a module that derives a color theme from the host name that will fill in a different color for each possible option.

The themes could be created both in a dark style (dark background, bright font) and a light style (bright background, dark font). The code tried to mix-and-match the colors in a way that a visual contrast is guaranteed.

The following two sections showcase both dark and light color schemes:

Select anchorDark Themes

Select anchorLight Themes

Select anchorAnonymity & Identity

As Gemini allows the user to identify themselves on a server only via a client certificate, Kristall provides both options to create ephemeral as well as persistent certificates:

The upper part of that dialog allows the user to select a persistent identity, while the buttons on the bottom will spawn a temporary identity that will be destroyed when either browser tab is closed or (optionally) the current domain is left.

As Gemini uses a TOFU scheme for authenticating servers, there’s also options to manage these identities:

It’s possible to both employ TOFU for Gemini and HTTP, but also both protocols are possible to use the CA system. This way, users can choose what kind of trust they have in the CA system, or just choose the last option: ignore everything, accept all certificates.

Select anchorLinks