💾 Archived View for gemi.dev › gemini-mailing-list › 000262.gmi captured on 2024-03-21 at 17:14:55. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-12-28)
-=-=-=-=-=-=-
Dear list, I would like to play around with Gemini and build a personal site. I'd love to be able to host it on my main domain at gemini://evertpot.com/ However, that domain is currently pointing to Github Pages, something I would like to not change. It occurred to me that it would be nice if I could use DNS SRV records to point gemini:// clients to a different host. However, after reading the spec it doesn't seem like there is support for this. I would love support for this, but or that to be realistically useful, it would have to be in the spec and required. I know a lot of HTTP folks wish they had that from the start too, as it's a pain to adopt later. I couldn't find in the archives if this has been asked before. Great project, and I hope I can make a positive contribution to the ecosystem. Evert
It was thus said that the Great Evert Pot once stated: > Dear list, > > I would like to play around with Gemini and build a personal site. I'd > love to be able to host it on my main domain at gemini://evertpot.com/ Okay, so you are running a service on port 1965 that *isn't* Gemini, and you would like to run a Gemini server on a different port, but not have to specify the port number on the URL. Okay, got it. > It occurred to me that it would be nice if I could use DNS SRV records > to point gemini:// clients to a different host. However, after reading > the spec it doesn't seem like there is support for this. > > I would love support for this, but or that to be realistically useful, > it would have to be in the spec and required. I know a lot of HTTP folks > wish they had that from the start too, as it's a pain to adopt later. Like you, I wouldn't mind seeing SRV records used more often, but there are considerations. First off, the dismal state of DNS resolution libaries out there. For the most part, they pretty much do too much (have their own network driver that is hard to integrate into an existing network based program) and do too little (very little support for non A/AAAA records---you might get lucky and get MX support). I was fed up enough to write my own DNS encoding/decoding library [1] but that only helps if you use C (or Lua---I include Lua bindings in the library) and you still need to integrate your own networking with it [3]. Second, the code needs to be aware that multiple SRV records for a given service can exist, and how to order the results and pick one. And the use of SRV records impact clients more than servers. Instead of now, where a client can go: location = breakdown(url) address = getaddrinfo(location.host,location.port or 1965) you now need: results = lookup(RR_SRV,location.host) if results then sort(results) /* based upon priority and weight */ /* if not done by the lookup() routine */ for each result in results do address = getaddrinfo(result.host,result.port) if address then break end end if not address then address = getaddrinfo(location.host,location.port or 1965) end Keep in mind the above is "get the idea" pseudocode, not real code. > I couldn't find in the archives if this has been asked before. It has not. -spc (The client now needs to know which DNS server to query, and how does it obtain *that* information?) [1] https://github.com/spc476/SPCDNS [2] [2] My most popular Github project if going by stars. [3] A lot easier than with the other DNS libraries I've come across, but it still needs to be done.
> I would like to play around with Gemini and build a personal site. I'd > love to be able to host it on my main domain at gemini://evertpot.com/ > > However, that domain is currently pointing to Github Pages, something I > would like to not change. There isn't really a great way around this, as you can't rely on clients supporting SRV records or anything. Here are two options:
Hi Evert, Hi List, Evert Pot <me at evertpot.com> writes: > > It occurred to me that it would be nice if I could use DNS SRV > records > to point gemini:// clients to a different host. However, after > reading > the spec it doesn't seem like there is support for this. The SRV record might be superceded by the SVCB/HTTPSSVC record: Service binding and parameter specification via the DNS (DNS SVCB and HTTPSSVC) <https://tools.ietf.org/html/draft-ietf-dnsop-svcb-httpssvc> Goolge is experimenting with this to be able to upgrade HTTPS sessions to QUIC, while Apple seems to use it to discover DoT/DoH resolver for the upcoming MacOS 11 and iOS 14. SVCB/HTTPSSVC is an Internet Draft, it will likely change (a lot) until reaching RFC status, or it might expire (not reach RFC status at all). The problems remains that OS resovler libraries (libc) do not support DNS records other than A/AAAA and a handful of others. Libraries like GetDNSAPI <https://getdnsapi.net/> need to be used to retrieve these records. Gemini server discovery could be discussed in a document separate of the Gemini protocol spec. Client implementations could optionally implement support for finding Gemini server via SRV, SVCB, mDNS or other discovery protocols. Greetings Carsten
---