Rename to domani

This commit is contained in:
Brian Picciano 2023-06-25 13:35:59 +02:00
parent fcab32e0f7
commit 644d2bab23
12 changed files with 64 additions and 64 deletions

View File

@ -1,6 +1,6 @@
export DOMIPLY_HTTP_DOMAIN=localhost export DOMANI_HTTP_DOMAIN=localhost
export DOMIPLY_PASSPHRASE=foobar export DOMANI_PASSPHRASE=foobar
export DOMIPLY_ORIGIN_STORE_GIT_DIR_PATH=/tmp/domiply_dev_env/origin/git export DOMANI_ORIGIN_STORE_GIT_DIR_PATH=/tmp/domani_dev_env/origin/git
export DOMIPLY_DOMAIN_CHECKER_TARGET_A=127.0.0.1 export DOMANI_DOMAIN_CHECKER_TARGET_A=127.0.0.1
export DOMIPLY_DOMAIN_CONFIG_STORE_DIR_PATH=/tmp/domiply_dev_env/domain/config export DOMANI_DOMAIN_CONFIG_STORE_DIR_PATH=/tmp/domani_dev_env/domain/config
export DOMIPLY_DOMAIN_ACME_STORE_DIR_PATH=/tmp/domiply_dev_env/domain/acme export DOMANI_DOMAIN_ACME_STORE_DIR_PATH=/tmp/domani_dev_env/domain/acme

2
Cargo.lock generated
View File

@ -444,7 +444,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "domiply" name = "domani"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"acme2", "acme2",

View File

@ -1,5 +1,5 @@
[package] [package]
name = "domiply" name = "domani"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View File

