start ideas for majd
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Cadey Ratio 2020-07-26 17:47:22 -04:00
parent 446cef752b
commit 07f8e0763c
4 changed files with 47 additions and 0 deletions

View File

@ -48,5 +48,6 @@ server = ["rustls", "webpki", "webpki-roots", "tokio", "async-trait", "tokio-rus
[workspace]
members = [
"./majc",
"./majd",
"./site"
]

18
majd/Cargo.toml Normal file
View File

@ -0,0 +1,18 @@
[package]
name = "majd"
version = "0.1.0"
authors = ["Christine Dodrill <me@christine.website>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
structopt = "0.3"
tokio = { version = "0.2", features = ["rt-threaded", "macros"] }
tokio-rustls = { version = "0.14", features = ["dangerous_configuration"] }
async-trait = "0"
pretty_env_logger = "0.4"
log = "0"
anyhow = "1"
maj = { path = ".." }

25
majd/config.dhall Normal file
View File

@ -0,0 +1,25 @@
let Host =
{ Type = { name : Text, certPath : Text, keyPath : Text, proxyTo : Text }
, default =
{ name = "misconfigured.server"
, certPath = "./misconfigured.server/cert.pem"
, keyPath = "./misconfigured.server/key.pem"
, proxyTo = "127.0.0.1:1965"
}
}
let Config =
{ Type = { hosts : List Host.Type }
, default = { hosts = [] : List Host.Type }
}
in Config::{
, hosts =
[ Host::{
, name = "maj.cetacean.club"
, certPath = "./certs/maj/cert.pem"
, keyPath = "./certs/maj/key.pem"
, proxyTo = "127.0.0.1:43833"
}
]
}

3
majd/src/main.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}