Commit Briefs

0082f4263c Omar Polo

imsg: allow fdpass on the net socket (main)

it's used to pass the client certificate to the net process so has to be enabled. Issue <https://github.com/telescope-browser/telescope/issues/21> spotted by linuxcult; thank you!


7e8a397661 Omar Polo

cirrus.yml: bump to freebsd-14-2


c8b8dc5c50 Omar Polo

update imsg


cfe4e15a08 Omar Polo

pretiffy the makefile.am; no functional change


079783a6c9 Omar Polo

maintenance: mention updating the website as well


5eaa3e6b8d Omar Polo

switch to our build images


7a7f8f400c Omar Polo

fix display of certificate selection prompt


12be77f9b5 Omar Polo

make forward_line() keep the same column

We should probably instead introduce the concept of ``target column'' but for now this brings back the behaviour pre-point_offset introduction, even if it gets it wrong when tabulator characters are involved.


f853ec6f0c Omar Polo

handle tab characters

tab characters have their width depending on the column they're in, since they extend to the next multiple of 8. (citation needed?) So, keep track of the column when considering the length (in columns) of the text, so that we can render them properly. In the future we might want to turn them into spaces (either at read or render time) just to stay on the safe side in case not all terminals/ncurses implementations use 8 columns.


ec5e90b332 Omar Polo

