rename to domiply
This commit is contained in:
parent
6e88ab967f
commit
f9801af166
8
.env.dev
8
.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
|
||||
|
48
Cargo.lock
generated
48
Cargo.lock
generated
@ -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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "gateway"
|
||||
name = "domiply"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
26
src/main.rs
26
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,
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
<title>Cosmux - The universal, zero-authentication hosting service</title>
|
||||
<title>Domiply - The universal, zero-authentication hosting service</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<main>
|
||||
|
||||
<section>
|
||||
<h1><a href="/">Cosmux</a></h1>
|
||||
<h1><a href="/">Domiply</a></h1>
|
||||
<blockquote>The universal, zero-authentication hosting service</blockquote>
|
||||
</section>
|
||||
|
||||
|
@ -2,12 +2,12 @@
|
||||
Configure New Domain
|
||||
</h2>
|
||||
|
||||
<p>Your domain <code>{{ data.domain }}</code> is not yet configured with Cosmux.
|
||||
<p>Your domain <code>{{ data.domain }}</code> 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!</p>
|
||||
|
||||
<p><em>In the future Cosmux will support more backends than just git
|
||||
<p><em>In the future Domiply will support more backends than just git
|
||||
repos.</em></p>
|
||||
|
||||
<form method="GET" action="/domain_init.html">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<h2>Configure DNS</h2>
|
||||
|
||||
<p>Next you will need to configure your DNS server to point to Cosmux. There are
|
||||
<p>Next you will need to configure your DNS server to point to Domiply. There are
|
||||
two entries you will need to add:</p>
|
||||
|
||||
<ul>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<p>Cosmux connects your domain to whatever you want to host on it, all with no
|
||||
<p>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!</p>
|
||||
|
||||
<p><strong>Cosmux is currently only a proof-of-concept with limited features,
|
||||
<p><strong>Domiply is currently only a proof-of-concept with limited features,
|
||||
but will continue to be expanded as development time permits</strong></p>
|
||||
|
||||
<p>The following backends are supported for serving a domain:</p>
|
||||
@ -41,7 +41,7 @@ it before:</p>
|
||||
|
||||
<h2>About</h2>
|
||||
|
||||
<p>Cosmux is an open-source project which is designed to be hosted by
|
||||
<p>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.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user