Compare commits

..

No commits in common. "17070b30b366401ac1485d4d83500abed9310b50" and "92f7d3d52a7e289429adba718061f838a879aa62" have entirely different histories.

6 changed files with 30 additions and 96 deletions

View File

@ -5,7 +5,7 @@ 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](https://domani.micropelago.net) [Demo which may or may not be live](https://domani.mediocregopher.com)
Domani supports serving domains using the following protocols: Domani supports serving domains using the following protocols:
@ -197,11 +197,17 @@ immediately available at:
## Roadmap ## Roadmap
* Better web interface design.
* Tutorials aimed at beginner users. * Tutorials aimed at beginner users.
* Support for more backends than just git repositories, including: * Support for more backends than just git repositories, including:
* IPFS/IPNS * IPFS/IPNS
* Small static files (e.g. for well-knowns) * Small static files (e.g. for well-knowns)
* Google Drive
* Dropbox
* Automatic HTTP/gemtext rendering for markdown files. * Automatic HTTP/gemtext rendering for markdown files.
* Automatic HTTP rendering for gemtext files. * Automatic HTTP rendering for gemtext files.
* Ability to disable the web interface.
* Ability to disable HTTP completely.

View File

@ -253,6 +253,7 @@ impl Service {
dns_records: &'a [service::ConfigDNSRecord], dns_records: &'a [service::ConfigDNSRecord],
challenge_token: String, challenge_token: String,
domain_is_zone_apex: bool,
dns_records_have_cname: bool, dns_records_have_cname: bool,
} }
@ -273,6 +274,8 @@ impl Service {
} }
}; };
// TODO this is wrong, e.g. something.co.uk
let domain_is_zone_apex = args.domain.as_rr().num_labels() == 2;
let dns_records_have_cname = self.config.dns_records.iter().any(|r| match r { let dns_records_have_cname = self.config.dns_records.iter().any(|r| match r {
service::ConfigDNSRecord::CNAME { .. } => true, service::ConfigDNSRecord::CNAME { .. } => true,
_ => false, _ => false,
@ -294,6 +297,7 @@ impl Service {
dns_records: &self.config.dns_records, dns_records: &self.config.dns_records,
challenge_token: settings_hash, challenge_token: settings_hash,
domain_is_zone_apex,
dns_records_have_cname, dns_records_have_cname,
}, },
) )

View File

@ -18,64 +18,9 @@
<link rel="stylesheet" type="text/css" href="/static/bamboo.css" /> <link rel="stylesheet" type="text/css" href="/static/bamboo.css" />
<style> <style>
:root {
--domani-bg: #fffef9;
--domani-blue: #1a477e;
--domani-orange: #c35136;
}
body {
background-color: var(--domani-bg);
padding-bottom: 3rem;
}
h1, h2, h3, h4, h5, h1 a {
color: var(--domani-blue);
}
hr {
color: var(--domani-blue);
background-color: var(--domani-blue);
border: none;
height: 0.5rem;
}
a {
color: var(--domani-orange);
}
a:hover {
text-decoration: underline;
}
code {
background-color: white;
}
button, input[type="submit"] {
color: var(--domani-bg);
background-color: var(--domani-orange);
}
input {
background-color: white;
border: 1px solid var(--domani-blue);
}
form { form {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
form fieldset {
border: 1px dotted var(--domani-blue);
}
form fieldset legend {
font-weight: bold;
margin-bottom: 0.5rem;
}
</style> </style>
</head> </head>
@ -83,8 +28,8 @@
<body> <body>
<header> <header>
<h1><a href="/">☀️ Domani</a></h1> <h1><a href="/">Domani</a></h1>
<hr/> <blockquote>The universal, zero-authentication hosting service</blockquote>
</header> </header>
<main> <main>

View File

@ -58,7 +58,8 @@ automatically updated too!</p>
<input name="domain_setting_add_path_prefix" <input name="domain_setting_add_path_prefix"
type="text" type="text"
placeholder="directory/sub-directory" placeholder="directory/sub-directory"
value="{{ data.settings.add_path_prefix }}" /> value="{{ data.settings.add_path_prefix }}"
required />
</label> </label>
</p> </p>
</fieldset> </fieldset>

View File

@ -5,7 +5,7 @@ administrator of the Domani server:</p>
<form method="{{ form_method }}" action="/domain_sync.html" id="syncForm"> <form method="{{ form_method }}" action="/domain_sync.html" id="syncForm">
<input name="domain" type="hidden" value="{{ data.domain }}" /> <input name="domain" type="hidden" value="{{ data.domain }}" />
{{ #each data.url_encoded_domain_settings }} {{ #each data.flat_domain_settings }}
<input name="{{ @key }}" type="hidden" value="{{ this }}" /> <input name="{{ @key }}" type="hidden" value="{{ this }}" />
{{ /each }} {{ /each }}
@ -58,11 +58,11 @@ query for your domain name. It can be <strong>one or more of</strong>:</p>
{{ /each }} {{ /each }}
</table> </table>
{{ #if data.dns_records_have_cname }} {{ #if data.domain_is_zone_apex }}{{ #if data.dns_records_have_cname }}
<p>(Please note that not all DNS providers support putting a CNAME at the zone <p>(Please note that not all DNS providers support putting a CNAME at the zone
apex, while others support it via an alternative record type like ALIAS or apex, while others support it via an alternative record type like ALIAS or
ANAME.)</p> ANAME.)</p>
{{ /if }} {{ /if }}{{ /if }}
<p>Once both entries are installed, you can hit the following button to check <p>Once both entries are installed, you can hit the following button to check
your configuration and set up your domain.</p> your configuration and set up your domain.</p>

View File

@ -1,11 +1,17 @@
<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
server, and you're done!</p>
<p>Domani makes it as easy as possible to host a website on your own domain <p><strong>YOU SHOULD NOT USE THIS FOR ANYTHING YOU CARE ABOUT AT THIS
name. No account is needed, just two simple steps and you're done!</p> TIME.</strong></p>
<p>Domani is currently only a proof-of-concept with limited features,
but will continue to be expanded as development time permits.</p>
<h2>Get Started</h2> <h2>Get Started</h2>
<p>Input your domain name below to set it up, or to reconfigure a domain which <p>Input your domain name below to set it up, or to reconfigure it has already
you have already set up.</p> been set up.</p>
<form method="{{ form_method }}" action="/domain.html"> <form method="{{ form_method }}" action="/domain.html">
@ -20,42 +26,14 @@ you have already set up.</p>
<input type="submit" value="Go!" /> <input type="submit" value="Go!" />
</form> </form>
<p>Alternatively:</p> <p>Or you can do any of the following alternative actions:</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/micropelago/domani">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>How It Works</h2>
<p>
You will direct Domani to serve files from some external backend, for example a
git repository. Domani will handle all the details of generating TLS
certificates, fetching the files, and serving traffic to your website.
</p>
<p>To change the content of your website, just change the files in your
configured backend. The changes will be reflected on your website after a short
refresh period.</p>
<h3>Gemini Support</h3>
<p>
<a href="https://gemini.circumlunar.space/">Gemini</a> is a new protocol
with a focus on content, simplicity, and user-centrism.
</p>
<p>
Domani supports both normal websites and gemini capsules, and will serve the
same domain on both protocols at the same time. Getting started with gemini is
as simple as creating an <code>index.gmi</code>
<a href="https://gemini.circumlunar.space/docs/cheatsheet.gmi">gemtext</a> file
in your backend, and visiting your domain in a
<a href="https://github.com/kr1sp1n/awesome-gemini#graphical">gemini client</a>.
</p>
<h2>About</h2> <h2>About</h2>
<p>Domani 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