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

Basic Titan Support #8

Open
ghost opened this issue May 23, 2021 · 2 comments · May be fixed by #11
Open

Basic Titan Support #8

ghost opened this issue May 23, 2021 · 2 comments · May be fixed by #11
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented May 23, 2021

It'd be cool to have basic Titan support. Titan is a complementary protocol to gemini that allows for upload only.

It uses the same port as gemini, but URLs use the "titan://" scheme. The URLs consist of a path with parameters delimited by semicolons (;), with 3 different parameters, an optional token (kinda like a password, not used for authorization, but rather to prevent bots and spam), a requied size (in bytes) of file to be uploaded, and a required mime parameter (mimetype). After that, then there's a \r\n, followed by the data of the given size.

It also supports Client Certificates.

If the given data is of the wrong size, "59 Meta text" is sent. Otherwise, nothing is sent back, afaik (I could be wrong about this).

Here's the main page for the protocol: https://communitywiki.org/wiki/Titan
You can see a server implementation here: https://alexschroeder.ch/cgit/phoebe/tree/script/phoebe
And for the client: https://alexschroeder.ch/cgit/phoebe/tree/script/titan

Even just some way to hook into Gig to just get all requests that use the titan:// scheme and do my own stuff would be useful. But, if it used some of Gig's features, like routes, that would be cool too :)

@pitr pitr added the enhancement New feature or request label May 23, 2021
@pitr
Copy link
Owner

pitr commented May 23, 2021

Thanks for the idea. I haven't used Titan myself, though familiar with it. My initial thought would be to add to gig.Context something is IsTitan() bool and IsGemini() bool for handler to be able to distinguish the two. And perhaps a setting on gig.Gig (off by default) to enable Titan support. What do you think? Would love it if a PR was contributed to support it.

@pitr pitr added the help wanted Extra attention is needed label May 23, 2021
@ghost
Copy link
Author

ghost commented May 23, 2021

Yeah, that could work. I'll see if I can make a PR either today or tomorrow. Thanks!

@TeddyDD TeddyDD linked a pull request Mar 11, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant