Date: 2025-01-25
Last update: 2025-01-30
NEX protocol
------------
NEX protocol is one of rare gems in online world. Totally simple,
enjoyable and useful. In practice it is protocol for sharing files
over TCP. In summary, you ask server for file by path, server gives
it to you. It's up to you or your client what you will do with it.
If you use simple network tools like netcat or telnet, you get content
of requested file. If you try some NEX browser, it probably should
adjust its action based on a file extension of file. That means, if
file is file.txt browser will show you content of that file. If file
is file.pdf or file.mp3 good browser offers you some action, most
probably pipe it to your associated program based on mime type or
download it. Then you can deal with it yourself manually. NEX has one
killing feature. This feature is the one, you only need while browsing
information online - links.
Links - absolute or relative, internal or external. To achieve that,
your file has to be called with slash at the end of your request, like
you calling a directory. Smart NEX client will deal with requested
file like it is a directory, so will show all "translated" links.
Regular file is called normally:
echo 034 | nc morena.rip 1900
Get binary file (image, song, pdf, whatever)
echo bin/fin.pl | nc morena.rip 1900 > finger.pl
You will get content of plain text file 034 in the root directory of
this server. It is exactly this article you read now.
If you call the same file with slash nex://morena.rip/034/ you get
exactly same file with the same content with one killing feature.
All links which are defined in specification become hypertext links.
You need some browser - client for this. Click, press and joy.
This is called directory, similar, but much simpler than menu entity,
item directory type in Gopher. So when you call a directory of any
NEX server, you call it with slash at the end of your request. Then
server practically serves you whole file like before. What change, is
that your client - browser should "enable" links in requested plain
text document. Otherwise it is still plain text, nothing else change,
you get the whole file. If you reach any healthy NEX server, you
probably get automatically some file, maybe called index, but can be
whatever admin setup. Then you continue to clicking or key pressing
on some links there. That can be internal like "about" or /about or
external like nex://nightfall.city or http://morena.rip/about. It can
be any protocol as gopher://morena.rip/0034 too.
To have workable links, format is as follow:
=> nex://morena.rip
=> /about
=> /log Log file, updates and changelog
So line starts with "=>" then space and then a link. File then has to
be called with slash at the end, in this case nex://morena.rip/034/
Obviously, if you use just NEX browser, other protocols will not open,
but if browser is smart, it will direct your request to adequate
program, like web browser, gopher client, pdf viewer, image viewer.
It depends on the link - file extension. Files without any extension,
for example .pdf, .tar, .ogg and so on, should be served as plain
text files.
Protocol NEX does not have any stupid restrictions, you can do
whatever you wish. Russian, Slovak, ASCII, 500 or 5 characters line
width, just whatever format you need. Server should just give you
content of requested file as is. No matter if it's plain text file,
binary, or whatever. The same applies also for a "directory" which
is just plain text file. It's job of NEX client to translate
"=> <URI>" into hyperlinks. Server sends directory file as regular
plain text file. Server does not fiddle with requested files, it's
job of a NEX client, your browser. Wether it is annoying.mp3 song
or some serious rfc.pdf document, server just serves it.
So what is so good about NEX and why to use it? It's simple. Simple
as it can be. It's not restrictive, not stupid. It's perfect.
If you are using NEX protocol and your NEX server is online please
let me know about it by email to morena@morena.rip or just echo me
the link with optional comments over NPS ;/
/036 NPS protocol
Fun fact: I just realized how bad I am writer ;/ I can write essay
about nothing and miss all important details which could be written in
few lines.
----------------------------------------------------------------------
Nothing in this world is harder than speaking the truth, nothing
easier than flattery.