-
Notifications
You must be signed in to change notification settings - Fork 0
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
New Rust re-write #27
Conversation
9d416f7
to
174cb79
Compare
87a677c
to
739246b
Compare
Only the Server Routes and Root Docs needed now! |
...for the raw library of course, not the binaries. But still, pretty neat! |
Use actix-web shared state for the routes. Probably use a trait for it if possible. Basically what's missing:
|
The Password Authentication thingy will be done in the 3rd point on the checklist. |
c6e4b58
to
4bafa1e
Compare
Only the file index and then actual file serving is missing. Thankfully these will be just two route functions, one for index, one for files. Also, the file serving route should always include the size in the header, but also the SHA-256 and BLAKE3 hashes when there's a HEAD request (authentication has to be successful for this; if it isn't, always return the 401 response). |
Using BLAKE3 is a good idea ...for checksums though. |
Apart from bundling everything together as an executable and testing everything, only the file serving with the HEAD meta and optional HTTP Basic Auth is missing! |
It's only the actual fileserving-basicauth-headmeta route thingy now. |
f29e138
to
90b5a12
Compare
I should probably also remake the wiki before this gets merged... |
8feaba4
to
b79cfa3
Compare
420fe0d
to
036e323
Compare
Header stuff for the file serving:
I have the feeling Actix-Web already does a lot of things for you, but I want to be sure and implement it my way, plus only something like the Actix-Web-Static-Fileserver thingy can really do things like hashing, ETag and Last-Modified, plus there's the user authentication (without auth, it won't send any information). |
Basic Auth WIP. CLI tool wip, server message wip, logger wip.
let mut range = binding.split('-'); | ||
|
||
// Parse range | ||
if let (Some(x), Some(y)) = (range.nth(0), range.nth(0)) { |
Check failure
Code scanning / clippy
called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
let mut range = binding.split('-'); | ||
|
||
// Parse range | ||
if let (Some(x), Some(y)) = (range.nth(0), range.nth(0)) { |
Check failure
Code scanning / clippy
called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
Random stuff, but make the digest and partial content thing a middleware (has to be combined because digest depends on content). |
Honestly, I might just make a new Rust rewrite. was messing around with GTA's Self Radio, FFmpeg, audio codecs and tags in audii files, and I might make a rust-new-version of my WIP rust-version of Cyrkensia you see, aside from having to redo most things because mixing basic file serving, sending metadata and password protecting everything together being complicated, I might do the storing part different
I have a more elaborate version on this now. So things will get debloated and the architecture will get better too. I just have to find time when I can actually do it, school and stuff you know. |
Auth and Content hashing meta thingy will most likely be a middleware btw. |
Gonna rewrite the entire thing again... |
This will introduce the Rust re-write with v1.2.0, the managaement tools and obviously the hot new stuff as well as a re-write of the Wiki and better docs.
Checklist
And then obviously the server stuff:
<a href="filename.mp3">filename.mp3</a>
stacks)In the end, both
cyrkensia
andcyrkensia-cfg
binaries should be finished in order to merge this PR!cyrkensia
- the Cyrkensia servercyrkensia-cfg
- tool for managing Cyrkensia-related files and folders