forked from cadey/maj
start ideas for majd
This commit is contained in:
parent
446cef752b
commit
07f8e0763c
|
@ -48,5 +48,6 @@ server = ["rustls", "webpki", "webpki-roots", "tokio", "async-trait", "tokio-rus
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"./majc",
|
"./majc",
|
||||||
|
"./majd",
|
||||||
"./site"
|
"./site"
|
||||||
]
|
]
|
||||||
|
|
|
@ -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 = ".." }
|
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
Loading…
Reference in New Issue