about summary refs log tree commit diff stats
path: root/doc/protocols.md
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: remove submodule target, update docsbptato2025-05-041-7/+8
| | | | | | | submodule has been unused for a while now, should be OK to remove it. I've also gotten tired of the tables on the man page being borderline unreadable, so I've hacked some borders onto them. Ugly, but works.
* http: re-add brotli supportbptato2025-04-231-2/+5
| | | | | Unfortunately this is unavoidable, as some servers still seem to return brotli despite our Accept-Encoding header not including it.
* toml: remove broken special case, update docsbptato2025-04-151-1/+1
| | | | | | Turns out the cure was worse than the disease. Let's just make it a backwards incompatible change, so that at least the error message is no longer nonsensical.
* http: replace with newhttpbptato2025-04-141-19/+18
| | | | | I think it works well enough at this point. If it doesn't, somebody will complain :)
* Update docsbptato2025-04-061-1/+1
|
* Update docsbptato2025-01-301-4/+4
|
* about: move to loaderbptato2025-01-301-25/+28
| | | | | This means we can now use about:downloads for downloads. Plus it shaves off some ks from the distribution.
* Update docsbptato2025-01-151-1/+1
|
* config: refactor, accept more possible config dirsbptato2024-10-281-13/+2
| | | | | | | | | | | | | | | | | | | | | I'm starting to favor dotfiles over XDG basedirs, but there's no reason why we couldn't have both. So now the search path is: 0. if config was set through -C, use that 1. $CHA_CONFIG_DIR is set -> $CHA_CONFIG_DIR/config.toml 2. $XDG_CONFIG_HOME is set -> $XDG_CONFIG_HOME/chawan/config.toml 3. ~/.config/chawan/config.toml exists -> use that 4. ~/.chawan/config.toml exists -> use that Notably, this makes it so the default directory is ~/.chawan *if* you don't have an existing config.toml file. So in that case known_hosts will be placed in ~/.chawan/known_hosts. However, configurations with a config in ~/.config/chawan/config.toml continue to work as expected, as for those the known_hosts file remains inside ~/.config/chawan/. Finally, I've added a default user CGI directory to reduce friction in setting CGI up. (Like known_hosts, it's also relative to whatever config dir you have.)
* Add `nc' tool & adjust finger/spartan to use itbptato2024-10-121-8/+6
| | | | | | | | | Simple netcat clone, useful for portable scripts. Especially because some netcats will close the connection as soon as I close stdin... this one only quits when either stdout or the socket refuses new data. Also, it uses our standard TCP connection routine, meaning it respects ALL_PROXY. (i.e. now spartan works with socks5 too)
* gmifetch: rewrite in Nimbptato2024-10-121-14/+9
| | | | | | | | | | This finally makes it possible to use socks5 for Gemini. Also slightly refactored the config, to make it easier to pass on the config dir. By the way, the known_hosts file is now stored in the config dir too. The adapter will try to move it to there from the old location.
* Update docsbptato2024-10-101-13/+17
|
* ftp: remove libcurl dependencybptato2024-10-011-11/+15
| | | | | | | | | | | | | This splits out sftp into a separate binary that *does* depend on libcurl. However, ftp now uses the same socket code as gopher. ftps is dropped, because I've never even tested it. Maybe I'll add it back when we have working OpenSSL bindings. This is still "doing the easy part first", now I have no clue how to handle sftp because my initial plan ("just use the sftp binary") doesn't work - sftp batch mode doesn't accept passwords. libssh2 remains the sole candidate, but that's what libcurl wraps anyway.
* gopher: do not depend on libcurlbptato2024-09-281-2/+2
| | | | | | | | I'm thinking of making libcurl entirely optional; let's start with the easiest part. I've added a SOCKS5 client for ALL_PROXY support; I know curl supported others too, but whatever.
* loader: move back data URL handlingbptato2024-08-031-10/+12
| | | | | | | data URIs can get megabytes long; however, you can only stuff so many bytes into the envp. (This was thwarting my efforts to view pandoc- generated standalone HTML in Chawan.) So put `data:' back into the loader process.
* Update docsbptato2024-04-241-10/+10
|
* update docsbptato2024-04-011-9/+61
|
* ftp: basic sftp supportbptato2024-03-211-4/+7
| | | | | | | it still sucks, but it is at least slightly more usable. this also fixes a bug in dirlist where sort would mess up item name association
* man: rewrite in Nimbptato2024-03-131-2/+2
| | | | | | | | | | | | Depending on Perl just for this is silly. Now we use libregexp for filtering basically the same things as w3mman2html did. This required another patch to QuickJS to avoid pulling in the entire JS engine, but in return, we can now run regexes without a dummy JS context global variable. Also, man.nim now tries to find a man command on the system even if it's not in /usr/bin/man.
* loader: rework process modelbptato2024-03-111-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally we had several loader processes so that the loader did not need asynchronity for loading several buffers at once. Since then, the scope of what loader does has been reduced significantly, and with that loader has become mostly asynchronous. This patch finishes the above work as follows: * We only fork a single loader process for the browser. It is a waste of resources to do otherwise, and would have made future work on a download manager very difficult. * loader becomes (almost) fully async. Now the only sync part is a) processing commands and b) waiting for clients to consume responses. b) is a bit more problematic than a), but should not cause problems unless some other horrible bug exists in a client. (TODO: make it fully async.) This gives us a noticable improvement in CSS loading speed, since all resources can now be queried at once (even before the previous ones are connected). * Buffers now only get processes when the *connection* is finished. So headers, status code, etc. are handled by the client, and the buffer is forked when the loader starts streaming the response body. As a result, mailcap entries can simply dup2 the first UNIX domain socket connection as their stdin. This allows us to remove the ugly (and slow) `canredir' hack, which required us to send file handles on a tour accross the entire codebase. * The "cache" has been reworked somewhat: - Since canredir is gone, buffer-level requests usually start in a suspended state, and are explicitly resumed only after the client could decide whether it wants to cache the response. - Instead of a flag on Request and the URL as the cache key, we now use a global counter and the special `cache:' scheme. * misc fixes: referer_from is now actually respected by buffers (not just the pager), load info display should work slightly better, etc.
* Update doc/protocolsbptato2024-03-041-10/+29
|
* gmifetch: clean up URL handlingbptato2024-02-161-4/+0
| | | | | | extract_hostname is no more, hooray. + add standard error reporting
* Add mancha man page viewerbptato2024-01-261-2/+8
| | | | | | | | | | derived from w3mman2html.cgi, there are only a few minor differences: * different man page opener command * use man:, man-k:, man-l: instead of query string to specify action * no form input (C-lC-uman:pageC-m is faster anyway) TODO rewrite in Nim so we don't have to depend on Perl...
* Add spartan supportbptato2024-01-031-0/+12
| | | | why not
* fix broken linkbptato2023-12-221-1/+1
|
* update doc/protocolsbptato2023-12-221-3/+3
|
* Fix for sourcehut markdown parsing, small doc improvementsbptato2023-12-151-0/+7
| | | | hopefully this works
* Add doc/protocolsbptato2023-12-151-0/+149