telescope-browser/telescope
7
15
Fork
You've already forked telescope
3
browser for the small internet https://telescope-browser.org/
  • C 87.6%
  • Roff 3.8%
  • Shell 3%
  • Makefile 2.7%
  • Yacc 1.6%
  • Other 1.2%
Thomas Adam c499490087 parser_serialize: fflush()
If the amount of data being written to the FILE pointer ends up being a
lot, it's worth fflush()ing on it here, rather then relying on specific
callers to do so. This can happen if telescope is fetching HTML
content from an HTTP proxy, for example.
This helps to improve writes to disk, especially via the write-buffer
command.
2025年11月08日 19:59:53 +01:00
.github/ci CI: apt: don't install suggests/recommends 2024年06月11日 09:11:14 +00:00
compat update imsg 2025年03月28日 16:58:08 +00:00
contrib typos; courtesy of codespell 2024年09月01日 08:03:08 +00:00
data update emoji(-data).txt to unicode 15.0 2024年01月13日 18:01:25 +00:00
extra rename images -> extra 2022年02月13日 11:57:57 +00:00
keys key for next release 2025年05月10日 13:11:59 +00:00
libgrapheme add the libgrapheme makefile 2022年11月04日 18:38:22 +00:00
maintenance maintenance: mention updating the website as well 2024年11月10日 16:03:34 +00:00
pages contact: update to use issue tracker 2025年11月02日 16:27:43 +00:00
test test: simulate the empty documents 2024年06月28日 18:43:26 +00:00
.cirrus.yml cirrus.yml: bump to freebsd-14-2 2025年03月28日 17:18:09 +00:00
.gitignore ignore obj/ and build/ too 2024年01月23日 20:41:04 +00:00
.woodpecker.yaml switch to our build images 2024年10月22日 20:19:17 +00:00
autogen.sh add bunch of compats for compatibility 2021年03月08日 19:28:22 +00:00
bufio.c bufio: add bufio_io_err 2024年05月24日 20:53:59 +00:00
bufio.h bufio: increase default size 2025年09月14日 07:50:43 +01:00
certs.c typos; courtesy of codespell 2024年09月01日 08:03:08 +00:00
certs.h draft of telescope-identity(1) 2024年02月15日 09:01:37 +00:00
ChangeLog sync changelog 2025年05月10日 12:51:13 +00:00
cmd.c make forward_line() keep the same column 2024年10月22日 19:08:52 +00:00
cmd.h add mini-edit-external 2024年06月07日 18:25:58 +00:00
compat.h CI: Macos: fix fparseln() compilation 2024年06月14日 13:41:22 +01:00
compl.c untangle a bit buffers and parsers 2024年06月14日 22:15:12 +00:00
compl.h load and optionally remember client certificates 2024年02月05日 18:16:35 +00:00
configure.ac contact: update to use issue tracker 2025年11月02日 16:27:43 +00:00
control.c sun -> lsun; part of the unbreaking on solaris 2025年09月09日 22:45:30 +00:00
control.h convert telescope to use ev instead of libevent 2024年02月18日 23:09:32 +00:00
defaults.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
defaults.h feature: remove external-cmd 2024年06月13日 21:46:45 +00:00
downloads.c handle tab characters 2024年10月22日 18:40:42 +00:00
ev.c delete trailing whitespace 2024年03月02日 18:23:30 +00:00
ev.h ev: define EV_* constants instead of reusing POLL{IN,OUT} 2024年02月18日 22:43:05 +00:00
exec.c move exec routines to their own file 2024年06月25日 22:20:35 +00:00
exec.h move exec routines to their own file 2024年06月25日 22:20:35 +00:00
fs.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
fs.h draft of telescope-identity(1) 2024年02月15日 09:01:37 +00:00
gencmd.awk include compat.h explicitly in all files 2024年02月06日 13:35:47 +00:00
genemoji.sh move all the sources back in the root directory 2024年01月23日 20:06:07 +00:00
help.c handle tab characters 2024年10月22日 18:40:42 +00:00
hist.c rework the history management 2024年01月23日 19:18:01 +00:00
hist.h rework the history management 2024年01月23日 19:18:01 +00:00
identity.c constify the parser structs 2024年06月14日 22:15:12 +00:00
imsgev.c update imsg 2025年03月28日 16:58:08 +00:00
imsgev.h tls: guard against faulty gemini servers 2024年05月25日 01:52:40 +01:00
iri.c iri: always output file:// urls with the `//' separator 2024年02月21日 12:26:09 +00:00
iri.h fix handling of gopher selectors 2024年02月21日 11:57:05 +00:00
keymap.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
keymap.h some headers cleanup 2024年02月06日 14:12:02 +00:00
LICENSE bump copyright year 2024年02月20日 19:29:53 +00:00
mailcap.c mailcap: add needsterminal for default mailcap 2025年05月08日 20:27:43 +01:00
mailcap.h mailcap: extract the FILE parsing routine and export it 2024年06月14日 10:44:00 +00:00
Makefile.am pretiffy the makefile.am; no functional change 2024年11月10日 16:03:34 +00:00
mcache.c typos; courtesy of codespell 2024年09月01日 08:03:08 +00:00
mcache.h move includes back to the root directory 2024年01月23日 20:06:06 +00:00
mime.c constify the parser structs 2024年06月14日 22:15:12 +00:00
minibuffer.c ensure vline len is correctly accounted for 2024年10月20日 17:26:02 +00:00
minibuffer.h minibuffer: augment minibuffer_read with the initial input 2024年06月25日 22:20:05 +00:00
net.c imsg: allow fdpass on the net socket 2025年04月01日 22:51:36 +00:00
pagebundler.c pagebundler: always append a NUL byte, don't emit full length 2024年06月09日 21:13:14 +00:00
pages.h move includes back to the root directory 2024年01月23日 20:06:06 +00:00
parse.y code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
parser.c parser_serialize: fflush() 2025年11月08日 19:59:53 +01:00
parser.h parser: make parser_set_buf() private 2024年06月29日 16:53:56 +00:00
parser_gemtext.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
parser_gophermap.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
parser_textpatch.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
parser_textplain.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
README.md typos; courtesy of codespell 2024年09月01日 08:03:08 +00:00
sandbox.c fix pledges; ui needs `sendfd' 2024年10月20日 20:04:41 +00:00
session.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
session.h convert telescope to use ev instead of libevent 2024年02月18日 23:09:32 +00:00
telescope-identity.1 add telescope-identity.1 2024年02月16日 18:13:09 +00:00
telescope.1 telescope.1: please man -Tlint 2025年11月03日 23:00:33 +00:00
telescope.c sun -> lsun; part of the unbreaking on solaris 2025年09月09日 22:45:30 +00:00
telescope.h handle tab characters 2024年10月22日 18:40:42 +00:00
tofu.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
tofu.h move tofu declarations to their own header 2024年02月06日 14:12:02 +00:00
ui.c use printf instead of dprintf; for solaris compat 2025年09月09日 22:49:10 +00:00
ui.h fix display of certificate selection prompt 2024年10月22日 19:25:57 +00:00
utf8.c handle tab characters 2024年10月22日 18:40:42 +00:00
utf8.h handle tab characters 2024年10月22日 18:40:42 +00:00
utils.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
utils.h move unicode_isgraph in minibuffer.c (codepoint_isgraph) 2024年02月22日 14:22:32 +00:00
wrap.c handle tab characters 2024年10月22日 18:40:42 +00:00
xwrapper.c code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00
xwrapper.h code: add wrappers for common failure cases 2024年06月18日 11:38:54 +00:00

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

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.

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 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:

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.

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, #telescope on libera.chat!

User files

Telescope stores user files according to the XDG Base Directory Specification by default. The usage and contents of these files are described in the man page, 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.