From f9801af16633c8b8f317570ac42650c940bb54a9 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 13 May 2023 16:39:54 +0200 Subject: [PATCH] rename to domiply --- .env.dev | 8 ++--- Cargo.lock | 48 +++++++++++++-------------- Cargo.toml | 2 +- src/main.rs | 26 +++++++-------- src/service/http_tpl/base.html | 4 +-- src/service/http_tpl/domain.html | 4 +-- src/service/http_tpl/domain_init.html | 2 +- src/service/http_tpl/index.html | 6 ++-- 8 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.env.dev b/.env.dev index bd57d5a..0a63c1f 100644 --- a/.env.dev +++ b/.env.dev @@ -1,4 +1,4 @@ -export GATEWAY_PASSPHRASE=foobar -export GATEWAY_ORIGIN_STORE_GIT_DIR_PATH=/tmp/gateway_dev_env/origin/git -export GATEWAY_DOMAIN_CHECKER_TARGET_CNAME=gateway.example.com -export GATEWAY_DOMAIN_CONFIG_STORE_DIR_PATH=/tmp/gateway_dev_env/domain/config +export DOMIPLY_PASSPHRASE=foobar +export DOMIPLY_ORIGIN_STORE_GIT_DIR_PATH=/tmp/domiply_dev_env/origin/git +export DOMIPLY_DOMAIN_CHECKER_TARGET_CNAME=domiply.example.com +export DOMIPLY_DOMAIN_CONFIG_STORE_DIR_PATH=/tmp/domiply_dev_env/domain/config diff --git a/Cargo.lock b/Cargo.lock index 5c3ee57..a6f9419 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -368,6 +368,30 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "domiply" +version = "0.1.0" +dependencies = [ + "clap", + "futures", + "gix", + "handlebars", + "hex", + "mime_guess", + "mockall", + "rust-embed", + "serde", + "serde_json", + "sha2", + "signal-hook", + "signal-hook-tokio", + "tempdir", + "thiserror", + "tokio", + "trust-dns-client", + "warp", +] + [[package]] name = "downcast" version = "0.11.0" @@ -590,30 +614,6 @@ dependencies = [ "slab", ] -[[package]] -name = "gateway" -version = "0.1.0" -dependencies = [ - "clap", - "futures", - "gix", - "handlebars", - "hex", - "mime_guess", - "mockall", - "rust-embed", - "serde", - "serde_json", - "sha2", - "signal-hook", - "signal-hook-tokio", - "tempdir", - "thiserror", - "tokio", - "trust-dns-client", - "warp", -] - [[package]] name = "generic-array" version = "0.14.7" diff --git a/Cargo.toml b/Cargo.toml index 6369d3a..3fef27d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "gateway" +name = "domiply" version = "0.1.0" edition = "2021" diff --git a/src/main.rs b/src/main.rs index 2faa18e..e16df92 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,24 +10,24 @@ use std::str::FromStr; #[derive(Parser, Debug)] #[command(version)] -#[command(about = "A gateway to another dimension")] +#[command(about = "A domiply to another dimension")] struct Cli { - #[arg(long, default_value_t = SocketAddr::from_str("127.0.0.1:3030").unwrap(), env = "GATEWAY_HTTP_LISTEN_ADDR")] + #[arg(long, default_value_t = SocketAddr::from_str("127.0.0.1:3030").unwrap(), env = "DOMIPLY_HTTP_LISTEN_ADDR")] http_listen_addr: SocketAddr, - #[arg(long, required = true, env = "GATEWAY_PASSPHRASE")] + #[arg(long, required = true, env = "DOMIPLY_PASSPHRASE")] passphrase: String, - #[arg(long, required = true, env = "GATEWAY_ORIGIN_STORE_GIT_DIR_PATH")] + #[arg(long, required = true, env = "DOMIPLY_ORIGIN_STORE_GIT_DIR_PATH")] origin_store_git_dir_path: path::PathBuf, - #[arg(long, required = true, env = "GATEWAY_DOMAIN_CHECKER_TARGET_CNAME")] - domain_checker_target_cname: gateway::domain::Name, + #[arg(long, required = true, env = "DOMIPLY_DOMAIN_CHECKER_TARGET_CNAME")] + domain_checker_target_cname: domiply::domain::Name, - #[arg(long, default_value_t = String::from("1.1.1.1:53"), env = "GATEWAY_DOMAIN_CHECKER_RESOLVER_ADDR")] + #[arg(long, default_value_t = String::from("1.1.1.1:53"), env = "DOMIPLY_DOMAIN_CHECKER_RESOLVER_ADDR")] domain_checker_resolver_addr: String, - #[arg(long, required = true, env = "GATEWAY_DOMAIN_CONFIG_STORE_DIR_PATH")] + #[arg(long, required = true, env = "DOMIPLY_DOMAIN_CONFIG_STORE_DIR_PATH")] domain_config_store_dir_path: path::PathBuf, } @@ -58,21 +58,21 @@ async fn main() { stop_ch_rx }; - let origin_store = gateway::origin::store::git::new(config.origin_store_git_dir_path) + let origin_store = domiply::origin::store::git::new(config.origin_store_git_dir_path) .expect("git origin store initialized"); - let domain_checker = gateway::domain::checker::new( + let domain_checker = domiply::domain::checker::new( config.domain_checker_target_cname.clone(), &config.domain_checker_resolver_addr, ) .expect("domain checker initialized"); - let domain_config_store = gateway::domain::config::new(&config.domain_config_store_dir_path) + let domain_config_store = domiply::domain::config::new(&config.domain_config_store_dir_path) .expect("domain config store initialized"); - let manager = gateway::domain::manager::new(origin_store, domain_config_store, domain_checker); + let manager = domiply::domain::manager::new(origin_store, domain_config_store, domain_checker); - let service = gateway::service::new( + let service = domiply::service::new( manager, config.domain_checker_target_cname, config.passphrase, diff --git a/src/service/http_tpl/base.html b/src/service/http_tpl/base.html index cd0beab..1bb0c8a 100644 --- a/src/service/http_tpl/base.html +++ b/src/service/http_tpl/base.html @@ -6,7 +6,7 @@ - Cosmux - The universal, zero-authentication hosting service + Domiply - The universal, zero-authentication hosting service @@ -34,7 +34,7 @@
-