@ -1,15 +1,15 @@
# Domiply # Domani
Domiply is a self-hosted rust service which connects a DNS hostname to a data Domani is a self-hosted rust service which connects a DNS hostname to a data
backend (e.g. a git repository), all with no account needed. The user only backend (e.g. a git repository), all with no account needed. The user only
inputs their domain name, their desired backend, and then adds two entries to inputs their domain name, their desired backend, and then adds two entries to
their DNS server. their DNS server.
[Demo which may or may not be live](https://domiply.mediocregopher.com) [Demo which may or may not be live](https://domani.mediocregopher.com)
## Build ## Build
Domiply uses nix flakes for building and setting up the development environment. Domani uses nix flakes for building and setting up the development environment.
In order to create a release binary: In order to create a release binary:
@ -21,38 +21,38 @@ A statically compiled binary will be placed in the `result` directory.
## Configuration ## Configuration
Domiply is configured via command-line arguments or environment variables: Domani is configured via command-line arguments or environment variables:
``` ```
--http-domain <HTTP_DOMAIN> --http-domain <HTTP_DOMAIN>
[env: DOMIPLY_HTTP_DOMAIN=] [env: DOMANI_HTTP_DOMAIN=]
--http-listen-addr <HTTP_LISTEN_ADDR> --http-listen-addr <HTTP_LISTEN_ADDR>
[env: DOMIPLY_HTTP_LISTEN_ADDR=] [default: [::]:3030] [env: DOMANI_HTTP_LISTEN_ADDR=] [default: [::]:3030]
--https-listen-addr <HTTPS_LISTEN_ADDR> --https-listen-addr <HTTPS_LISTEN_ADDR>
E.g. '[::]:443', if given then SSL certs will automatically be retrieved for all domains using LetsEncrypt [env: DOMIPLY_HTTPS_LISTEN_ADDR=] E.g. '[::]:443', if given then SSL certs will automatically be retrieved for all domains using LetsEncrypt [env: DOMANI_HTTPS_LISTEN_ADDR=]
--passphrase <PASSPHRASE> --passphrase <PASSPHRASE>
[env: DOMIPLY_PASSPHRASE=] [env: DOMANI_PASSPHRASE=]
--origin-store-git-dir-path <ORIGIN_STORE_GIT_DIR_PATH> --origin-store-git-dir-path <ORIGIN_STORE_GIT_DIR_PATH>
[env: DOMIPLY_ORIGIN_STORE_GIT_DIR_PATH=] [env: DOMANI_ORIGIN_STORE_GIT_DIR_PATH=]
--domain-checker-target-a <DOMAIN_CHECKER_TARGET_A> --domain-checker-target-a <DOMAIN_CHECKER_TARGET_A>
[env: DOMIPLY_DOMAIN_CHECKER_TARGET_A=] [env: DOMANI_DOMAIN_CHECKER_TARGET_A=]
--domain-checker-resolver-addr <DOMAIN_CHECKER_RESOLVER_ADDR> --domain-checker-resolver-addr <DOMAIN_CHECKER_RESOLVER_ADDR>
[env: DOMIPLY_DOMAIN_CHECKER_RESOLVER_ADDR=] [default: 1.1.1.1:53] [env: DOMANI_DOMAIN_CHECKER_RESOLVER_ADDR=] [default: 1.1.1.1:53]
--domain-config-store-dir-path <DOMAIN_CONFIG_STORE_DIR_PATH> --domain-config-store-dir-path <DOMAIN_CONFIG_STORE_DIR_PATH>
[env: DOMIPLY_DOMAIN_CONFIG_STORE_DIR_PATH=] [env: DOMANI_DOMAIN_CONFIG_STORE_DIR_PATH=]
--domain-acme-store-dir-path <DOMAIN_ACME_STORE_DIR_PATH> --domain-acme-store-dir-path <DOMAIN_ACME_STORE_DIR_PATH>
[env: DOMIPLY_DOMAIN_ACME_STORE_DIR_PATH=] [env: DOMANI_DOMAIN_ACME_STORE_DIR_PATH=]
--domain-acme-contact-email <DOMAIN_ACME_CONTACT_EMAIL> --domain-acme-contact-email <DOMAIN_ACME_CONTACT_EMAIL>
[env: DOMIPLY_DOMAIN_ACME_CONTACT_EMAIL=] [env: DOMANI_DOMAIN_ACME_CONTACT_EMAIL=]
-h, --help -h, --help
Print help Print help
@ -63,8 +63,8 @@ Domiply is configured via command-line arguments or environment variables:
### HTTPS Support ### HTTPS Support
Domiply will automatically handle setting up HTTPS via LetsEncrypt for both the Domani will automatically handle setting up HTTPS via LetsEncrypt for both the
domiply frontend site and all domains which it has been configured to serve. domani frontend site and all domains which it has been configured to serve.
By default HTTPS is not enabled, but can be easily enabled by setting the By default HTTPS is not enabled, but can be easily enabled by setting the
following arguments: following arguments:
@ -81,7 +81,7 @@ secured as best as possible.
## Development ## Development
Domiply uses nix flakes for building and setting up the development environment. Domani uses nix flakes for building and setting up the development environment.
In order to open a shell with all necessary tooling (expected rust toolchain In order to open a shell with all necessary tooling (expected rust toolchain
versions, etc...) simply do: versions, etc...) simply do:

View File

@ -90,7 +90,7 @@ impl DNSChecker {
// check that the TXT record with the challenge token is correctly installed on the domain // check that the TXT record with the challenge token is correctly installed on the domain
{ {
let domain = Name::from_str("_domiply_challenge") let domain = Name::from_str("_domani_challenge")
.or_unexpected_while("parsing TXT name")? .or_unexpected_while("parsing TXT name")?
.append_domain(domain) .append_domain(domain)
.or_unexpected_while("appending domain to TXT")?; .or_unexpected_while("appending domain to TXT")?;

View File

@ -10,53 +10,53 @@ use std::str::FromStr;
#[derive(Parser, Debug)] #[derive(Parser, Debug)]
#[command(version)] #[command(version)]
#[command(about = "A domiply to another dimension")] #[command(about = "A domani to another dimension")]
struct Cli { struct Cli {
#[arg( #[arg(
long, long,
help = "OFF, ERROR, WARN, INFO, DEBUG, or TRACE", help = "OFF, ERROR, WARN, INFO, DEBUG, or TRACE",
default_value_t = log::LevelFilter::Info, default_value_t = log::LevelFilter::Info,
env = "DOMIPLY_LOG_LEVEL" env = "DOMANI_LOG_LEVEL"
)] )]
log_level: log::LevelFilter, log_level: log::LevelFilter,
#[arg(long, default_value_t = false, env = "DOMIPLY_LOG_TIMESTAMP")] #[arg(long, default_value_t = false, env = "DOMANI_LOG_TIMESTAMP")]
log_timestamp: bool, log_timestamp: bool,
#[arg(long, required = true, env = "DOMIPLY_HTTP_DOMAIN")] #[arg(long, required = true, env = "DOMANI_HTTP_DOMAIN")]
http_domain: domiply::domain::Name, http_domain: domani::domain::Name,
#[arg(long, default_value_t = SocketAddr::from_str("[::]:3030").unwrap(), env = "DOMIPLY_HTTP_LISTEN_ADDR")] #[arg(long, default_value_t = SocketAddr::from_str("[::]:3030").unwrap(), env = "DOMANI_HTTP_LISTEN_ADDR")]
http_listen_addr: SocketAddr, http_listen_addr: SocketAddr,
#[arg( #[arg(
long, long,
help = "E.g. '[::]:443', if given then SSL certs will automatically be retrieved for all domains using LetsEncrypt", help = "E.g. '[::]:443', if given then SSL certs will automatically be retrieved for all domains using LetsEncrypt",
env = "DOMIPLY_HTTPS_LISTEN_ADDR", env = "DOMANI_HTTPS_LISTEN_ADDR",
requires = "domain_acme_contact_email", requires = "domain_acme_contact_email",
requires = "domain_acme_store_dir_path" requires = "domain_acme_store_dir_path"
)] )]
https_listen_addr: Option<SocketAddr>, https_listen_addr: Option<SocketAddr>,
#[arg(long, required = true, env = "DOMIPLY_PASSPHRASE")] #[arg(long, required = true, env = "DOMANI_PASSPHRASE")]
passphrase: String, passphrase: String,
#[arg(long, required = true, env = "DOMIPLY_ORIGIN_STORE_GIT_DIR_PATH")] #[arg(long, required = true, env = "DOMANI_ORIGIN_STORE_GIT_DIR_PATH")]
origin_store_git_dir_path: path::PathBuf, origin_store_git_dir_path: path::PathBuf,
#[arg(long, required = true, env = "DOMIPLY_DOMAIN_CHECKER_TARGET_A")] #[arg(long, required = true, env = "DOMANI_DOMAIN_CHECKER_TARGET_A")]
domain_checker_target_a: std::net::Ipv4Addr, domain_checker_target_a: std::net::Ipv4Addr,
#[arg(long, default_value_t = String::from("1.1.1.1:53"), env = "DOMIPLY_DOMAIN_CHECKER_RESOLVER_ADDR")] #[arg(long, default_value_t = String::from("1.1.1.1:53"), env = "DOMANI_DOMAIN_CHECKER_RESOLVER_ADDR")]
domain_checker_resolver_addr: String, domain_checker_resolver_addr: String,
#[arg(long, required = true, env = "DOMIPLY_DOMAIN_CONFIG_STORE_DIR_PATH")] #[arg(long, required = true, env = "DOMANI_DOMAIN_CONFIG_STORE_DIR_PATH")]
domain_config_store_dir_path: path::PathBuf, domain_config_store_dir_path: path::PathBuf,
#[arg(long, env = "DOMIPLY_DOMAIN_ACME_STORE_DIR_PATH")] #[arg(long, env = "DOMANI_DOMAIN_ACME_STORE_DIR_PATH")]
domain_acme_store_dir_path: Option<path::PathBuf>, domain_acme_store_dir_path: Option<path::PathBuf>,
#[arg(long, env = "DOMIPLY_DOMAIN_ACME_CONTACT_EMAIL")] #[arg(long, env = "DOMANI_DOMAIN_ACME_CONTACT_EMAIL")]
domain_acme_contact_email: Option<String>, domain_acme_contact_email: Option<String>,
} }
@ -73,23 +73,23 @@ async fn main() {
) )
.init(); .init();
let origin_store = domiply::origin::store::git::new(config.origin_store_git_dir_path) let origin_store = domani::origin::store::git::new(config.origin_store_git_dir_path)
.expect("git origin store initialization failed"); .expect("git origin store initialization failed");
let domain_checker = domiply::domain::checker::new( let domain_checker = domani::domain::checker::new(
config.domain_checker_target_a, config.domain_checker_target_a,
&config.domain_checker_resolver_addr, &config.domain_checker_resolver_addr,
) )
.await .await
.expect("domain checker initialization failed"); .expect("domain checker initialization failed");
let domain_config_store = domiply::domain::config::new(&config.domain_config_store_dir_path) let domain_config_store = domani::domain::config::new(&config.domain_config_store_dir_path)
.expect("domain config store initialization failed"); .expect("domain config store initialization failed");
let domain_acme_manager = if config.https_listen_addr.is_some() { let domain_acme_manager = if config.https_listen_addr.is_some() {
let domain_acme_store_dir_path = config.domain_acme_store_dir_path.unwrap(); let domain_acme_store_dir_path = config.domain_acme_store_dir_path.unwrap();
let domain_acme_store = domiply::domain::acme::store::new(&domain_acme_store_dir_path) let domain_acme_store = domani::domain::acme::store::new(&domain_acme_store_dir_path)
.expect("domain acme store initialization failed"); .expect("domain acme store initialization failed");
// if https_listen_addr is set then domain_acme_contact_email is required, see the Cli/clap // if https_listen_addr is set then domain_acme_contact_email is required, see the Cli/clap
@ -97,7 +97,7 @@ async fn main() {
let domain_acme_contact_email = config.domain_acme_contact_email.unwrap(); let domain_acme_contact_email = config.domain_acme_contact_email.unwrap();
Some( Some(
domiply::domain::acme::manager::new(domain_acme_store, &domain_acme_contact_email) domani::domain::acme::manager::new(domain_acme_store, &domain_acme_contact_email)
.await .await
.expect("domain acme manager initialization failed"), .expect("domain acme manager initialization failed"),
) )
@ -105,9 +105,9 @@ async fn main() {
None None
}; };
let mut task_stack = domiply::util::TaskStack::new(); let mut task_stack = domani::util::TaskStack::new();
let domain_manager = domiply::domain::manager::new( let domain_manager = domani::domain::manager::new(
&mut task_stack, &mut task_stack,
origin_store, origin_store,
domain_config_store, domain_config_store,
@ -115,7 +115,7 @@ async fn main() {
domain_acme_manager, domain_acme_manager,
); );
let _ = domiply::service::http::new( let _ = domani::service::http::new(
&mut task_stack, &mut task_stack,
domain_manager.clone(), domain_manager.clone(),
config.domain_checker_target_a, config.domain_checker_target_a,
@ -124,7 +124,7 @@ async fn main() {
config.http_domain.clone(), config.http_domain.clone(),
config config
.https_listen_addr .https_listen_addr
.map(|listen_addr| domiply::service::http::HTTPSParams { .map(|listen_addr| domani::service::http::HTTPSParams {
listen_addr, listen_addr,
cert_resolver: domain_manager.clone(), cert_resolver: domain_manager.clone(),
}), }),

View File

@ -378,7 +378,7 @@ impl<'svc> Service {
return self.serve_origin(domain, req.uri().path()); return self.serve_origin(domain, req.uri().path());
} }
// Serve main domiply site // Serve main domani site
if method == Method::GET && path.starts_with("/static/") { if method == Method::GET && path.starts_with("/static/") {
return self.render(200, path, ()); return self.render(200, path, ());

View File

@ -6,7 +6,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>Domiply - The universal, zero-authentication hosting service</title> <title>Domani - The universal, zero-authentication hosting service</title>
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
@ -28,7 +28,7 @@
<body> <body>
<header> <header>
<h1><a href="/">Domiply</a></h1> <h1><a href="/">Domani</a></h1>
<blockquote>The universal, zero-authentication hosting service</blockquote> <blockquote>The universal, zero-authentication hosting service</blockquote>
</header> </header>

View File

@ -5,19 +5,19 @@
{{# if data.config }} {{# if data.config }}
<p>Your domain <code>{{ data.domain }}</code> is already configured with <p>Your domain <code>{{ data.domain }}</code> is already configured with
Domiply. You can see the existing configuration below. If you modify any values Domani. You can see the existing configuration below. If you modify any values
you will need to hit the "Next" button to complete the update.</p> you will need to hit the "Next" button to complete the update.</p>
{{ else }} {{ else }}
<p>Your domain <code>{{ data.domain }}</code> is not yet configured with Domiply. <p>Your domain <code>{{ data.domain }}</code> is not yet configured with Domani.
To get started, please input the details of a public git repo which will be used To get started, please input the details of a public git repo which will be used
to serve your domain. When you update the given branch, your domain will be to serve your domain. When you update the given branch, your domain will be
automatically updated too!</p> automatically updated too!</p>
{{/if}} {{/if}}
<p><em>In the future Domiply will support more backends than just git <p><em>In the future Domani will support more backends than just git
repos.</em></p> repos.</em></p>
<form method="GET" action="/domain_init.html"> <form method="GET" action="/domain_init.html">

View File

@ -1,6 +1,6 @@
<h2>Configure DNS</h2> <h2>Configure DNS</h2>
<p>Next you will need to configure your DNS server to point to Domiply. There <p>Next you will need to configure your DNS server to point to Domani. There
are two entries you will need to add:</p> are two entries you will need to add:</p>
<ul> <ul>
@ -9,7 +9,7 @@ are two entries you will need to add:</p>
<code>{{ data.target_a }}</code> <code>{{ data.target_a }}</code>
</li> </li>
<li> <li>
A <code>TXT _domiply_challenge.{{ data.domain }}</code> entry with the value A <code>TXT _domani_challenge.{{ data.domain }}</code> entry with the value
<code>{{ data.challenge_token }}</code> <code>{{ data.challenge_token }}</code>
</li> </li>
</ul> </ul>

View File

@ -1,6 +1,6 @@
<h2>All Domains</h2> <h2>All Domains</h2>
<p>Below are listed all domains which this Domiply instance is currently <p>Below are listed all domains which this Domani instance is currently
serving</p> serving</p>
<ul> <ul>

View File

@ -1,11 +1,11 @@
<p>Domiply connects your domain to whatever you want to host on it, all with no <p>Domani connects your domain to whatever you want to host on it, all with no
account needed. Just input your desired backend, add two entries to your DNS account needed. Just input your desired backend, add two entries to your DNS
server, and you're done!</p> server, and you're done!</p>
<p><strong>YOU SHOULD NOT USE THIS FOR ANYTHING YOU CARE ABOUT AT THIS <p><strong>YOU SHOULD NOT USE THIS FOR ANYTHING YOU CARE ABOUT AT THIS
TIME.</strong></p> TIME.</strong></p>
<p>Domiply is currently only a proof-of-concept with limited features, <p>Domani is currently only a proof-of-concept with limited features,
but will continue to be expanded as development time permits.</p> but will continue to be expanded as development time permits.</p>
<h2>Get Started</h2> <h2>Get Started</h2>
@ -30,20 +30,20 @@ been set up.</p>
<ul> <ul>
<li><a href="/domains.html">List all existing domains</a></li> <li><a href="/domains.html">List all existing domains</a></li>
<li><a href="https://code.betamike.com/cryptic-io/domiply">View the Source Code</a></li> <li><a href="https://code.betamike.com/cryptic-io/domani">View the Source Code</a></li>
<li><a href="mailto:me@mediocregopher.com">Report a Bug</a></li> <li><a href="mailto:me@mediocregopher.com">Report a Bug</a></li>
</ul> </ul>
<h2>About</h2> <h2>About</h2>
<p>Domiply is an open-source project which is designed to be hosted by <p>Domani is an open-source project which is designed to be hosted by
individuals for their community of friends and family. By making it super easy individuals for their community of friends and family. By making it super easy
to set up a domain we can help our non-technical folk own their own slice of to set up a domain we can help our non-technical folk own their own slice of
the internet, the way it was always intended.</p> the internet, the way it was always intended.</p>
<h2>Roadmap</h2> <h2>Roadmap</h2>
<p>Domiply is very much a work in progress. The following functionality is <p>Domani is very much a work in progress. The following functionality is
planned but not yet implemented:</p> planned but not yet implemented:</p>
<ul> <ul>