Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other protocols #320

Open
zzo38 opened this issue Aug 31, 2024 · 4 comments
Open

Other protocols #320

zzo38 opened this issue Aug 31, 2024 · 4 comments

Comments

@zzo38
Copy link

zzo38 commented Aug 31, 2024

You can implement some other protocols too.

  • Gemini (this is implemented already but the documentation does not mention it (so the documentation should be improved); and I don't know if client certificates can be used)

  • Spartan (uses the same file format as Gemini, but is a somewhat different protocol and does not include TLS)

  • Scorpion (both TLS and non-TLS, with a different URI scheme in each case)

  • Nightfall Express (probably the simplest one, although a mapping from file name suffixes to file formats will be needed like you would with local files, possibly can use the same mapping)

I had written brief notes about all of the above (and more) in scorpion://zzo38computer.org/smallweb.txt which is also mirrored at https://dbohdan.com/archive/scorpion/zzo38computer.org/smallweb.txt

The specification of Scorpion file format is also mirrored on GitHub, and I had also written implementations of all four of the above protocols, in the same repository. A few other implementations of the above listed protocols also exist.

Client certificates are possible with any protocol that uses TLS, but are not commonly used except for Gemini.

@rkd77
Copy link
Owner

rkd77 commented Sep 4, 2024

Config option "connection.ssl.client_cert.file" or the environment variable X509_CLIENT_CERT point to the file with the client certificate. It did not check it.

If you want more protocols, the fastest method is to prepare patches and add pull requests.

@Moult
Copy link
Contributor

Moult commented Dec 4, 2024

Can you help recommend how to view images, pdfs, and other content on the gemini protocol? I don't want to save the file, then open it manually.

I've attemped this:

set mime.handler.image.unix-xwin.program = "elinks -source %u > /tmp/%f && feh /tmp/%f"

But although this works when testing a terminal (i.e. it downloads the image across the gemini:// protocol), when I try browse to an image on gemini in elinks, no output is shown. What am I missing?

@rkd77
Copy link
Owner

rkd77 commented Dec 4, 2024

set mime.handler.image.unix-xwin.program = "feh %f"
ought to be sufficient, but check whether you don't have mailcap support compiled in, and some rules for images in .mailcap files.
ELinks downloads to a temporary file, and then execute given program.
If program knows given protocol, you can change %f to %u, but I doubt that feh knows gemini.

If you have compiled elinks with libsixel and mailcap support, and your terminal supports sixel and AFAIR, you ticked sixel support in terminal options of elinks, you can add to your ~/.mailcap one of these:
image/*; /usr/bin/convert %s sixel:- ; copiousoutput
image/*; img2sixel %s; copiousoutput

convert is in ImageMagick, img2sixel in sixel package.

Then images can be visible in elinks.

@Moult
Copy link
Contributor

Moult commented Dec 5, 2024

Thanks that works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants