feat(server): adds support for subdomain aliases and domains #141

Merged
treadful merged 3 commits from feat/aliases-and-domains into main 2026-07-02 01:48:18 +00:00
Owner

refactor(server): moves server state to a separate module

Closes #70

refactor(server): moves server state to a separate module Closes #70
treadful added this to the 1.0 milestone 2026-07-01 01:20:32 +00:00
feat(server): adds support for subdomain aliases and domains
All checks were successful
/ test-and-check (pull_request) Successful in 20m6s
63c94cc050
refactor(server): moves server state to a separate module
treadful left a comment

I'm really not sure domains/host resolution should be enabled by default. I still don't have a plan for TLS termination and am not sure it's the time to add it.

The code is there, but maybe it should be behind a feature flag? Or at least an CLI option for the server. Might trip up clients that way, though.

I'm really not sure domains/host resolution should be enabled by default. I still don't have a plan for TLS termination and am not sure it's the time to add it. The code is there, but maybe it should be behind a feature flag? Or at least an CLI option for the server. Might trip up clients that way, though.
@ -105,0 +145,4 @@
fn is_alias_valid(alias: &String) -> bool {
// exclude certain potential conflicts
let invalid = INVALID_ALIASES.contains(&alias.as_str());
Author
Owner

technically could bail early with an if statement and save the few cycles used for the regex.

technically could bail early with an if statement and save the few cycles used for the regex.
treadful marked this conversation as resolved
@ -0,0 +15,4 @@
pub static TMPL_ENV: OnceLock<minijinja::Environment> = OnceLock::new();
pub static BACKEND: OnceLock<BoxedBackend> = OnceLock::new();
pub static DATABASE: OnceLock<BoxedDatabase> = OnceLock::new();
pub static KEY_RESOLVER: OnceLock<BoxedKeyResolver> = OnceLock::new();
Author
Owner

maybe not the time, but consider throwing some of the more trivial things into a struct (e.g. name, is_proxied)

maybe not the time, but consider throwing some of the more trivial things into a struct (e.g. name, is_proxied)
treadful marked this conversation as resolved
@ -166,6 +166,7 @@ impl<'de> Visitor<'de> for KeyIdVisitor {
}
/// A short representation of a Key ID as a 7-char hex string
// TODO: re-implement this to be bytes so it can be thrown on the stack
Author
Owner

maybe create an issue to track this TODO, seems useful

maybe create an issue to track this TODO, seems useful
Author
Owner
#144
treadful marked this conversation as resolved
feat(server): user domains must be explicitly enabled
Some checks failed
/ test-and-check (pull_request) Has been cancelled
d6e60b50b6
refactor(server): move basic server config into a struct
perf(server): minor perf improvmeent on valid alias checking
All checks were successful
/ test-and-check (pull_request) Successful in 18m37s
f31a6f86c2
treadful deleted branch feat/aliases-and-domains 2026-07-02 01:48:18 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
treadful/jot!141
No description provided.