BACKGROUND Back in mid-2020, Solderpunk outlined the draft of a minimal subset of Gemini, named Mercury: https://portal.mozz.us/gemini/gemini.circumlunar.space/users/solderpunk/gem log/the-mercury-protocol.gmi <https://portal.mozz.us/gemini/gemini.circumlunar.space/users/solderpunk/ge mlog/the-mercury-protocol.gmi> That subset was always good enough for my needs, and that's what I have been using since ? instead of Gemini proper. What follows is my implementation highlights of Mercury ? for the record. SERVICE DISCOVERY mercury:// IRIs SHOULD be resolved through DNS service discovery: # dig +short TXT _mercury._tcp.host.xyz. multiaddr=/dns/host.xyz/tcp/1958/tls/sni/host.xyz multiaddr ? User-agents MUST support tcp. User-agents MAY support tls. Default multiaddr /dns4/host.xyz/tcp/1958 REQUEST 4,096 bytes UTF-8 IRI line mercury://host.xyz/ RESPONSE 4,096 bytes UTF-8 status line 20 text/mercury;charset=utf-8; Hello Mercury! ?? => mercury://host.xyz/license CC0-1.0 <end of connection> STATUS 2 digits code, 4,096 bytes UTF-8 2x (SUCCESS) 4,096 bytes UTF-8 content-type status line 20[ text/mercury;charset=utf-8;] 3x (REDIRECT) 4,096 bytes UTF-8 IRI status line 30 mercury://host.xyz/ 4x (FAILURE) 4,096 bytes UTF-8 status line 40[ DESCRIPTION] TEXT/MERCURY text/mercury;charset=utf-8; Text lines Any line which is not a link. Link lines => IRI[ DESCRIPTION] => mercury://host.xyz/license CC0-1.0 MERCURI URN urn:mercury:capa CAPA REQUEST urn:mercury:capa CAPA RESPONSE 20 text/mercury;charset=utf-8; => urn:mercury:capa <end of connection> Servers MUST support urn:mercury:capa. MINIMAL SERVER # while true; do { echo -e '20\r\n=> urn:mercury:capa'; } | nc -l 127.0.0.1 1958; done MINIMAL CLIENT # echo -e 'urn:mercury:capa\r\n' | nc 127.0.0.1 1958 20 => urn:mercury:capa That's all folks. ?0? ? https://github.com/multiformats/multiaddr <https://github.com/multiformats/multiaddr> -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210228/ee82 4c2b/attachment.htm>
---