fix pledges; ui needs `sendfd'

we need to send a file descriptor to the net process when we use a custom client certificate. Don't know how I missed it...


Branches

Tags

Tree

.cirrus.ymlcommits | blame
.github/
.gitignorecommits | blame
.woodpecker.yamlcommits | blame
ChangeLogcommits | blame
LICENSEcommits | blame
Makefile.amcommits | blame
README.mdcommits | blame
autogen.sh*commits | blame
bufio.ccommits | blame
bufio.hcommits | blame
certs.ccommits | blame
certs.hcommits | blame
cmd.ccommits | blame
cmd.hcommits | blame
compat/
compat.hcommits | blame
compl.ccommits | blame
compl.hcommits | blame
configure.accommits | blame
contrib/
control.ccommits | blame
control.hcommits | blame
data/
defaults.ccommits | blame
defaults.hcommits | blame
downloads.ccommits | blame
ev.ccommits | blame
ev.hcommits | blame
exec.ccommits | blame
exec.hcommits | blame
extra/
fs.ccommits | blame
fs.hcommits | blame
gencmd.awkcommits | blame
genemoji.sh*commits | blame
help.ccommits | blame
hist.ccommits | blame
hist.hcommits | blame
identity.ccommits | blame
imsgev.ccommits | blame
imsgev.hcommits | blame
iri.ccommits | blame
iri.hcommits | blame
keymap.ccommits | blame
keymap.hcommits | blame
keys/
libgrapheme/
mailcap.ccommits | blame
mailcap.hcommits | blame
maintenance/
mcache.ccommits | blame
mcache.hcommits | blame
mime.ccommits | blame
minibuffer.ccommits | blame
minibuffer.hcommits | blame
net.ccommits | blame
pagebundler.ccommits | blame
pages/
pages.hcommits | blame
parse.ycommits | blame
parser.ccommits | blame
parser.hcommits | blame
parser_gemtext.ccommits | blame
parser_gophermap.ccommits | blame
parser_textpatch.ccommits | blame
parser_textplain.ccommits | blame
sandbox.ccommits | blame
session.ccommits | blame
session.hcommits | blame
telescope-identity.1commits | blame
telescope.1commits | blame
telescope.ccommits | blame
telescope.hcommits | blame
test/
tofu.ccommits | blame
tofu.hcommits | blame
ui.ccommits | blame
ui.hcommits | blame
utf8.ccommits | blame
utf8.hcommits | blame
utils.ccommits | blame
utils.hcommits | blame
wrap.ccommits | blame
xwrapper.ccommits | blame
xwrapper.hcommits | blame

README.md

# Telescope

Telescope is a Emacs/w3m-inspired browser for the "small internet"
that supports Gemini, Gopher and Finger.

In features some expected stuff (tabs, bookmarks, history, client
certificates, ...) with an UI that's very much Emacs and w3m inspired,
and a privsep design.

There are still various things missing or, if you prefer, various
things that you can help develop :)

 - other "smol internet" protocols
 - subscriptions
 - TOFU out-of-band verification and/or DANE
 - multiple UIs: at the moment it uses only ncurses, but telescope
   shouldn't be restricted to TTYs only!

[![asciicast](https://asciinema.org/a/426862.svg)](https://asciinema.org/a/426862)


## Why yet another browser?

One of the great virtues of Gemini is its simplicity.  It means that
writing browsers or server is easy and thus a plethora of those
exists.  I myself routinely switch between a couple of them, depending
on my mood.

More browsers means more choice for the users, and more stability for
the protocol too.

However, Telescope was ultimately written for fun, on a whim, just to
play with ncurses, libtls, async I/O and the macros from `sys/queue.h`,
but I'd like to finish it into a complete Gemini browser.


## Goals

 - Fun: hacking on Telescope should be fun.
 - Clean: write readable and clean code mostly following the OpenBSD
   style(9) guideline.  Don't become a kitchen sink.
 - Secure: write secure code with privilege separation to mitigate the
   security risks of possible bugs.
 - Fast: it features a modern, fast, event-based asynchronous I/O
   model.
 - Cooperation: reuse existing conventions to allow inter-operations
   and easy migrations from/to other clients.


## TOFU

Telescope aims to use the "Trust, but Verify (where appropriate)"
approach outlined here:
[gemini://thfr.info/gemini/modified-trust-verify.gmi](gemini://thfr.info/gemini/modified-trust-verify.gmi).

The idea is to define three level of verification for a certificate:

 - **untrusted**: the server fingerprint does NOT match the stored
   value
 - **trusted**: the server fingerprint matches the stored one
 - **verified**: the fingerprint matches and has been verified
   out-of-band by the client.

Most of the time, the `trusted` level is enough, but where is
appropriate users should be able to verify out-of-band the
certificate.

At the moment there is no UI for out-of-band verification though.


## Building

Telescope depends on ncursesw, libtls or libretls, yacc/bison and
pkg-config.  [libgrapheme][libgrapheme] is an optional dependency:
there's a bundled copy but it's recommended to install it with a package
manager if available.

To build execute:

	$ ./autogen.sh		# only from git checkouts
	$ ./configure
	$ make
	$ sudo make install	# eventually

The configure script has optional support for building with libraries
provided by your distribution instead of using the bundled versions:

 - `--with-libbsd`: link with [libbsd][libbsd]
 - `--with-libimsg`: link with the [imsg-compat][imsg-compat] library

The default-editor can be changed at build-time with the following option:

 - `--with-default-editor`: defaults to `ed(1)`

This is useful for distributions such as Debian, which prefers
`sensible-editor(1)` as a wrapper.

This feature is mostly useful with the `mini-edit-external` command in
`telescope`.

[libbsd]:	https://libbsd.freedesktop.org
[imsg-compat]:	https://github.com/bsd-ac/imsg-compat
[libgrapheme]:	https://libs.suckless.org/libgrapheme/


## Contributing

Any form of contribution is appreciated, not only patches or bug
reports: feel free to open an issue or send an email to
`telescope@omarpolo.com`.

If you have a sample configuration, custom theme, a script or anything
that could be helpful to others, consider adding it to the `contrib`
directory.

Consider also joining the official
[irc channel](ircs://irc.libera.chat:6697/telescope),
`#telescope` on libera.chat!


## User files

Telescope stores user files according to the [XDG Base Directory
Specification][xdg] by default.  The usage and contents of these files
are described in [the man page](telescope.1), under "FILES".

At the moment, only one instance of Telescope can be running at time per
user.


## License

Telescope is distributed under a BSD-style licence.  The main code is
either under the ISC or is Public Domain, but some files under `compat/`
are 3-Clause BSD or MIT.  See the first few lines of every file or
`about:license` inside telescope for the copyright information.

`data/emoji.txt` is copyright © 2022 Unicode, Inc. and distributed
under the [UNICODE, Inc license agreement][unicode-license].


[unicode-license]: https://www.unicode.org/license.html
[xdg]: https://specifications.freedesktop.org/basedir-spec/latest/