Cosmux

+

Domiply

The universal, zero-authentication hosting service
diff --git a/src/service/http_tpl/domain.html b/src/service/http_tpl/domain.html index b15af4d..186c3e1 100644 --- a/src/service/http_tpl/domain.html +++ b/src/service/http_tpl/domain.html @@ -2,12 +2,12 @@ Configure New Domain -

Your domain {{ data.domain }} is not yet configured with Cosmux. +

Your domain {{ data.domain }} is not yet configured with Domiply. 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 automatically updated too!

-

In the future Cosmux will support more backends than just git +

In the future Domiply will support more backends than just git repos.

diff --git a/src/service/http_tpl/domain_init.html b/src/service/http_tpl/domain_init.html index f6bd5ed..734f412 100644 --- a/src/service/http_tpl/domain_init.html +++ b/src/service/http_tpl/domain_init.html @@ -1,6 +1,6 @@

Configure DNS

-

Next you will need to configure your DNS server to point to Cosmux. There are +

Next you will need to configure your DNS server to point to Domiply. There are two entries you will need to add:

    diff --git a/src/service/http_tpl/index.html b/src/service/http_tpl/index.html index b54ac2e..13ff2a8 100644 --- a/src/service/http_tpl/index.html +++ b/src/service/http_tpl/index.html @@ -1,8 +1,8 @@ -

    Cosmux connects your domain to whatever you want to host on it, all with no +

    Domiply 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 server, and you're done!

    -

    Cosmux is currently only a proof-of-concept with limited features, +

    Domiply is currently only a proof-of-concept with limited features, but will continue to be expanded as development time permits

    The following backends are supported for serving a domain:

    @@ -41,7 +41,7 @@ it before:

    About

    -

    Cosmux is an open-source project which is designed to be hosted by +

    Domiply 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 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.