maatma: Add cloudflare likes error pages
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-03-10 16:54:02 +01:00
parent fe731b934a
commit 6e89a8011f
4 changed files with 344 additions and 0 deletions

View File

@ -73,6 +73,26 @@ steps:
event:
- push
- name: deploy error pages
image: appleboy/drone-scp
settings:
tar_tmp_path: /tmp/
host: adlin.nemunai.re
target: /var/www/nemunai.re/adlin/.error-pages/
source: token-validator/htdocs/5*.html
strip_components: 2
username:
from_secret: ssh_username
key:
from_secret: deploy_key
port:
from_secret: ssh_port
when:
branch:
- master
event:
- push
trigger:
event:
- push

View File

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Maatma :: Bad Gateway</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
</head>
<body>
<div class="container mt-1 mb-4">
<div class="d-flex align-items-center">
<h1 class="display-3 mb-0">
Error 502
</h1>
<div class="text-muted ms-3 flex-fill text-end">
<script>
document.write(new Intl.DateTimeFormat('default', {hour:'numeric', minute: 'numeric', second: 'numeric', year: 'numeric', month: 'numeric', day: 'numeric', timeZone: 'UTC'}).format(new Date()))
</script>
UTC
</div>
</div>
<h2 class="text-muted fw-light">
Bad Gateway
</h2>
</div>
<div class="container-fluid py-5" style="background-color: #ddd; box-shadow: inset 0px 0px 5px #999">
<div class="row">
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-check-circle-fill text-success" style="font-size: 50%"></i>
</div>
<i class="bi bi-laptop text-muted"></i>
</div>
<h3 class="text-center">
Browser<br>
<span class="text-success">
Working
</span>
</h3>
</div>
</div>
<div class="col d-flex flex-column display-1 justify-content-center align-items-center">
<i class="bi bi-arrow-left-right"></i>
</div>
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-x-circle-fill text-danger" style="font-size: 50%"></i>
</div>
<i class="bi bi-cloud-fill text-muted"></i>
</div>
<h3 class="text-center">
Maatma<br>
<span class="text-danger">
Error
</span>
</h3>
</div>
</div>
<div class="col d-flex flex-column display-1 justify-content-center align-items-center">
<i class="bi bi-arrow-left-right"></i>
</div>
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-question-circle-fill text-info" style="font-size: 50%"></i>
</div>
<i class="bi bi-hdd-network-fill text-muted"></i>
</div>
<h3 class="text-center">
<div class="font-monospace text-truncate" style="min-height: 1.1em;">
<script>
document.write(window.location.host);
</script>
</div>
<span class="text-muted">
Unknown
</span>
</h3>
</div>
</div>
</div>
</div>
<div class="container mt-4">
<div class="row">
<div class="col">
<h3 class="mb-1">What happened?</h3>
<p>
Maatma seems to have an issue and can't send the request correctly to its destination.
</p>
</div>
<div class="col">
<h3 class="mb-1">It's my host, what can I do?</h3>
<p>
Most probably: nothing. Try to ping <a href="https://matrix.to/#/#maatma:nemunai.re" target="_blank">@nemunaire</a> on Matrix if he's not aware of the problem.
</p>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Maatma :: Bad Gateway</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
</head>
<body>
<div class="container mt-1 mb-4">
<div class="d-flex align-items-center">
<h1 class="display-3 mb-0">
Error 502
</h1>
<div class="text-muted ms-3 flex-fill text-end">
<script>
document.write(new Intl.DateTimeFormat('default', {hour:'numeric', minute: 'numeric', second: 'numeric', year: 'numeric', month: 'numeric', day: 'numeric', timeZone: 'UTC'}).format(new Date()))
</script>
UTC
</div>
</div>
<h2 class="text-muted fw-light">
Bad Gateway
</h2>
</div>
<div class="container-fluid py-5" style="background-color: #ddd; box-shadow: inset 0px 0px 5px #999">
<div class="row">
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-check-circle-fill text-success" style="font-size: 50%"></i>
</div>
<i class="bi bi-laptop text-muted"></i>
</div>
<h3 class="text-center">
Browser<br>
<span class="text-success">
Working
</span>
</h3>
</div>
</div>
<div class="col d-flex flex-column display-1 justify-content-center align-items-center">
<i class="bi bi-arrow-left-right"></i>
</div>
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-check-circle-fill text-success" style="font-size: 50%"></i>
</div>
<i class="bi bi-cloud-fill text-muted"></i>
</div>
<h3 class="text-center">
Maatma<br>
<span class="text-success">
Working
</span>
</h3>
</div>
</div>
<div class="col d-flex flex-column display-1 justify-content-center align-items-center">
<i class="bi bi-arrow-left-right"></i>
</div>
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-x-circle-fill text-danger" style="font-size: 50%"></i>
</div>
<i class="bi bi-hdd-network-fill text-muted"></i>
</div>
<h3 class="text-center">
<div class="font-monospace text-truncate" style="min-height: 1.1em;">
<script>
document.write(window.location.host);
</script>
</div>
<span class="text-danger">
Error
</span>
</h3>
</div>
</div>
</div>
</div>
<div class="container mt-4">
<div class="row">
<div class="col">
<h3 class="mb-1">What happened?</h3>
<p>
Maatma is responding with this error page because we were not able to contact the host you want to access.
</p>
</div>
<div class="col">
<h3 class="mb-1">It's my host, what can I do?</h3>
<p>
First, check that your tunnel is up on the <a href="//adlin.nemunai.re/maatma/tunnels">Maatma's tunnels page</a>.
</p>
<p>
If it's up, most probably there is no program configured to respond on the given port (check with <code>ss -tln</code>), or your firewall is filtering the request (check with <code>tcpdump</code> if you see the request and the answer).
</p>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Maatma :: Gateway Timeout</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
</head>
<body>
<div class="container mt-1 mb-4">
<div class="d-flex align-items-center">
<h1 class="display-3 mb-0">
Error 504
</h1>
<div class="text-muted ms-3 flex-fill text-end">
<script>
document.write(new Intl.DateTimeFormat('default', {hour:'numeric', minute: 'numeric', second: 'numeric', year: 'numeric', month: 'numeric', day: 'numeric', timeZone: 'UTC'}).format(new Date()))
</script>
UTC
</div>
</div>
<h2 class="text-muted fw-light">
Gateway Timeout
</h2>
</div>
<div class="container-fluid py-5" style="background-color: #ddd; box-shadow: inset 0px 0px 5px #999">
<div class="row">
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-check-circle-fill text-success" style="font-size: 50%"></i>
</div>
<i class="bi bi-laptop text-muted"></i>
</div>
<h3 class="text-center">
Browser<br>
<span class="text-success">
Working
</span>
</h3>
</div>
</div>
<div class="col d-flex flex-column display-1 justify-content-center align-items-center">
<i class="bi bi-arrow-left-right"></i>
</div>
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-check-circle-fill text-success" style="font-size: 50%"></i>
</div>
<i class="bi bi-cloud-fill text-muted"></i>
</div>
<h3 class="text-center">
Maatma<br>
<span class="text-success">
Working
</span>
</h3>
</div>
</div>
<div class="col d-flex flex-column display-1 justify-content-center align-items-center">
<i class="bi bi-arrow-left-right"></i>
</div>
<div class="col-3">
<div class="position-relative h-100">
<div class="text-center display-2">
<div class="position-absolute w-100 ps-5">
<i class="bi bi-x-circle-fill text-danger" style="font-size: 50%"></i>
</div>
<i class="bi bi-hdd-network-fill text-muted"></i>
</div>
<h3 class="text-center">
<div class="font-monospace text-truncate" style="min-height: 1.1em;">
<script>
document.write(window.location.host);
</script>
</div>
<span class="text-danger">
Timeout
</span>
</h3>
</div>
</div>
</div>
</div>
<div class="container mt-4">
<div class="row">
<div class="col">
<h3 class="mb-1">What happened?</h3>
<p>
Maatma is responding with this error page because the server takes too many time to respond.
</p>
</div>
<div class="col">
<h3 class="mb-1">It's my host, what can I do?</h3>
<p>
First, check that your tunnel is currently up on the <a href="//adlin.nemunai.re/maatma/tunnels">Maatma's tunnels page</a>, then try to <code>ping</code> your gateway (adress on the tunnels page).
</p>
<p>
If it's up, most probably your firewall is filtering the request with a <code>DROP</code> target and never answer that the port is closed. Or your server is overloaded and really takes too long to respond.
</p>
</div>
</div>
</div>
</body>
</html>