HSTS Preload DNS list, other minor improvements

parent a83bb94f
......@@ -24,6 +24,11 @@ router.get("/:domain", (req: Request, res: Response, next: NextFunction) => {
])
.then(x => x[0])
.then(ipInfo => {
// Nullify IP info if undefined
if(ipInfo[0] == undefined) {
ipInfo = null;
}
res.render("dns/show.twig", {
"title": `${req.params.domain} - DNS data`,
"disable_title_prefix": true,
......
......@@ -29,4 +29,11 @@ router.get("/docs/", (req: Request, res: Response, next: NextFunction) => {
});
});
router.get("/docs/dns-hsts-preloading/", (req: Request, res: Response, next: NextFunction) => {
res.render("docs/dns-hstspreload.twig", {
"canonical_url": "/docs/dns-hsts-preloading/",
"title": "DNS list for HSTS preloaded domains",
});
});
export const HomeController: Router = router;
......@@ -50,7 +50,7 @@ router.get("/:zero/:one([0-9][0-9]?[0-9]?)", (req: Request, res: Response, next:
cidrNotation,
ipVersion,
addresses: addresses,
// addresses: addresses,
announcements,
});
......
......@@ -102,9 +102,11 @@
src="https://screenshots.lelux.fi/api/png?url=http://{{ domain }}" />
</div> #}
{% endif %}
{% if ipInfo %}
<div class="tab-pane fade" id="ip-info" role="tabpanel" aria-labelledby="ip-info-tab">
{% include "../components/ip-info.twig" %}
</div>
{% endif %}
<div class="tab-pane fade" id="whois" role="tabpanel" aria-labelledby="whois-tab">
<pre class="mt-2 mb-0"><code id="whoisInformation"></code></pre>
</div>
......
{% extends 'layouts/default.twig' %}
{% block body %}
<h1>DNS list for <a href="https://hstspreload.org/">HSTS preloaded domains</a></h1>
<p>This list is technically similar to <a href="https://en.wikipedia.org/wiki/DNSBL#URI_DNSBLs">URIBLs</a>.</p>
<p><a href="https://gitlab.lelux.fi/TelcoDB/hsts-preload-dns">The source code is available on GitLab</a>.</p>
<h2>Technical details</h2>
<p>The service is available under <code>chromium.hstspreload.lelux.fi</code>.</p>
<p>A query returns <code>127.0.0.42</code> if the domain is HSTS preloaded.
If it is not preloaded, <a href="https://tools.ietf.org/html/rfc8020">NXDOMAIN</a> is returned.</p>
<h3>Example</h3>
<pre><code>$ dig +short <a href="/dns/httpforever.com.chromium.hstspreload.lelux.fi"
class="text-dark">httpforever.com.chromium.hstspreload.lelux.fi</a>
$ dig +short <a href="/dns/mail.google.com.chromium.hstspreload.lelux.fi" class="text-dark">mail.google.com.chromium.hstspreload.lelux.fi
<a class="text-dark" href="/ip/127.0.0.42">127.0.0.42</a></code></pre>
<h3>Guidelines</h3>
<ul>
<li>We recommend you to self-host the preloading list, if possible.</li>
<li>No warranty of any kind is provided.</li>
</ul>
<hr>
<p><a href="/docs/">Go back to documentation</a></p>
{% endblock %}
\ No newline at end of file
......@@ -70,6 +70,12 @@ location: https://peeringdb.com/api/net/291</code></pre>
{# <p>We couldn't understand why it couldn't be implemented <a href="https://peeringdb.com/apidocs/">natively in the PeeringDB API</a>...</p> #}
<h2>DNS lists</h2>
<ul>
<li><a href="/docs/dns-hsts-preloading/">DNS list for HSTS preloaded domains</a></li>
</ul>
<h2>DNS-over-HTTPS</h2>
<ul>
......
......@@ -12,7 +12,7 @@
<a class="nav-link" data-toggle="tab" role="tab"
id="whois-tab" href="#whois" aria-controls="whois" aria-selected="false">Whois</a>
</li>
{% if ipVersion == 4 %}
{% if addresses and ipVersion == 4 %}
<li class="nav-item">
<a class="nav-link" data-toggle="tab" role="tab"
id="dns-tab" href="#dns" aria-controls="dns" aria-selected="false">DNS</a>
......@@ -52,7 +52,7 @@
<div class="tab-pane fade" id="whois" role="tabpanel" aria-labelledby="whois-tab">
<pre class="mt-2 mb-0"><code id="whoisInformation"></code></pre>
</div>
{% if ipVersion == 4 %}
{% if addresses and ipVersion == 4 %}
<div class="tab-pane fade" id="dns" role="tabpanel" aria-labelledby="dns-tab">
<table class="table w-auto">
<thead>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment