In the shower I had that idea that I could offer a free Gemini service for blogging. backed by titan. and I kept lying out in my mind what I was lacking to do that. until I realized that probably no one would use it, because people who stomach ftp and titan usually know how to run their own minimal blog on a RPI 🤦♀️🙈
3 years ago · 👍 lykso, marginalia
@skyjake Nice work! :) · 3 years ago
@lykso I've made it so that you can persistently configure a site-specific port for the upload shortcut.
https://git.skyjake.fi/gemini/lagrange/commit/7d6ff9d0fadfe281fedf2f5da26ef577cfe07529 · 3 years ago
https://git.skyjake.fi/gemini/lagrange/commit/7d6ff9d0fadfe281fedf2f5da26ef577cfe07529
@defunct Yeah. Ctrl+U was definitely what I imagined @skyjake was going to be doing. Would be really nice if I could get that to work on my pages despite running Titan on another port! It's just such a slick shortcut. · 3 years ago
@defunct Well, skyjake was actually responding to you about the "opinionated" stuff, and him taking on a tough job. The thing is, with Titan there isn't actually anything to be "opinionated" about. You go to a titan link, you upload a file. That's it. Done. I might be wrong, but it shouldn't be that tough, at least not compared to many other things that lagrange does. · 3 years ago
@lykso there you have the answer from @skyjake. you can basically just spin up a titan server on port 1966 and redirect back and forth between them. you made me think about how to build capsule with titan support and my idea would be to render links for logged in users that redirect to the titan url used for editing/uploading and the titan server sends you back to the gemini capsule. the user won't need to type a thing. for Ctrl+U it'll be harder with a different port · 3 years ago
@defunct My Titan implementation should be quite flexible. It makes no assumptions about how the data will be used, since that's the server's job.
Whenever a "titan://" URL is opened, it just pops open a dialog so the user can provide the data to upload. Also, you can press Ctrl U/⌘U any time to begin a Titan upload using the current page's URL (just switching the URL scheme).
I haven't tested a redirect-to-Titan yet, but there is no reason why it wouldn't work. · 3 years ago
@defunct Here's where I'm coming from: I'm writing CGI apps for gmid. gmid handles TLS and basic request validation. Routing for me is then just parsing the path and query components of the request. I'd like to be able to continue running gmid and spin up some standalone Titan server alongside it to enable uploading.
The "routing" HAProxy and gmid do are different from the "routing" I do in the code I write. I'm not looking to write a server from the ground up here. I *could,* I suppose, but if I can use something more battle-tested, I'd like to do that instead. · 3 years ago
Gemini service hosting might not be *that* bad of an idea. Not everyone has a static public IP they can readily expose, and a VPS is a bit on the pricy side. · 3 years ago
@lykso I don't see issues with the approach. you need to do routing anyway, whether you do it in your application or haproxy makes little difference in the great scheme of things · 3 years ago
@defunct Please let me know what you figure out regarding that. I don't have any experience with HAProxy yet, and I would very much like to be able to mix and match components rather than have to rely on a single, monolithic server handling everything. · 3 years ago
somehow writing this makes me feel all stupid now. i keep reimplementing things in openssl through different languages when i just could've outsourced that into HAproxy :facepalm: · 3 years ago
@lykso probably not. ssl termination will be on ha proxy side. technically gemini also isn't very openssl conform. why? because it doesn't require a "valid" cert in the sense that it's signed by a trusted authority that the ca-cert package in linux offers. you need to manually request tls handshaking and discard the error. and if you do that in haproxy or similar, you can inject a small fingerprint in toothe URL at a specific place. like a user-id. kinda. if you can process client certs, then you're rolling your own routing inside your server anyhow · 3 years ago
@defunct Can HAProxy do that without, at the very least, discarding the TLS client certificate fingerprint? I realize I could also do this sort of splitting with relayd + inetd (like I'd been doing with vger before), but then I'd lose the ability to refer to the client certificate hash because the load balancer/reverse proxy would have to be handling the TLS portion of the connection and I'm unaware if any of them allow forwarding any information from that context in any way. · 3 years ago
and while I was writing the last comment i realized that a redirect to titan is an interesting thing, too. because you get redirected and the browser needs to add an interrupt for you to input the required data (the link can contain the mime type already, too). @skyjake has taken on a tough job. kudos :) · 3 years ago
on an additional note i really hope @skyjake doesn't rely on an opinionated approach to titan. while it's entirely possible to use titan like you would ftp, and allow you to send content to specific routes that end up in the filesystem, titan can also be used to many other things that are not quite as simple. an unopinionated approach would be to put all the burden to redirect you to titan where applicable on the capsule builder :) · 3 years ago
i am not sure if any of you actually implemented a backend for titan yet. i have. and "things just work" isn't the case with titan, mainly because titan is simply a transport protocol sending content to a specific url. what the server does with that is entirely up to the server. and since you likely need a ton of redirects between gemini and titan, splitting titan into a different server requiring the same auth and backend makes no sense to me at all · 3 years ago
@lykso if you want to run titan protocols on a different server you can do so easily by running haproxy or a similar load balancer and splitting the traffic to different backends (just like you would with hostnames) · 3 years ago
"Has to" should have been "is supposed to," I guess. Some sort of weaker phrasing, anyway. · 3 years ago
@skyjake I mean, yes, you're technically correct. But I imagine running it on the default port will be the difference between things "just working" and things not working without users having to touch configuration. · 3 years ago
@lykso You can run Titan on any port you like, just like with Gemini. One server may support both protocols, or you can have separate servers handling the two.
@krixano Titan uploads are live in the dev branch. 😊 I'm still working on some input widget improvements, but it should be good enough for testing against one's Titan service.
I've been using a little Python script as a Titan debug server myself. I can definitely envision a use for this for posting/editing gemlog or tinylog posts. · 3 years ago
@defunct Yeah. I think I've seen one UI for longer form text entry somewhere around here that used sed commands for editing. Technically it's more powerful (awk would be even better, I suppose) but it also requires a bit more technical expertise to use effectively. Really wanted to target non-technical users with mine.
@krixano Titan integration with clients is likely the way to go, so long as server implementations follow suit. My gripe with Titan is that it has to run on the same port as Gemini, so you can't have different servers handling the different protocols AFAICT. Makes server implementations just that little bit more complicated. · 3 years ago
the hype will be over by the time I am done with that 🤣🤣 @krixano · 3 years ago
@skyjake just started implementing Titan for Lagrange, so this would be a good time to try the idea out :D · 3 years ago
I can see where you're coming from @lykso and it probably works for mobile entries. most of your styling and text blocks would need to come from chunks so you kind of need to split all text into 700 character chunks that can be edited, replaced or inserted in between. in a way you're building the `sed' command · 3 years ago
@defunct What are your thoughts regarding the viability of the input pattern here for that purpose? gemini://gamma.lyk.so/ · 3 years ago